gitlab-org--gitlab-foss/features/steps/project/labels.rb
Dmitriy Zaporozhets 6683fdcfb0
Add nested groups support to the routing
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-11-23 14:08:36 +02:00

32 lines
830 B
Ruby

class Spinach::Features::Labels < Spinach::FeatureSteps
include SharedAuthentication
include SharedIssuable
include SharedProject
include SharedPaths
step 'And I visit project "Shop" labels page' do
visit namespace_project_labels_path(project.namespace, project)
end
step 'I should see that I am subscribed to the "bug" label' do
expect(subscribe_button).to have_content 'Unsubscribe'
end
step 'I should see that I am not subscribed to the "bug" label' do
expect(subscribe_button).to have_content 'Subscribe'
end
step 'I click button "Unsubscribe" for the "bug" label' do
subscribe_button.click
end
step 'I click button "Subscribe" for the "bug" label' do
subscribe_button.click
end
private
def subscribe_button
first('.js-subscribe-button', visible: true)
end
end