summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-01-12 01:25:29 -0600
committerMike Greiling <mike@pixelcog.com>2018-01-12 10:15:20 -0600
commitbd2e524f4d61e835a97f59a8667e32ace677d361 (patch)
tree05a859d16487543e926d56a12b06e4b3b39ee26d
parentd77d17491893db14655e3b0b0b8f571e5627f1c8 (diff)
downloadgitlab-ce-bd2e524f4d61e835a97f59a8667e32ace677d361.tar.gz
update spinach test for subscription toggle
-rw-r--r--features/project/issues/issues.feature2
-rw-r--r--features/steps/project/issues/issues.rb8
2 files changed, 5 insertions, 5 deletions
diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature
index d6cfa524a3a..819354bb780 100644
--- a/features/project/issues/issues.feature
+++ b/features/project/issues/issues.feature
@@ -164,7 +164,7 @@ Feature: Project Issues
Given project "Shop" have "Release 0.4" open issue
When I visit issue page "Release 0.4"
Then I should see that I am subscribed
- When I click button "Unsubscribe"
+ When I click the subscription toggle
Then I should see that I am unsubscribed
@javascript
diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb
index 3843374678c..3cd26bb429b 100644
--- a/features/steps/project/issues/issues.rb
+++ b/features/steps/project/issues/issues.rb
@@ -21,20 +21,20 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
step 'I should see that I am subscribed' do
wait_for_requests
- expect(find('.js-issuable-subscribe-button span')).to have_content 'Unsubscribe'
+ expect(find('.js-issuable-subscribe-button')).to have_css 'button.is-checked'
end
step 'I should see that I am unsubscribed' do
wait_for_requests
- expect(find('.js-issuable-subscribe-button span')).to have_content 'Subscribe'
+ expect(find('.js-issuable-subscribe-button')).to have_css 'button:not(.is-checked)'
end
step 'I click link "Closed"' do
find('.issues-state-filters [data-state="closed"] span', text: 'Closed').click
end
- step 'I click button "Unsubscribe"' do
- click_on "Unsubscribe"
+ step 'I click the subscription toggle' do
+ find('.js-issuable-subscribe-button button').click
end
step 'I should see "Release 0.3" in issues' do