Skip to content

Replace all Spinach tests with Rspec feature tests

We decided earlier this year (in #14121 (closed)) to stop writing new Spinach feature tests. I wanted to open an issue about replacing all the Spinach tests with Rspec feature tests where relevant.

Here's a list of all the Spinach test files and how long they took to execute for a randomly chosen commit, it's probably a good idea to start with the fastest/smallest specs first if you want an easy MR:

Updated (2018-03-23)

Here are all current spinach specs sorted by lines of code.

Spec Lines of code Replacement status
features/project/source/browse_files.feature 333 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12251
features/project/merge_requests.feature 324 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14621
features/project/issues/issues.feature 180 Replaced by !17950 (merged)
features/project/source/markdown_render.feature 147 Replaced by !18525 (merged)
features/explore/projects.feature 144 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14755
features/project/active_tab.feature 139 Replaced by !17628 (merged)
features/project/wiki.feature 101 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13856
features/search.feature 96 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14248
features/project/commits/diff_comments.feature 96 Replaced by !18868 (merged)
features/project/commits/commits.feature 96 Replaced by !18743 (merged)
features/explore/groups.feature 93 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16129
features/project/service.feature 87 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14432
features/project/pages.feature 87 Replaced by !17256 (merged)
features/user.feature 86 Replaced by !16598 (merged)
features/project/project.feature 86 Replaced by !18223 (merged)
features/profile/profile.feature 85 Replaced by !17068 (merged)
features/groups.feature 73 Replaced by !17818 (merged)
features/group/members.feature 71 Replaced by !17050 (merged)
features/dashboard/dashboard.feature 70 Replaced by !12876 (merged)
features/project/builds/artifacts.feature 65 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18729
features/project/shortcuts.feature 63 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14431
features/dashboard/event_filters.feature 58 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12651
features/project/builds/permissions.feature 53 Replaced by !18306 (merged)
features/project/forked_merge_requests.feature 51 Replaced by !18867 (merged)
features/project/commits/comments.feature 51 Replaced by !18356 (merged)
features/project/fork.feature 49 Replaced by !17511 (merged)
features/project/issues/labels.feature 48 Replaced by !18126 (merged)
features/group/milestones.feature 48 Replaced by !17051 (merged)
features/project/network_graph.feature 46 Replaced by !17171 (merged)
features/project/deploy_keys.feature 46 Replaced by !18796 (merged)
features/project/issues/award_emoji.feature 45 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14202
features/invites.feature 45 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16126
features/project/find_file.feature 42 Replaced by !18528 (merged)
features/project/commits/branches.feature 42 Replaced by !18302 (merged)
features/project/ff_merge_requests.feature 41 Replaced by !18800 (merged)
features/snippets/snippets.feature 40 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12385
features/project/star.feature 39 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13855
features/project/issues/milestones.feature 39 Replaced by !18300 (merged)
features/project/redirects.feature 38 Replaced by !17676 (merged)
features/project/hooks.feature 37 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11027
features/project/snippets.feature 35 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14326
features/project/issues/references.feature 33 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18769
features/project/graph.feature 33 Replaced by !17675 (merged)
features/project/merge_requests/references.feature 31 Replaced by !18794 (merged)
features/project/commits/revert.feature 31 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14325
features/project/archived.feature 30 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14322
features/dashboard/new_project.feature 30 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12550
features/project/merge_requests/revert.feature 29 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14201
features/profile/active_tab.feature 29 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14239
features/dashboard/todos.feature 28 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12453
features/project/merge_requests/accept.feature 27 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14176
features/project/builds/summary.feature 27 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14177
features/project/badges/build.feature 27 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12966
features/project/team_management.feature 26 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14173
features/profile/emails.feature 26 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14172
features/dashboard/merge_requests.feature 21 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12440
features/project/milestone.feature 16 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14171
features/project/group_links.feature 16 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14169
features/project/commits/user_lookup.feature 16 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13863
features/project/source/search_code.feature 15 Replaced by !13697 (merged)
features/profile/notifications.feature 15 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12345
features/project/create.feature 14 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12343
features/dashboard/starred_projects.feature 12 Replaced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11752

EE-only features:

Spec Lines of code Replacement status
features/admin/license.feature 39 Replaced by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5477
features/group_hooks.feature 37 Replaced by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5515
features/groups_management.feature 23 Replaced by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5516
features/group_active_tab.feature 17 Replaced by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5554
features/admin/emails.feature 17 Replaced by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5513
features/project/issues/weight.feature 11 Replaced by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5194
features/admin/push_rules.feature 9 Replaced by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5512
features/project/elastic/*.feature Replaced by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4983

These should be done one-at-a-time and we should make sure we're not duplicating existing RSpec feature tests.

Some resources to help newcomers get going:

Edited by blackst0ne