Commit bce11e04 authored by Phil Hughes's avatar Phil Hughes

fixed up a bunch EE nav specs

parent d189d5f7
......@@ -70,6 +70,11 @@
= link_to charts_project_graph_path(@project, current_ref) do
#{ _('Charts') }
- if @project.feature_available?(:file_locks)
= nav_link(controller: [:path_locks]) do
= link_to project_path_locks_path(@project) do
#{ _('Locked Files') }
- if project_nav_tab? :container_registry
= nav_link(controller: %w[projects/registry/repositories]) do
= sidebar_link project_container_registry_index_path(@project), title: _('Container Registry'), css: 'shortcuts-container-registry' do
......
......@@ -23,7 +23,7 @@ class Spinach::Features::GroupsManagement < Spinach::FeatureSteps
step 'I go to "Open" project members page' do
click_link 'Sourcing / Open'
page.within('.layout-nav') do
page.within('.nav-sidebar') do
click_link 'Settings'
end
click_link 'Members'
......@@ -46,10 +46,10 @@ class Spinach::Features::GroupsManagement < Spinach::FeatureSteps
step 'I go to group settings page' do
visit dashboard_groups_path
click_link 'Sourcing'
page.within '.layout-nav' do
page.within '.nav-sidebar' do
find('a', text: 'Settings').trigger('click')
end
page.within '.sub-nav' do
page.within '.sidebar-top-level-items > .active' do
find('a', text: 'General').trigger('click')
end
end
......@@ -61,7 +61,7 @@ class Spinach::Features::GroupsManagement < Spinach::FeatureSteps
step 'I go to project settings' do
@project = Project.find_by(name: "Open")
page.within '.sub-nav' do
page.within '.nav-sidebar' do
click_link 'Projects'
end
......
......@@ -15,7 +15,7 @@ feature 'Edit group settings' do
visit edit_group_path(group)
within('.sub-nav') do
within('.nav-sidebar') do
expect(page).to have_link('Webhooks')
end
end
......@@ -27,7 +27,7 @@ feature 'Edit group settings' do
visit edit_group_path(group)
within('.sub-nav') do
within('.nav-sidebar') do
expect(page).not_to have_link('Webhooks')
end
end
......
......@@ -12,6 +12,6 @@ describe 'Issues sub nav EE' do
end
it 'should have a `Boards` item' do
expect(find('.sub-nav')).to have_content 'Boards'
expect(find('.nav-sidebar')).to have_content 'Boards'
end
end
......@@ -8,6 +8,8 @@ describe 'Board with milestone', :js do
let!(:issue_milestone) { create(:closed_issue, project: project, milestone: milestone) }
before do
allow_any_instance_of(ApplicationHelper).to receive(:collapsed_sidebar?).and_return(true)
project.team << [user, :master]
sign_in(user)
......
......@@ -47,7 +47,7 @@ feature 'Groups > Audit Events', :js do
end
# This is to avoid a Capybara::Poltergeist::MouseEventFailed error
find('a[title=Settings]').trigger('click')
find('a[aria-label=Settings]').trigger('click')
click_link 'Audit Events'
......
......@@ -19,7 +19,7 @@ feature 'Edit group settings' do
scenario 'is able to navigate to LDAP group section' do
visit edit_group_path(group)
expect(find('div.sub-nav')).to have_content('LDAP Group')
expect(find('.nav-sidebar')).to have_content('LDAP Group')
end
context 'with owners not being able to manage LDAP' do
......@@ -28,7 +28,7 @@ feature 'Edit group settings' do
visit edit_group_path(group)
expect(find('div.sub-nav')).not_to have_content('LDAP Group')
expect(find('.nav-sidebar')).not_to have_content('LDAP Group')
end
end
end
......
......@@ -23,7 +23,7 @@ feature 'Group merge requests page' do
end
it 'ignores archived merge request count badges in navbar' do
expect( page.find('[title="Merge Requests"] span.badge.count').text).to eq("1")
expect( page.find('[aria-label="Merge Requests"] span.badge.count').text).to eq("1")
end
it 'ignores archived merge request count badges in state-filters' do
......
......@@ -16,7 +16,7 @@ feature 'Groups > Pipeline Quota' do
it 'is not linked within the group settings dropdown' do
visit group_path(group)
page.within('.layout-nav') do
page.within('.nav-sidebar') do
expect(page).not_to have_selector(:link_or_button, 'Pipeline Quota')
end
end
......
......@@ -14,7 +14,9 @@ describe 'Issues csv' do
def request_csv(params = {})
visit project_issues_path(project, params)
click_on 'Export as CSV'
page.within('.breadcrumbs') do
click_on 'Export as CSV'
end
click_on 'Export issues'
end
......
......@@ -12,7 +12,7 @@ feature 'Profile > Pipeline Quota' do
it 'is linked within the profile page' do
visit profile_path
page.within('.layout-nav') do
page.within('.nav-sidebar') do
expect(page).to have_selector(:link_or_button, 'Pipeline quota')
end
end
......
......@@ -98,7 +98,7 @@ feature 'Projects > Audit Events', :js do
end
# This is to avoid a Capybara::Poltergeist::MouseEventFailed error
find('a[title=Settings]').trigger('click')
find('a[aria-label=Settings]').trigger('click')
click_link 'Audit Events'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment