Commit 7bfd38eaa95988accfc6bb09759d7688126f5692
1 parent
9b22f41e
Exists in
master
and in
4 other branches
spinach test: project services
Showing
2 changed files
with
44 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,14 @@ | @@ -0,0 +1,14 @@ | ||
1 | +Feature: Project Services | ||
2 | + Background: | ||
3 | + Given I sign in as a user | ||
4 | + And I own project "Shop" | ||
5 | + | ||
6 | + Scenario: I should see project services | ||
7 | + When I visit project "Shop" services page | ||
8 | + Then I should see list of available services | ||
9 | + | ||
10 | + Scenario: Activate gitlab-ci service | ||
11 | + When I visit project "Shop" services page | ||
12 | + And I click gitlab-ci service link | ||
13 | + And I fill gitlab-ci settings | ||
14 | + Then I should see service settings saved |
@@ -0,0 +1,30 @@ | @@ -0,0 +1,30 @@ | ||
1 | +class ProjectServices < Spinach::FeatureSteps | ||
2 | + include SharedAuthentication | ||
3 | + include SharedProject | ||
4 | + include SharedPaths | ||
5 | + | ||
6 | + When 'I visit project "Shop" services page' do | ||
7 | + visit project_services_path(@project) | ||
8 | + end | ||
9 | + | ||
10 | + Then 'I should see list of available services' do | ||
11 | + page.should have_content 'Services' | ||
12 | + page.should have_content 'Jenkins' | ||
13 | + page.should have_content 'GitLab CI' | ||
14 | + end | ||
15 | + | ||
16 | + And 'I click gitlab-ci service link' do | ||
17 | + click_link 'GitLab CI' | ||
18 | + end | ||
19 | + | ||
20 | + And 'I fill gitlab-ci settings' do | ||
21 | + check 'Active' | ||
22 | + fill_in 'Project URL', with: 'http://ci.gitlab.org/projects/3' | ||
23 | + fill_in 'CI Project token', with: 'verySecret' | ||
24 | + click_button 'Save' | ||
25 | + end | ||
26 | + | ||
27 | + Then 'I should see service settings saved' do | ||
28 | + find_field('Project URL').value.should == 'http://ci.gitlab.org/projects/3' | ||
29 | + end | ||
30 | +end |