diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 92dd558885a..02ecf816e90 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -9,7 +9,7 @@ = @project.name %ul.sidebar-top-level-items = nav_link(path: sidebar_projects_paths, html_options: { class: 'home' }) do - = link_to project_path(@project), class: 'shortcuts-project', data: { qa_selector: 'project_link' } do + = link_to project_path(@project), class: 'shortcuts-project rspec-project-link', data: { qa_selector: 'project_link' } do .nav-icon-container = sprite_icon('home') %span.nav-item-name @@ -163,7 +163,7 @@ - if project_nav_tab? :pipelines = nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts]) do - = link_to project_pipelines_path(@project), class: 'shortcuts-pipelines qa-link-pipelines' do + = link_to project_pipelines_path(@project), class: 'shortcuts-pipelines qa-link-pipelines rspec-link-pipelines' do .nav-icon-container = sprite_icon('rocket') %span.nav-item-name#js-onboarding-pipelines-link diff --git a/app/views/shared/_sidebar_toggle_button.html.haml b/app/views/shared/_sidebar_toggle_button.html.haml index d499bc0a253..c7546073e5c 100644 --- a/app/views/shared/_sidebar_toggle_button.html.haml +++ b/app/views/shared/_sidebar_toggle_button.html.haml @@ -1,4 +1,4 @@ -%a.toggle-sidebar-button.js-toggle-sidebar.qa-toggle-sidebar{ role: "button", type: "button", title: "Toggle sidebar" } +%a.toggle-sidebar-button.js-toggle-sidebar.qa-toggle-sidebar.rspec-toggle-sidebar{ role: "button", type: "button", title: "Toggle sidebar" } = sprite_icon('angle-double-left', css_class: 'icon-angle-double-left') = sprite_icon('angle-double-right', css_class: 'icon-angle-double-right') %span.collapse-text= _("Collapse sidebar") diff --git a/spec/features/contextual_sidebar_spec.rb b/spec/features/contextual_sidebar_spec.rb index 9807818bef7..e250e8cc90a 100644 --- a/spec/features/contextual_sidebar_spec.rb +++ b/spec/features/contextual_sidebar_spec.rb @@ -16,21 +16,21 @@ describe 'Contextual sidebar', :js do it 'shows flyout navs when collapsed or expanded apart from on the active item when expanded' do expect(page).not_to have_selector('.js-sidebar-collapsed') - find('.qa-link-pipelines').hover + find('.rspec-link-pipelines').hover expect(page).to have_selector('.is-showing-fly-out') - find('a[data-qa-selector="project_link"]').hover + find('.rspec-project-link').hover expect(page).not_to have_selector('.is-showing-fly-out') - find('.qa-toggle-sidebar').click + find('.rspec-toggle-sidebar').click - find('.qa-link-pipelines').hover + find('.rspec-link-pipelines').hover expect(page).to have_selector('.is-showing-fly-out') - find('a[data-qa-selector="project_link"]').hover + find('.rspec-project-link').hover expect(page).to have_selector('.is-showing-fly-out') end