BigW Consortium Gitlab

project_services.rb 1.17 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
class ProjectServices < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedProject
  include SharedPaths

  When 'I visit project "Shop" services page' do
    visit project_services_path(@project)
  end

  Then 'I should see list of available services' do
    page.should have_content 'Services'
12
    page.should have_content 'Campfire'
13
    page.should have_content 'Hipchat'
14 15 16 17 18 19 20 21 22
    page.should have_content 'GitLab CI'
  end

  And 'I click gitlab-ci service link' do
    click_link 'GitLab CI'
  end

  And 'I fill gitlab-ci settings' do
    check 'Active'
23 24
    fill_in 'Project url', with: 'http://ci.gitlab.org/projects/3'
    fill_in 'Token', with: 'verySecret'
25 26 27 28
    click_button 'Save'
  end

  Then 'I should see service settings saved' do
29
    find_field('Project url').value.should == 'http://ci.gitlab.org/projects/3'
30
  end
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

  And 'I click hipchat service link' do
    click_link 'Hipchat'
  end

  And 'I fill hipchat settings' do
    check 'Active'
    fill_in 'Room', with: 'gitlab'
    fill_in 'Token', with: 'verySecret'
    click_button 'Save'
  end

  Then 'I should see hipchat service settings saved' do
    find_field('Room').value.should == 'gitlab'
  end

47
end