Fix project subscription_spec

This commit is contained in:
Luke Bennett 2018-05-29 10:25:21 +01:00
parent fad343ca5b
commit c9e4c1760d
No known key found for this signature in database
GPG Key ID: A738E9C68D3BF31A
1 changed files with 4 additions and 2 deletions

View File

@ -36,7 +36,7 @@ feature 'Labels subscription' do
within "#group_label_#{feature.id}" do
expect(page).not_to have_button 'Unsubscribe'
click_link_on_dropdown('Group level')
click_link_on_dropdown('Subscribe at group level')
expect(page).not_to have_selector('.dropdown-group-label')
expect(page).to have_button 'Unsubscribe'
@ -45,7 +45,7 @@ feature 'Labels subscription' do
expect(page).to have_selector('.dropdown-group-label')
click_link_on_dropdown('Project level')
click_link_on_dropdown('Subscribe at project level')
expect(page).not_to have_selector('.dropdown-group-label')
expect(page).to have_button 'Unsubscribe'
@ -67,6 +67,8 @@ feature 'Labels subscription' do
def click_link_on_dropdown(text)
find('.dropdown-group-label').click
screenshot_and_open_image
page.within('.dropdown-group-label') do
find('a.js-subscribe-button', text: text).click
end