diff --git a/.travis.yml b/.travis.yml index 9bab337f33..c90bba8dee 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 15fcda45e4..b28e16f0d6 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 5f16120b7c..b2c3112320 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 352c1b3803..1a465c1be5 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 d07f004808..ceb3bc3492 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 4a4ee1c11e..fb07ccdb35 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 ce9f32f50d..ce31aafd29 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 3e1cf5aa0c..22dfa2f784 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 399c9b53d8..e23238d225 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 e249f392de..bebaa78e46 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 e0c6b84b00..41de0ae831 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 02ec688f80..56a0a860ab 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 d316b2d920..72627e43e0 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 de56030073..dcef1290e7 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 7d8c129fac..5214cfc28e 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 91d870f46f..24c4502869 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 475641a33e..a99409d9fd 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 148fc76608..19ed949f6a 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 70b682e291..e2fbfde77b 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 e7937953c1..55997d44de 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 44bb190f62..d2125e013b 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 018d124e41..581503fc5f 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 57fe834b4b..c7bb3b4f8c 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 7f1ec718e3..8bbda8cb6d 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 d6fd2cd780..f0b8d3a408 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 1119defa17..3ee8720ddd 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 4c8a91501c..d032a33686 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 dcc7d0fe01..507b315759 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