Commit dabf8a8d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix-merge-request-diff-spinach-failures' into 'master'

Fix Spinach merge request diff failures

gitlab-git-test `master` was updated in ff076d88, and this caused the merge request diffs to change in a way that broke assumptions in the Spinach tests.
    
Partial fix to #23378

See merge request !6916
parents 11da7594 9e30b75e
...@@ -7,6 +7,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -7,6 +7,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
include SharedMarkdown include SharedMarkdown
include SharedDiffNote include SharedDiffNote
include SharedUser include SharedUser
include WaitForAjax
step 'I click link "New Merge Request"' do step 'I click link "New Merge Request"' do
click_link "New Merge Request" click_link "New Merge Request"
...@@ -90,6 +91,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -90,6 +91,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I click button "Unsubscribe"' do step 'I click button "Unsubscribe"' do
click_on "Unsubscribe" click_on "Unsubscribe"
wait_for_ajax
end end
step 'I click link "Close"' do step 'I click link "Close"' do
...@@ -114,7 +116,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -114,7 +116,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
source_project: project, source_project: project,
target_project: project, target_project: project,
source_branch: 'fix', source_branch: 'fix',
target_branch: 'master', target_branch: 'merge-test',
author: project.users.first, author: project.users.first,
description: "# Description header" description: "# Description header"
) )
...@@ -137,7 +139,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -137,7 +139,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
title: "Bug NS-05", title: "Bug NS-05",
source_project: project, source_project: project,
target_project: project, target_project: project,
author: project.users.first) author: project.users.first,
source_branch: 'merge-test')
end end
step 'project "Shop" have "Feature NS-05" merged merge request' do step 'project "Shop" have "Feature NS-05" merged merge request' do
...@@ -508,7 +511,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -508,7 +511,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see new target branch changes' do step 'I should see new target branch changes' do
expect(page).to have_content 'Request to merge fix into feature' expect(page).to have_content 'Request to merge fix into feature'
expect(page).to have_content 'Target branch changed from master to feature' expect(page).to have_content 'Target branch changed from merge-test to feature'
end end
step 'I click on "Email Patches"' do step 'I click on "Email Patches"' do
......
require Rails.root.join('features/support/wait_for_ajax')
module SharedNote module SharedNote
include Spinach::DSL include Spinach::DSL
include WaitForAjax
step 'I delete a comment' do step 'I delete a comment' do
page.within('.main-notes-list') do page.within('.main-notes-list') do
...@@ -116,8 +119,9 @@ module SharedNote ...@@ -116,8 +119,9 @@ module SharedNote
page.within(".js-main-target-form") do page.within(".js-main-target-form") do
fill_in "note[note]", with: "# Comment with a header" fill_in "note[note]", with: "# Comment with a header"
click_button "Comment" click_button "Comment"
sleep 0.05
end end
wait_for_ajax
end end
step 'The comment with the header should not have an ID' do step 'The comment with the header should not have an ID' do
......
...@@ -17,6 +17,7 @@ module TestEnv ...@@ -17,6 +17,7 @@ module TestEnv
'markdown' => '0ed8c6c', 'markdown' => '0ed8c6c',
'lfs' => 'be93687', 'lfs' => 'be93687',
'master' => 'b83d6e3', 'master' => 'b83d6e3',
'merge-test' => '5937ac0',
"'test'" => 'e56497b', "'test'" => 'e56497b',
'orphaned-branch' => '45127a9', 'orphaned-branch' => '45127a9',
'binary-encoding' => '7b1cf43', 'binary-encoding' => '7b1cf43',
......
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