Commit 74d73bd9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix random failing test

Make sure we wait till page reloads after request was merged. Otherwise
we get request running which fails next test
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 168b3e97
...@@ -8,10 +8,12 @@ Feature: Project Merge Requests Acceptance ...@@ -8,10 +8,12 @@ Feature: Project Merge Requests Acceptance
Given I am on the Merge Request detail page Given I am on the Merge Request detail page
When I click on "Remove source branch" option When I click on "Remove source branch" option
And I click on Accept Merge Request And I click on Accept Merge Request
Then I should not see the Remove Source Branch button Then I should see merge request merged
And I should not see the Remove Source Branch button
@javascript @javascript
Scenario: Accepting the Merge Request without removing the source branch Scenario: Accepting the Merge Request without removing the source branch
Given I am on the Merge Request detail page Given I am on the Merge Request detail page
When I click on Accept Merge Request When I click on Accept Merge Request
Then I should see the Remove Source Branch button Then I should see merge request merged
And I should see the Remove Source Branch button
...@@ -32,4 +32,8 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps ...@@ -32,4 +32,8 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
step 'I am signed in as a developer of the project' do step 'I am signed in as a developer of the project' do
login_as(@user) login_as(@user)
end end
step 'I should see merge request merged' do
expect(page).to have_content('The changes were merged into')
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