diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-19 17:08:48 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-25 21:37:16 -0400 |
commit | d92bb3cfe0b9506f9dc8ee3c77ccaa0b8272e09e (patch) | |
tree | 500d46a9726361a5f13d367c5786f49eb374ef7a /features | |
parent | 6288677134d0e6d1f805748bc557091ad4747bd9 (diff) | |
download | gitlab-ce-d92bb3cfe0b9506f9dc8ee3c77ccaa0b8272e09e.tar.gz |
Attempt to fix the "I should see that I am [un]subscribed" stepsrs-fix-subscription-feature
Makes use of Capybara methods that wait. Hopefully this will fix the
random timing-related failures of this step.
Diffstat (limited to 'features')
-rw-r--r-- | features/steps/project/issues/issues.rb | 5 | ||||
-rw-r--r-- | features/steps/project/merge_requests.rb | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 6873c043e19..10a7974a7f7 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -19,12 +19,11 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end step 'I should see that I am subscribed' do - expect(find(".subscribe-button span").text).to eq "Unsubscribe" + expect(find('.subscribe-button span')).to have_content 'Unsubscribe' end step 'I should see that I am unsubscribed' do - sleep 0.2 - expect(find(".subscribe-button span").text).to eq "Subscribe" + expect(find('.subscribe-button span')).to have_content 'Subscribe' end step 'I click link "Closed"' do diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index f11edb659d5..fb8abffa342 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -58,11 +58,11 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps end step 'I should see that I am subscribed' do - expect(find(".subscribe-button span").text).to eq "Unsubscribe" + expect(find('.subscribe-button span')).to have_content 'Unsubscribe' end step 'I should see that I am unsubscribed' do - expect(find(".subscribe-button span")).to have_content("Subscribe") + expect(find('.subscribe-button span')).to have_content 'Subscribe' end step 'I click button "Unsubscribe"' do |