Commit 357ad44a authored by Phil Hughes's avatar Phil Hughes

Fixed Rubocop errors

parent feeb4893
...@@ -19,7 +19,7 @@ describe 'New/edit merge request', feature: true, js: true do ...@@ -19,7 +19,7 @@ describe 'New/edit merge request', feature: true, js: true do
target_project: project, target_project: project,
source_branch: 'fix', source_branch: 'fix',
target_branch: 'master' target_branch: 'master'
) )
login_as(user) login_as(user)
...@@ -27,7 +27,36 @@ describe 'New/edit merge request', feature: true, js: true do ...@@ -27,7 +27,36 @@ describe 'New/edit merge request', feature: true, js: true do
end end
it 'should update merge request' do it 'should update merge request' do
update_merge_request click_button 'Assignee'
click_link user.name
page.find '.js-assignee-search' do
expect(page).to have_content user.name
end
click_button 'Milestone'
click_link milestone.title
page.find '.js-milestone-select' do
expect(page).to have_content milestone.title
end
click_button 'Labels'
click_link label.title
click_link label2.title
page.find '.js-label-select' do
expect(page).to have_content label2.title
end
click_button 'Save changes'
page.find '.issuable-sidebar' do
expect(page).to have_content user.name
expect(page).to have_content milestone.title
expect(page).to have_content label.title
expect(page).to have_content label2.title
end
end end
end end
...@@ -40,7 +69,7 @@ describe 'New/edit merge request', feature: true, js: true do ...@@ -40,7 +69,7 @@ describe 'New/edit merge request', feature: true, js: true do
target_project: project, target_project: project,
source_branch: 'fix', source_branch: 'fix',
target_branch: 'master' target_branch: 'master'
) )
login_as(user) login_as(user)
...@@ -48,40 +77,36 @@ describe 'New/edit merge request', feature: true, js: true do ...@@ -48,40 +77,36 @@ describe 'New/edit merge request', feature: true, js: true do
end end
it 'should update merge request' do it 'should update merge request' do
update_merge_request click_button 'Assignee'
end click_link user.name
end
def update_merge_request
click_button 'Assignee'
click_link user.name
page.find '.js-assignee-search' do page.find '.js-assignee-search' do
expect(page).to have_content user.name expect(page).to have_content user.name
end end
click_button 'Milestone' click_button 'Milestone'
click_link milestone.title click_link milestone.title
page.find '.js-milestone-select' do page.find '.js-milestone-select' do
expect(page).to have_content milestone.title expect(page).to have_content milestone.title
end end
click_button 'Labels' click_button 'Labels'
click_link label.title click_link label.title
click_link label2.title click_link label2.title
page.find '.js-label-select' do page.find '.js-label-select' do
expect(page).to have_content label2.title expect(page).to have_content label2.title
end end
click_button 'Save changes' click_button 'Save changes'
page.find '.issuable-sidebar' do page.find '.issuable-sidebar' do
expect(page).to have_content user.name expect(page).to have_content user.name
expect(page).to have_content milestone.title expect(page).to have_content milestone.title
expect(page).to have_content label.title expect(page).to have_content label.title
expect(page).to have_content label2.title expect(page).to have_content label2.title
end
end end
end end
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