Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-09 10:14:05 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-09 10:14:05 +0400
commit7bfd38eaa95988accfc6bb09759d7688126f5692 (patch)
treed3a65a53f4094bc9b5bfe7e5e55d5fb4aebaa8ed /features
parent9b22f41e540b0a27d135c6d5fc4bef08a6e1d9f8 (diff)
spinach test: project services
Diffstat (limited to 'features')
-rw-r--r--features/project/service.feature14
-rw-r--r--features/steps/project/project_services.rb30
2 files changed, 44 insertions, 0 deletions
diff --git a/features/project/service.feature b/features/project/service.feature
new file mode 100644
index 00000000000..ca8a4756056
--- /dev/null
+++ b/features/project/service.feature
@@ -0,0 +1,14 @@
+Feature: Project Services
+ Background:
+ Given I sign in as a user
+ And I own project "Shop"
+
+ Scenario: I should see project services
+ When I visit project "Shop" services page
+ Then I should see list of available services
+
+ Scenario: Activate gitlab-ci service
+ When I visit project "Shop" services page
+ And I click gitlab-ci service link
+ And I fill gitlab-ci settings
+ Then I should see service settings saved
diff --git a/features/steps/project/project_services.rb b/features/steps/project/project_services.rb
new file mode 100644
index 00000000000..b1668ff7207
--- /dev/null
+++ b/features/steps/project/project_services.rb
@@ -0,0 +1,30 @@
+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'
+ page.should have_content 'Jenkins'
+ 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'
+ fill_in 'Project URL', with: 'http://ci.gitlab.org/projects/3'
+ fill_in 'CI Project token', with: 'verySecret'
+ click_button 'Save'
+ end
+
+ Then 'I should see service settings saved' do
+ find_field('Project URL').value.should == 'http://ci.gitlab.org/projects/3'
+ end
+end