Commit 58b0e9d3 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch 'cngo-improve-project-iterations-tests' into 'master'

Improve project iterations tests

See merge request gitlab-org/gitlab!45397
parents c5249709 e4203d77
......@@ -16,32 +16,22 @@ RSpec.describe 'Iterations list', :js do
visit project_iterations_path(project)
end
it 'shows iterations on each tab' do
expect(page).to have_link(started_iteration.title)
expect(page).to have_link(upcoming_iteration.title)
it 'shows iterations on each tab', :aggregate_failures do
expect(page).to have_link(started_iteration.title, href: project_iterations_inherited_path(project, started_iteration.id))
expect(page).to have_link(upcoming_iteration.title, href: project_iterations_inherited_path(project, upcoming_iteration.id))
expect(page).not_to have_link(closed_iteration.title)
click_link('Closed')
expect(page).to have_link(closed_iteration.title)
expect(page).to have_link(closed_iteration.title, href: project_iterations_inherited_path(project, closed_iteration.id))
expect(page).not_to have_link(started_iteration.title)
expect(page).not_to have_link(upcoming_iteration.title)
click_link('All')
expect(page).to have_link(started_iteration.title)
expect(page).to have_link(upcoming_iteration.title)
expect(page).to have_link(closed_iteration.title)
end
context 'when an iteration is clicked' do
it 'redirects to an iteration report within the project context' do
click_link('Started iteration')
wait_for_requests
expect(page).to have_current_path(project_iterations_inherited_path(project, started_iteration.id))
end
expect(page).to have_link(started_iteration.title, href: project_iterations_inherited_path(project, started_iteration.id))
expect(page).to have_link(upcoming_iteration.title, href: project_iterations_inherited_path(project, upcoming_iteration.id))
expect(page).to have_link(closed_iteration.title, href: project_iterations_inherited_path(project, closed_iteration.id))
end
end
......
......@@ -12,8 +12,6 @@ RSpec.describe 'Project navbar' do
let_it_be(:project) { create(:project, :repository) }
before do
stub_feature_flags(project_iterations: false)
insert_package_nav(_('Operations'))
project.add_maintainer(user)
......
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