2016-02-12 09:58:39 -05:00
|
|
|
class Spinach::Features::Labels < Spinach::FeatureSteps
|
|
|
|
include SharedAuthentication
|
|
|
|
include SharedIssuable
|
|
|
|
include SharedProject
|
|
|
|
include SharedNote
|
|
|
|
include SharedPaths
|
|
|
|
include SharedMarkdown
|
|
|
|
|
|
|
|
step 'And I visit project "Shop" labels page' do
|
|
|
|
visit namespace_project_labels_path(project.namespace, project)
|
|
|
|
end
|
|
|
|
|
2016-03-01 11:33:13 -05:00
|
|
|
step 'I should see that I am subscribed to the "bug" label' do
|
2016-02-12 09:58:39 -05:00
|
|
|
expect(subscribe_button).to have_content 'Unsubscribe'
|
|
|
|
end
|
|
|
|
|
2016-03-01 11:33:13 -05:00
|
|
|
step 'I should see that I am not subscribed to the "bug" label' do
|
2016-02-12 09:58:39 -05:00
|
|
|
expect(subscribe_button).to have_content 'Subscribe'
|
|
|
|
end
|
|
|
|
|
2016-03-01 11:33:13 -05:00
|
|
|
step 'I click button "Unsubscribe" for the "bug" label' do
|
2016-02-12 09:58:39 -05:00
|
|
|
subscribe_button.click
|
|
|
|
end
|
|
|
|
|
2016-03-01 11:33:13 -05:00
|
|
|
step 'I click button "Subscribe" for the "bug" label' do
|
2016-02-12 09:58:39 -05:00
|
|
|
subscribe_button.click
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def subscribe_button
|
2016-05-24 09:16:22 -04:00
|
|
|
first('.label-subscribe-button span', visible: true)
|
2016-02-12 09:58:39 -05:00
|
|
|
end
|
|
|
|
end
|