Splitted the Spinach tests to prevent time-outs

Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
This commit is contained in:
Jeroen van Baarsen 2014-06-04 22:55:27 +02:00
parent a76bf07ae2
commit e84057da1b
28 changed files with 51 additions and 2 deletions

View File

@ -3,12 +3,14 @@ env:
global:
- TRAVIS=true
matrix:
- TASK=spinach DB=mysql
- TASK=spinach_project DB=mysql
- TASK=spinach_other DB=mysql
- TASK=spec:api DB=mysql
- TASK=spec:feature DB=mysql
- TASK=spec:other DB=mysql
- TASK=jasmine:ci DB=mysql
- TASK=spinach DB=postgresql
- TASK=spinach_project DB=postgresql
- TASK=spinach_other DB=postgresql
- TASK=spec:api DB=postgresql
- TASK=spec:feature DB=postgresql
- TASK=spec:other DB=postgresql

View File

@ -1,3 +1,4 @@
@admin
Feature: Admin active tab
Background:
Given I sign in as an admin

View File

@ -1,3 +1,4 @@
@admin
Feature: Admin Broadcast Messages
Background:
Given I sign in as an admin

View File

@ -1,3 +1,4 @@
@admin
Feature: Admin Groups
Background:
Given I sign in as an admin

View File

@ -1,3 +1,4 @@
@admin
Feature: Admin Logs
Background:
Given I sign in as an admin

View File

@ -1,3 +1,4 @@
@admin
Feature: Admin Projects
Background:
Given I sign in as an admin

View File

@ -1,3 +1,4 @@
@admin
Feature: Admin Users
Background:
Given I sign in as an admin

View File

@ -1,3 +1,4 @@
@dashboard
Feature: Dashboard active tab
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@dashboard
Feature: Dashboard with archived projects
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@dashboard
Feature: Dashboard
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@dashboard
Feature: Event filters
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@dashboard
Feature: Help
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@dashboard
Feature: Dashboard Issues
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@dashboard
Feature: Dashboard Merge Requests
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@dashboard
Feature: Dashboard projects
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@dashboard
Feature: Dashboard Search
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@profile
Feature: Profile active tab
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@profile
Feature: Profile Emails
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@profile
Feature: Profile Group
Background:
Given I sign in as "John Doe"

View File

@ -1,3 +1,4 @@
@profile
Feature: Profile Notifications
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@profile
Feature: Profile
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@profile
Feature: Profile SSH Keys
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@public
Feature: Public Projects Feature
Background:
Given public project "Community"

View File

@ -1,3 +1,4 @@
@public
Feature: Public Projects Feature
Background:
Given group "TestGroup" has private project "Enterprise"

View File

@ -1,3 +1,4 @@
@snippets
Feature: Discover Snippets
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@snippets
Feature: Snippets Feature
Background:
Given I sign in as a user

View File

@ -1,3 +1,4 @@
@snippets
Feature: User Snippets
Background:
Given I sign in as a user

View File

@ -6,7 +6,28 @@ task :spinach do
%W(rake gitlab:setup),
%W(spinach),
]
run_commands(cmds)
end
desc "GITLAB | Run project spinach features"
task :spinach_project do
cmds = [
%W(rake gitlab:setup),
%W(spinach --tags ~@admin,~@dashboard,~@profile,~@public,~@snippets),
]
run_commands(cmds)
end
desc "GITLAB | Run other spinach features"
task :spinach_other do
cmds = [
%W(rake gitlab:setup),
%W(spinach --tags @admin,@dashboard,@profile,@public,@snippets),
]
run_commands(cmds)
end
def run_commands(cmds)
cmds.each do |cmd|
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) or raise("#{cmd} failed!")
end