summaryrefslogtreecommitdiff
path: root/spec/features/boards/sidebar_spec.rb
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-01-12 01:40:31 -0600
committerMike Greiling <mike@pixelcog.com>2018-01-12 10:15:20 -0600
commit2525513cfd0ac538e7ac8e7a82e70137e54105d0 (patch)
treedd7f567657dc68d46c1e136a57b5b7e885391a82 /spec/features/boards/sidebar_spec.rb
parentbd2e524f4d61e835a97f59a8667e32ace677d361 (diff)
downloadgitlab-ce-2525513cfd0ac538e7ac8e7a82e70137e54105d0.tar.gz
update capybara specs for subscription toggle
Diffstat (limited to 'spec/features/boards/sidebar_spec.rb')
-rw-r--r--spec/features/boards/sidebar_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb
index 205900615c4..b2dbfcd0031 100644
--- a/spec/features/boards/sidebar_spec.rb
+++ b/spec/features/boards/sidebar_spec.rb
@@ -334,14 +334,14 @@ describe 'Issue Boards', :js do
wait_for_requests
page.within('.subscriptions') do
- click_button 'Subscribe'
+ find('.js-issuable-subscribe-button button:not(.is-checked)').click
wait_for_requests
- expect(page).to have_content('Unsubscribe')
+ expect(page).to have_css('.js-issuable-subscribe-button button.is-checked')
end
end
- it 'has "Unsubscribe" button when already subscribed' do
+ it 'has checked subscription toggle when already subscribed' do
create(:subscription, user: user, project: project, subscribable: issue2, subscribed: true)
visit project_board_path(project, board)
wait_for_requests
@@ -350,10 +350,10 @@ describe 'Issue Boards', :js do
wait_for_requests
page.within('.subscriptions') do
- click_button 'Unsubscribe'
+ find('.js-issuable-subscribe-button button.is-checked').click
wait_for_requests
- expect(page).to have_content('Subscribe')
+ expect(page).to have_css('.js-issuable-subscribe-button button:not(.is-checked)')
end
end
end