Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-29 11:57:32 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-29 11:57:32 +0300
commit32330e8c285a4b8b8ebfd83441ade47423bc9fed (patch)
treeedbb00d2d81e736c776717fa0b2b31b6eefaccf2 /features
parentea6ebee4ab6a7f479f7d8894bbe1ae3fb6607136 (diff)
parentd92bb3cfe0b9506f9dc8ee3c77ccaa0b8272e09e (diff)
Merge branch 'rs-fix-subscription-feature' into 'master'
Attempt to fix the "I should see that I am [un]subscribed" steps Makes use of Capybara methods that wait. Hopefully this will fix the random timing-related failures of this step. See merge request !853
Diffstat (limited to 'features')
-rw-r--r--features/steps/project/issues/issues.rb5
-rw-r--r--features/steps/project/merge_requests.rb4
2 files changed, 4 insertions, 5 deletions
diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb
index 91d5c3688e2..9ace6436b15 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 7cfde37de55..a1a26abd8ca 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