Commit 3dcc9548 authored by Dan Davison's avatar Dan Davison

Merge branch 'remove-duplication-from-test' into 'master'

Remove duplication from test

See merge request gitlab-org/gitlab!21951
parents 2a928a77 bf977fa5
...@@ -37,9 +37,12 @@ module QA ...@@ -37,9 +37,12 @@ module QA
let(:issue) { create_issue_resource } let(:issue) { create_issue_resource }
let(:epic) { create_epic_resource(issue.project.group) } let(:epic) { create_epic_resource(issue.project.group) }
it 'adds/removes issue to/from epic' do context 'Visit epic first' do
before do
epic.visit! epic.visit!
end
it 'adds/removes issue to/from epic' do
EE::Page::Group::Epic::Show.perform do |show| EE::Page::Group::Epic::Show.perform do |show|
show.add_issue_to_epic(issue.web_url) show.add_issue_to_epic(issue.web_url)
...@@ -52,8 +55,6 @@ module QA ...@@ -52,8 +55,6 @@ module QA
end end
it 'comments on epic' do it 'comments on epic' do
epic.visit!
comment = 'My Epic Comment' comment = 'My Epic Comment'
EE::Page::Group::Epic::Show.perform do |show| EE::Page::Group::Epic::Show.perform do |show|
show.add_comment_to_epic(comment) show.add_comment_to_epic(comment)
...@@ -63,8 +64,6 @@ module QA ...@@ -63,8 +64,6 @@ module QA
end end
it 'closes and reopens an epic' do it 'closes and reopens an epic' do
epic.visit!
EE::Page::Group::Epic::Show.perform(&:close_reopen_epic) EE::Page::Group::Epic::Show.perform(&:close_reopen_epic)
expect(page).to have_content('Closed') expect(page).to have_content('Closed')
...@@ -73,6 +72,7 @@ module QA ...@@ -73,6 +72,7 @@ module QA
expect(page).to have_content('Open') expect(page).to have_content('Open')
end end
end
it 'adds/removes issue to/from epic using quick actions' do it 'adds/removes issue to/from epic using quick actions' do
issue.visit! issue.visit!
......
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