diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-05-07 12:53:48 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-05-07 12:53:48 -0300 |
commit | a8710516a51e10af6b2d8cc8d686cdc9c11a758b (patch) | |
tree | c0a353b9e6bd85f32b6b440bba2fba0abac0f406 | |
parent | 24f29a6ac681ee3d5acb3daf4cd322b86b33230f (diff) | |
download | gitlab-ce-a8710516a51e10af6b2d8cc8d686cdc9c11a758b.tar.gz |
Add wait_for_vue_resource where its needed
-rw-r--r-- | features/steps/project/merge_requests.rb | 6 | ||||
-rw-r--r-- | features/steps/project/merge_requests/acceptance.rb | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 6c73dbb69eb..41021d7c6ba 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -419,6 +419,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps page.within '.status-box' do expect(page).to have_content "Open" end + wait_for_vue_resource end step 'I click link "Hide inline discussion" of the third file' do @@ -566,13 +567,16 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps page.within ".mr-source-target" do expect(page).to have_content /([0-9]+ commits behind)/ end + + wait_for_vue_resource end step 'I should not see the diverged commits count' do page.within ".mr-source-target" do expect(page).not_to have_content /([0-9]+ commit[s]? behind)/ - wait_for_vue_resource end + + wait_for_vue_resource end def merge_request diff --git a/features/steps/project/merge_requests/acceptance.rb b/features/steps/project/merge_requests/acceptance.rb index 517400cd82b..85ed0749281 100644 --- a/features/steps/project/merge_requests/acceptance.rb +++ b/features/steps/project/merge_requests/acceptance.rb @@ -1,7 +1,7 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps include LoginHelpers include GitlabRoutingHelper - include WaitForAjax + include WaitForVueResource step 'I am on the Merge Request detail page' do visit merge_request_path(@merge_request) @@ -22,17 +22,17 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps step 'I should see the Remove Source Branch button' do expect(page).to have_selector('.js-remove-branch-button') - # Wait for AJAX requests to complete so they don't blow up if they are + # Wait for View Resource requests to complete so they don't blow up if they are # only handled after `DatabaseCleaner` has already run - wait_for_ajax + wait_for_view_resource end step 'I should not see the Remove Source Branch button' do expect(page).not_to have_selector('.js-remove-branch-button') - # Wait for AJAX requests to complete so they don't blow up if they are + # Wait for View Resource requests to complete so they don't blow up if they are # only handled after `DatabaseCleaner` has already run - wait_for_ajax + wait_for_view_resource end step 'There is an open Merge Request' do |