Skip to content

Commit 7bfd38e

Browse files
committed
spinach test: project services
1 parent 9b22f41 commit 7bfd38e

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

features/project/service.feature

+14
Original file line numberDiff line numberDiff line change
@@ -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
+30
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)