diff --git a/.travis.yml b/.travis.yml index 9bab337f336..c90bba8deea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/features/admin/active_tab.feature b/features/admin/active_tab.feature index 15fcda45e40..b28e16f0d6a 100644 --- a/features/admin/active_tab.feature +++ b/features/admin/active_tab.feature @@ -1,3 +1,4 @@ +@admin Feature: Admin active tab Background: Given I sign in as an admin diff --git a/features/admin/broadcast_messages.feature b/features/admin/broadcast_messages.feature index 5f16120b7cc..b2c3112320a 100644 --- a/features/admin/broadcast_messages.feature +++ b/features/admin/broadcast_messages.feature @@ -1,3 +1,4 @@ +@admin Feature: Admin Broadcast Messages Background: Given I sign in as an admin diff --git a/features/admin/groups.feature b/features/admin/groups.feature index 352c1b3803f..1a465c1be55 100644 --- a/features/admin/groups.feature +++ b/features/admin/groups.feature @@ -1,3 +1,4 @@ +@admin Feature: Admin Groups Background: Given I sign in as an admin diff --git a/features/admin/logs.feature b/features/admin/logs.feature index d07f0048080..ceb3bc34927 100644 --- a/features/admin/logs.feature +++ b/features/admin/logs.feature @@ -1,3 +1,4 @@ +@admin Feature: Admin Logs Background: Given I sign in as an admin diff --git a/features/admin/projects.feature b/features/admin/projects.feature index 4a4ee1c11e0..fb07ccdb352 100644 --- a/features/admin/projects.feature +++ b/features/admin/projects.feature @@ -1,3 +1,4 @@ +@admin Feature: Admin Projects Background: Given I sign in as an admin diff --git a/features/admin/users.feature b/features/admin/users.feature index ce9f32f50d9..ce31aafd290 100644 --- a/features/admin/users.feature +++ b/features/admin/users.feature @@ -1,3 +1,4 @@ +@admin Feature: Admin Users Background: Given I sign in as an admin diff --git a/features/dashboard/active_tab.feature b/features/dashboard/active_tab.feature index 3e1cf5aa0ca..22dfa2f7840 100644 --- a/features/dashboard/active_tab.feature +++ b/features/dashboard/active_tab.feature @@ -1,3 +1,4 @@ +@dashboard Feature: Dashboard active tab Background: Given I sign in as a user diff --git a/features/dashboard/archived_projects.feature b/features/dashboard/archived_projects.feature index 399c9b53d81..e23238d225c 100644 --- a/features/dashboard/archived_projects.feature +++ b/features/dashboard/archived_projects.feature @@ -1,3 +1,4 @@ +@dashboard Feature: Dashboard with archived projects Background: Given I sign in as a user diff --git a/features/dashboard/dashboard.feature b/features/dashboard/dashboard.feature index e249f392de7..bebaa78e46c 100644 --- a/features/dashboard/dashboard.feature +++ b/features/dashboard/dashboard.feature @@ -1,3 +1,4 @@ +@dashboard Feature: Dashboard Background: Given I sign in as a user diff --git a/features/dashboard/event_filters.feature b/features/dashboard/event_filters.feature index e0c6b84b008..41de0ae8317 100644 --- a/features/dashboard/event_filters.feature +++ b/features/dashboard/event_filters.feature @@ -1,3 +1,4 @@ +@dashboard Feature: Event filters Background: Given I sign in as a user diff --git a/features/dashboard/help.feature b/features/dashboard/help.feature index 02ec688f804..56a0a860ab9 100644 --- a/features/dashboard/help.feature +++ b/features/dashboard/help.feature @@ -1,3 +1,4 @@ +@dashboard Feature: Help Background: Given I sign in as a user diff --git a/features/dashboard/issues.feature b/features/dashboard/issues.feature index d316b2d9205..72627e43e05 100644 --- a/features/dashboard/issues.feature +++ b/features/dashboard/issues.feature @@ -1,3 +1,4 @@ +@dashboard Feature: Dashboard Issues Background: Given I sign in as a user diff --git a/features/dashboard/merge_requests.feature b/features/dashboard/merge_requests.feature index de560300735..dcef1290e7e 100644 --- a/features/dashboard/merge_requests.feature +++ b/features/dashboard/merge_requests.feature @@ -1,3 +1,4 @@ +@dashboard Feature: Dashboard Merge Requests Background: Given I sign in as a user diff --git a/features/dashboard/projects.feature b/features/dashboard/projects.feature index 7d8c129face..5214cfc28ef 100644 --- a/features/dashboard/projects.feature +++ b/features/dashboard/projects.feature @@ -1,3 +1,4 @@ +@dashboard Feature: Dashboard projects Background: Given I sign in as a user diff --git a/features/dashboard/search.feature b/features/dashboard/search.feature index 91d870f46f3..24c45028697 100644 --- a/features/dashboard/search.feature +++ b/features/dashboard/search.feature @@ -1,3 +1,4 @@ +@dashboard Feature: Dashboard Search Background: Given I sign in as a user diff --git a/features/profile/active_tab.feature b/features/profile/active_tab.feature index 475641a33ed..a99409d9fd7 100644 --- a/features/profile/active_tab.feature +++ b/features/profile/active_tab.feature @@ -1,3 +1,4 @@ +@profile Feature: Profile active tab Background: Given I sign in as a user diff --git a/features/profile/emails.feature b/features/profile/emails.feature index 148fc766081..19ed949f6ae 100644 --- a/features/profile/emails.feature +++ b/features/profile/emails.feature @@ -1,3 +1,4 @@ +@profile Feature: Profile Emails Background: Given I sign in as a user diff --git a/features/profile/group.feature b/features/profile/group.feature index 70b682e2913..e2fbfde77be 100644 --- a/features/profile/group.feature +++ b/features/profile/group.feature @@ -1,3 +1,4 @@ +@profile Feature: Profile Group Background: Given I sign in as "John Doe" diff --git a/features/profile/notifications.feature b/features/profile/notifications.feature index e7937953c1b..55997d44dec 100644 --- a/features/profile/notifications.feature +++ b/features/profile/notifications.feature @@ -1,3 +1,4 @@ +@profile Feature: Profile Notifications Background: Given I sign in as a user diff --git a/features/profile/profile.feature b/features/profile/profile.feature index 44bb190f624..d2125e013bc 100644 --- a/features/profile/profile.feature +++ b/features/profile/profile.feature @@ -1,3 +1,4 @@ +@profile Feature: Profile Background: Given I sign in as a user diff --git a/features/profile/ssh_keys.feature b/features/profile/ssh_keys.feature index 018d124e412..581503fc5f9 100644 --- a/features/profile/ssh_keys.feature +++ b/features/profile/ssh_keys.feature @@ -1,3 +1,4 @@ +@profile Feature: Profile SSH Keys Background: Given I sign in as a user diff --git a/features/public/projects.feature b/features/public/projects.feature index 57fe834b4bf..c7bb3b4f8ce 100644 --- a/features/public/projects.feature +++ b/features/public/projects.feature @@ -1,3 +1,4 @@ +@public Feature: Public Projects Feature Background: Given public project "Community" diff --git a/features/public/public_groups.feature b/features/public/public_groups.feature index 7f1ec718e35..8bbda8cb6d4 100644 --- a/features/public/public_groups.feature +++ b/features/public/public_groups.feature @@ -1,3 +1,4 @@ +@public Feature: Public Projects Feature Background: Given group "TestGroup" has private project "Enterprise" diff --git a/features/snippets/discover.feature b/features/snippets/discover.feature index d6fd2cd7808..f0b8d3a408a 100644 --- a/features/snippets/discover.feature +++ b/features/snippets/discover.feature @@ -1,3 +1,4 @@ +@snippets Feature: Discover Snippets Background: Given I sign in as a user diff --git a/features/snippets/snippets.feature b/features/snippets/snippets.feature index 1119defa17d..3ee8720ddd5 100644 --- a/features/snippets/snippets.feature +++ b/features/snippets/snippets.feature @@ -1,3 +1,4 @@ +@snippets Feature: Snippets Feature Background: Given I sign in as a user diff --git a/features/snippets/user.feature b/features/snippets/user.feature index 4c8a91501c4..d032a33686b 100644 --- a/features/snippets/user.feature +++ b/features/snippets/user.feature @@ -1,3 +1,4 @@ +@snippets Feature: User Snippets Background: Given I sign in as a user diff --git a/lib/tasks/spinach.rake b/lib/tasks/spinach.rake index dcc7d0fe01c..507b315759d 100644 --- a/lib/tasks/spinach.rake +++ b/lib/tasks/spinach.rake @@ -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