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

Merge branch 'simplify-a-bunch-of-ee-plan-tests' into 'master'

Simplify a bunch of Enterprise Edition end-to-end tests

See merge request gitlab-org/gitlab!23174
parents 23b997fe 31618284
...@@ -18,8 +18,8 @@ module QA ...@@ -18,8 +18,8 @@ module QA
weight_of_two = 2 weight_of_two = 2
create_issue('Issue 1', milestone.project, milestone, weight_of_two) create_issue(milestone.project, milestone, weight_of_two)
create_issue('Issue 2', milestone.project, milestone, weight_of_two) create_issue(milestone.project, milestone, weight_of_two)
end end
it 'shows burndown chart on milestone page' do it 'shows burndown chart on milestone page' do
...@@ -35,10 +35,9 @@ module QA ...@@ -35,10 +35,9 @@ module QA
end end
end end
def create_issue(title, project, milestone, weight) def create_issue(project, milestone, weight)
Resource::Issue.fabricate_via_api! do |issue| Resource::Issue.fabricate_via_api! do |issue|
issue.project = project issue.project = project
issue.title = title
issue.milestone = milestone issue.milestone = milestone
issue.weight = weight issue.weight = weight
end end
......
...@@ -81,7 +81,6 @@ module QA ...@@ -81,7 +81,6 @@ module QA
Resource::Issue.fabricate_via_api! do |issue| Resource::Issue.fabricate_via_api! do |issue|
issue.project = project issue.project = project
issue.title = 'Issue created via API'
end end
end end
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
module QA module QA
context 'Plan' do context 'Plan' do
describe 'promote issue to epic' do describe 'promote issue to epic' do
let(:issue_title) { "My Awesome Issue #{SecureRandom.hex(8)}" }
it 'user promotes issue to an epic' do it 'user promotes issue to an epic' do
Flow::Login.sign_in Flow::Login.sign_in
...@@ -14,7 +12,6 @@ module QA ...@@ -14,7 +12,6 @@ module QA
end end
issue = Resource::Issue.fabricate_via_api! do |issue| issue = Resource::Issue.fabricate_via_api! do |issue|
issue.title = issue_title
issue.project = project issue.project = project
end end
...@@ -35,7 +32,7 @@ module QA ...@@ -35,7 +32,7 @@ module QA
project.group.visit! project.group.visit!
Page::Group::Menu.perform(&:click_group_epics_link) Page::Group::Menu.perform(&:click_group_epics_link)
QA::EE::Page::Group::Epic::Index.perform do |index| QA::EE::Page::Group::Epic::Index.perform do |index|
expect(index).to have_epic_title(issue_title) expect(index).to have_epic_title(issue.title)
end end
end end
end end
......
...@@ -16,14 +16,12 @@ module QA ...@@ -16,14 +16,12 @@ module QA
Resource::Issue.fabricate_via_api! do |issue| Resource::Issue.fabricate_via_api! do |issue|
issue.project = label_board_list.project issue.project = label_board_list.project
issue.title = 'Issue 1'
issue.labels = [label] issue.labels = [label]
issue.weight = weight_for_issue_1 issue.weight = weight_for_issue_1
end end
Resource::Issue.fabricate_via_api! do |issue| Resource::Issue.fabricate_via_api! do |issue|
issue.project = label_board_list.project issue.project = label_board_list.project
issue.title = 'Issue 2'
issue.labels = [label] issue.labels = [label]
issue.weight = weight_for_issue_2 issue.weight = weight_for_issue_2
end end
......
...@@ -4,9 +4,7 @@ module QA ...@@ -4,9 +4,7 @@ module QA
context 'Plan' do context 'Plan' do
describe 'Issues analytics' do describe 'Issues analytics' do
let(:issue) do let(:issue) do
Resource::Issue.fabricate_via_api! do |issue| Resource::Issue.fabricate_via_api!
issue.title = 'Issue to test Issues Analytics'
end
end end
before do before do
......
...@@ -17,7 +17,6 @@ module QA ...@@ -17,7 +17,6 @@ module QA
2.times do 2.times do
Resource::Issue.fabricate_via_api! do |issue| Resource::Issue.fabricate_via_api! do |issue|
issue.project = project issue.project = project
issue.title = "Issue-#{SecureRandom.hex(4)}"
end end
end end
......
...@@ -21,7 +21,6 @@ module QA ...@@ -21,7 +21,6 @@ module QA
project.add_member(user_4) project.add_member(user_4)
Resource::Issue.fabricate_via_api! do |issue| Resource::Issue.fabricate_via_api! do |issue|
issue.title = issue.title = 'issue-to-test-multiple-assignees'
issue.project = project issue.project = project
issue.assignee_ids = [ issue.assignee_ids = [
user_1.id, user_1.id,
......
...@@ -27,7 +27,6 @@ module QA ...@@ -27,7 +27,6 @@ module QA
project.add_member(user_6) project.add_member(user_6)
@issue = Resource::Issue.fabricate_via_api! do |issue| @issue = Resource::Issue.fabricate_via_api! do |issue|
issue.title = issue.title = 'issue-to-test-multiple-assignees'
issue.project = project issue.project = project
issue.assignee_ids = [ issue.assignee_ids = [
user_1.id, user_1.id,
......
...@@ -12,14 +12,12 @@ module QA ...@@ -12,14 +12,12 @@ module QA
let(:issue_1) do let(:issue_1) do
Resource::Issue.fabricate_via_api! do |issue| Resource::Issue.fabricate_via_api! do |issue|
issue.project = project issue.project = project
issue.title = 'Issue 1'
end end
end end
let(:issue_2) do let(:issue_2) do
Resource::Issue.fabricate_via_api! do |issue| Resource::Issue.fabricate_via_api! do |issue|
issue.project = project issue.project = project
issue.title = 'Issue 2'
end end
end end
......
...@@ -15,7 +15,6 @@ module QA ...@@ -15,7 +15,6 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
issue = Resource::Issue.fabricate_via_api! do |issue| issue = Resource::Issue.fabricate_via_api! do |issue|
issue.title = 'Issue to test scoped labels'
issue.labels = [initial_label, initial_label_multi_colon] issue.labels = [initial_label, initial_label_multi_colon]
end end
......
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