BigW Consortium Gitlab

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

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

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

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

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

  private

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