labels.rb 830 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
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

11
  step 'I should see that I am subscribed to the "bug" label' do
12 13 14
    expect(subscribe_button).to have_content 'Unsubscribe'
  end

15
  step 'I should see that I am not subscribed to the "bug" label' do
16 17 18
    expect(subscribe_button).to have_content 'Subscribe'
  end

19
  step 'I click button "Unsubscribe" for the "bug" label' do
20 21 22
    subscribe_button.click
  end

23
  step 'I click button "Subscribe" for the "bug" label' do
24 25 26 27 28 29
    subscribe_button.click
  end

  private

  def subscribe_button
30
    first('.js-subscribe-button', visible: true)
31 32
  end
end