Commit c9e4c176 authored by Luke Bennett's avatar Luke Bennett

Fix project subscription_spec

parent fad343ca
...@@ -36,7 +36,7 @@ feature 'Labels subscription' do ...@@ -36,7 +36,7 @@ feature 'Labels subscription' do
within "#group_label_#{feature.id}" do within "#group_label_#{feature.id}" do
expect(page).not_to have_button 'Unsubscribe' 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).not_to have_selector('.dropdown-group-label')
expect(page).to have_button 'Unsubscribe' expect(page).to have_button 'Unsubscribe'
...@@ -45,7 +45,7 @@ feature 'Labels subscription' do ...@@ -45,7 +45,7 @@ feature 'Labels subscription' do
expect(page).to have_selector('.dropdown-group-label') 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).not_to have_selector('.dropdown-group-label')
expect(page).to have_button 'Unsubscribe' expect(page).to have_button 'Unsubscribe'
...@@ -67,6 +67,8 @@ feature 'Labels subscription' do ...@@ -67,6 +67,8 @@ feature 'Labels subscription' do
def click_link_on_dropdown(text) def click_link_on_dropdown(text)
find('.dropdown-group-label').click find('.dropdown-group-label').click
screenshot_and_open_image
page.within('.dropdown-group-label') do page.within('.dropdown-group-label') do
find('a.js-subscribe-button', text: text).click find('a.js-subscribe-button', text: text).click
end end
......
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