Commit bd2e524f authored by Mike Greiling's avatar Mike Greiling

update spinach test for subscription toggle

parent d77d1749
...@@ -164,7 +164,7 @@ Feature: Project Issues ...@@ -164,7 +164,7 @@ Feature: Project Issues
Given project "Shop" have "Release 0.4" open issue Given project "Shop" have "Release 0.4" open issue
When I visit issue page "Release 0.4" When I visit issue page "Release 0.4"
Then I should see that I am subscribed 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 Then I should see that I am unsubscribed
@javascript @javascript
......
...@@ -21,20 +21,20 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps ...@@ -21,20 +21,20 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
step 'I should see that I am subscribed' do step 'I should see that I am subscribed' do
wait_for_requests 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 end
step 'I should see that I am unsubscribed' do step 'I should see that I am unsubscribed' do
wait_for_requests 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 end
step 'I click link "Closed"' do step 'I click link "Closed"' do
find('.issues-state-filters [data-state="closed"] span', text: 'Closed').click find('.issues-state-filters [data-state="closed"] span', text: 'Closed').click
end end
step 'I click button "Unsubscribe"' do step 'I click the subscription toggle' do
click_on "Unsubscribe" find('.js-issuable-subscribe-button button').click
end end
step 'I should see "Release 0.3" in issues' do step 'I should see "Release 0.3" in issues' do
......
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