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,41 +37,41 @@ module QA
let(:issue) { create_issue_resource }
let(:epic) { create_epic_resource(issue.project.group) }
it 'adds/removes issue to/from epic' do
epic.visit!
context 'Visit epic first' do
before do
epic.visit!
end
EE::Page::Group::Epic::Show.perform do |show|
show.add_issue_to_epic(issue.web_url)
it 'adds/removes issue to/from epic' do
EE::Page::Group::Epic::Show.perform do |show|
show.add_issue_to_epic(issue.web_url)
expect(show).to have_related_issue_item
expect(show).to have_related_issue_item
show.remove_issue_from_epic
show.remove_issue_from_epic
expect(show).to have_no_related_issue_item
expect(show).to have_no_related_issue_item
end
end
end
it 'comments on epic' do
epic.visit!
it 'comments on epic' do
comment = 'My Epic Comment'
EE::Page::Group::Epic::Show.perform do |show|
show.add_comment_to_epic(comment)
end
comment = 'My Epic Comment'
EE::Page::Group::Epic::Show.perform do |show|
show.add_comment_to_epic(comment)
expect(page).to have_content(comment)
end
expect(page).to have_content(comment)
end
it 'closes and reopens an epic' do
EE::Page::Group::Epic::Show.perform(&:close_reopen_epic)
it 'closes and reopens an epic' do
epic.visit!
EE::Page::Group::Epic::Show.perform(&:close_reopen_epic)
expect(page).to have_content('Closed')
expect(page).to have_content('Closed')
EE::Page::Group::Epic::Show.perform(&:close_reopen_epic)
EE::Page::Group::Epic::Show.perform(&:close_reopen_epic)
expect(page).to have_content('Open')
expect(page).to have_content('Open')
end
end
it 'adds/removes issue to/from epic using quick actions' do
......
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