summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2018-07-05 06:32:05 +0000
committerRémy Coutable <remy@rymai.me>2018-07-05 06:32:05 +0000
commit3db2f327594e134729a0ca2f48a748bb28ab7d6c (patch)
tree661033b988897aaf506c0deaf457c2002e17d51b /spec/features
parentbaab4cddb091c0aa9649fecc340b8b343747ba83 (diff)
downloadgitlab-ce-3db2f327594e134729a0ca2f48a748bb28ab7d6c.tar.gz
Enable Capybara/FeatureMethods cop
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/abuse_report_spec.rb4
-rw-r--r--spec/features/admin/admin_appearance_spec.rb18
-rw-r--r--spec/features/admin/admin_broadcast_messages_spec.rb12
-rw-r--r--spec/features/admin/admin_browse_spam_logs_spec.rb2
-rw-r--r--spec/features/admin/admin_cohorts_spec.rb4
-rw-r--r--spec/features/admin/admin_disables_git_access_protocol_spec.rb16
-rw-r--r--spec/features/admin/admin_disables_two_factor_spec.rb6
-rw-r--r--spec/features/admin/admin_groups_spec.rb12
-rw-r--r--spec/features/admin/admin_health_check_spec.rb2
-rw-r--r--spec/features/admin/admin_hook_logs_spec.rb8
-rw-r--r--spec/features/admin/admin_settings_spec.rb44
-rw-r--r--spec/features/admin/admin_uses_repository_checks_spec.rb8
-rw-r--r--spec/features/calendar_spec.rb2
-rw-r--r--spec/features/container_registry_spec.rb8
-rw-r--r--spec/features/cycle_analytics_spec.rb2
-rw-r--r--spec/features/dashboard/activity_spec.rb16
-rw-r--r--spec/features/dashboard/datetime_on_tooltips_spec.rb2
-rw-r--r--spec/features/dashboard/groups_list_spec.rb2
-rw-r--r--spec/features/dashboard/issues_filter_spec.rb2
-rw-r--r--spec/features/dashboard/merge_requests_spec.rb2
-rw-r--r--spec/features/dashboard/milestone_filter_spec.rb2
-rw-r--r--spec/features/dashboard/milestones_spec.rb2
-rw-r--r--spec/features/dashboard/project_member_activity_index_spec.rb2
-rw-r--r--spec/features/dashboard/projects_spec.rb4
-rw-r--r--spec/features/dashboard/shortcuts_spec.rb6
-rw-r--r--spec/features/dashboard/todos/target_state_spec.rb12
-rw-r--r--spec/features/dashboard/todos/todos_filtering_spec.rb2
-rw-r--r--spec/features/dashboard/todos/todos_sorting_spec.rb2
-rw-r--r--spec/features/dashboard/todos/todos_spec.rb2
-rw-r--r--spec/features/expand_collapse_diffs_spec.rb2
-rw-r--r--spec/features/explore/new_menu_spec.rb32
-rw-r--r--spec/features/global_search_spec.rb2
-rw-r--r--spec/features/group_variables_spec.rb4
-rw-r--r--spec/features/groups/activity_spec.rb2
-rw-r--r--spec/features/groups/empty_states_spec.rb2
-rw-r--r--spec/features/groups/group_settings_spec.rb32
-rw-r--r--spec/features/groups/issues_spec.rb2
-rw-r--r--spec/features/groups/labels/edit_spec.rb12
-rw-r--r--spec/features/groups/labels/index_spec.rb6
-rw-r--r--spec/features/groups/labels/subscription_spec.rb4
-rw-r--r--spec/features/groups/labels/user_sees_links_to_issuables.rb4
-rw-r--r--spec/features/groups/members/filter_members_spec.rb10
-rw-r--r--spec/features/groups/members/leave_group_spec.rb12
-rw-r--r--spec/features/groups/members/list_members_spec.rb8
-rw-r--r--spec/features/groups/members/manage_members_spec.rb18
-rw-r--r--spec/features/groups/members/master_manages_access_requests_spec.rb2
-rw-r--r--spec/features/groups/members/request_access_spec.rb18
-rw-r--r--spec/features/groups/members/sort_members_spec.rb22
-rw-r--r--spec/features/groups/merge_requests_spec.rb2
-rw-r--r--spec/features/groups/milestone_spec.rb2
-rw-r--r--spec/features/groups/milestones_sorting_spec.rb4
-rw-r--r--spec/features/groups/settings/group_badges_spec.rb2
-rw-r--r--spec/features/groups/share_lock_spec.rb20
-rw-r--r--spec/features/groups/show_spec.rb2
-rw-r--r--spec/features/groups/user_sees_users_dropdowns_in_issuables_list_spec.rb2
-rw-r--r--spec/features/groups_spec.rb2
-rw-r--r--spec/features/issuables/shortcuts_issuable_spec.rb2
-rw-r--r--spec/features/issues/award_spec.rb2
-rw-r--r--spec/features/issues/bulk_assignment_labels_spec.rb2
-rw-r--r--spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb2
-rw-r--r--spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb2
-rw-r--r--spec/features/issues/gfm_autocomplete_spec.rb2
-rw-r--r--spec/features/issues/issue_detail_spec.rb2
-rw-r--r--spec/features/issues/issue_sidebar_spec.rb2
-rw-r--r--spec/features/issues/markdown_toolbar_spec.rb2
-rw-r--r--spec/features/issues/move_spec.rb24
-rw-r--r--spec/features/issues/note_polling_spec.rb2
-rw-r--r--spec/features/issues/todo_spec.rb2
-rw-r--r--spec/features/issues/update_issues_spec.rb2
-rw-r--r--spec/features/issues/user_uses_slash_commands_spec.rb2
-rw-r--r--spec/features/labels_hierarchy_spec.rb2
-rw-r--r--spec/features/merge_request/user_creates_image_diff_notes_spec.rb2
-rw-r--r--spec/features/merge_request/user_resolves_outdated_diff_discussions_spec.rb2
-rw-r--r--spec/features/merge_requests/user_squashes_merge_request_spec.rb2
-rw-r--r--spec/features/milestone_spec.rb28
-rw-r--r--spec/features/oauth_login_spec.rb2
-rw-r--r--spec/features/participants_autocomplete_spec.rb2
-rw-r--r--spec/features/password_reset_spec.rb2
-rw-r--r--spec/features/profiles/account_spec.rb24
-rw-r--r--spec/features/profiles/active_sessions_spec.rb6
-rw-r--r--spec/features/profiles/chat_names_spec.rb26
-rw-r--r--spec/features/profiles/emails_spec.rb14
-rw-r--r--spec/features/profiles/gpg_keys_spec.rb12
-rw-r--r--spec/features/profiles/keys_spec.rb14
-rw-r--r--spec/features/profiles/user_changes_notified_of_own_activity_spec.rb6
-rw-r--r--spec/features/profiles/user_visits_notifications_tab_spec.rb2
-rw-r--r--spec/features/projects/activity/rss_spec.rb2
-rw-r--r--spec/features/projects/activity/user_sees_activity_spec.rb2
-rw-r--r--spec/features/projects/artifacts/file_spec.rb2
-rw-r--r--spec/features/projects/artifacts/raw_spec.rb2
-rw-r--r--spec/features/projects/badges/coverage_spec.rb20
-rw-r--r--spec/features/projects/badges/list_spec.rb10
-rw-r--r--spec/features/projects/badges/pipeline_badge_spec.rb2
-rw-r--r--spec/features/projects/blobs/blob_line_permalink_updater_spec.rb2
-rw-r--r--spec/features/projects/blobs/blob_show_spec.rb2
-rw-r--r--spec/features/projects/blobs/edit_spec.rb2
-rw-r--r--spec/features/projects/blobs/shortcuts_blob_spec.rb2
-rw-r--r--spec/features/projects/blobs/user_creates_new_blob_in_new_project_spec.rb2
-rw-r--r--spec/features/projects/branches/download_buttons_spec.rb18
-rw-r--r--spec/features/projects/clusters/applications_spec.rb6
-rw-r--r--spec/features/projects/clusters/gcp_spec.rb2
-rw-r--r--spec/features/projects/clusters/interchangeability_spec.rb2
-rw-r--r--spec/features/projects/clusters/user_spec.rb2
-rw-r--r--spec/features/projects/clusters_spec.rb2
-rw-r--r--spec/features/projects/commit/builds_spec.rb10
-rw-r--r--spec/features/projects/commit/diff_notes_spec.rb2
-rw-r--r--spec/features/projects/commit/mini_pipeline_graph_spec.rb2
-rw-r--r--spec/features/projects/commits/rss_spec.rb2
-rw-r--r--spec/features/projects/diffs/diff_show_spec.rb2
-rw-r--r--spec/features/projects/environments/environment_metrics_spec.rb18
-rw-r--r--spec/features/projects/environments/environment_spec.rb76
-rw-r--r--spec/features/projects/environments/environments_spec.rb48
-rw-r--r--spec/features/projects/files/template_selector_menu_spec.rb10
-rw-r--r--spec/features/projects/files/user_reads_pipeline_status_spec.rb2
-rw-r--r--spec/features/projects/hook_logs/user_reads_log_spec.rb10
-rw-r--r--spec/features/projects/import_export/export_file_spec.rb6
-rw-r--r--spec/features/projects/import_export/import_file_spec.rb10
-rw-r--r--spec/features/projects/issuable_templates_spec.rb22
-rw-r--r--spec/features/projects/issues/rss_spec.rb2
-rw-r--r--spec/features/projects/jobs_spec.rb8
-rw-r--r--spec/features/projects/labels/issues_sorted_by_priority_spec.rb6
-rw-r--r--spec/features/projects/labels/subscription_spec.rb4
-rw-r--r--spec/features/projects/labels/update_prioritization_spec.rb12
-rw-r--r--spec/features/projects/labels/user_sees_links_to_issuables.rb14
-rw-r--r--spec/features/projects/members/anonymous_user_sees_members_spec.rb6
-rw-r--r--spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb6
-rw-r--r--spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb12
-rw-r--r--spec/features/projects/members/group_members_spec.rb12
-rw-r--r--spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb6
-rw-r--r--spec/features/projects/members/groups_with_access_list_spec.rb14
-rw-r--r--spec/features/projects/members/list_spec.rb16
-rw-r--r--spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb8
-rw-r--r--spec/features/projects/members/master_manages_access_requests_spec.rb2
-rw-r--r--spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb6
-rw-r--r--spec/features/projects/members/member_leaves_project_spec.rb6
-rw-r--r--spec/features/projects/members/owner_cannot_leave_project_spec.rb6
-rw-r--r--spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb6
-rw-r--r--spec/features/projects/members/share_with_group_spec.rb20
-rw-r--r--spec/features/projects/members/sorting_spec.rb22
-rw-r--r--spec/features/projects/members/user_requests_access_spec.rb14
-rw-r--r--spec/features/projects/merge_request_button_spec.rb2
-rw-r--r--spec/features/projects/milestones/milestone_spec.rb2
-rw-r--r--spec/features/projects/milestones/milestones_sorting_spec.rb4
-rw-r--r--spec/features/projects/milestones/new_spec.rb2
-rw-r--r--spec/features/projects/new_project_spec.rb2
-rw-r--r--spec/features/projects/pages_spec.rb36
-rw-r--r--spec/features/projects/pipeline_schedules_spec.rb18
-rw-r--r--spec/features/projects/remote_mirror_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb2
-rw-r--r--spec/features/projects/services/user_activates_slack_slash_command_spec.rb10
-rw-r--r--spec/features/projects/settings/project_badges_spec.rb2
-rw-r--r--spec/features/projects/settings/repository_settings_spec.rb4
-rw-r--r--spec/features/projects/show/developer_views_empty_project_instructions_spec.rb14
-rw-r--r--spec/features/projects/show/download_buttons_spec.rb20
-rw-r--r--spec/features/projects/show/no_password_spec.rb2
-rw-r--r--spec/features/projects/show/rss_spec.rb2
-rw-r--r--spec/features/projects/tags/download_buttons_spec.rb20
-rw-r--r--spec/features/projects/tree/create_directory_spec.rb2
-rw-r--r--spec/features/projects/tree/create_file_spec.rb2
-rw-r--r--spec/features/projects/tree/rss_spec.rb2
-rw-r--r--spec/features/projects/tree/tree_show_spec.rb2
-rw-r--r--spec/features/projects/tree/upload_file_spec.rb2
-rw-r--r--spec/features/projects/user_creates_project_spec.rb2
-rw-r--r--spec/features/projects/wiki/markdown_preview_spec.rb4
-rw-r--r--spec/features/projects/wiki/shortcuts_spec.rb4
-rw-r--r--spec/features/projects/wiki/user_deletes_wiki_page_spec.rb2
-rw-r--r--spec/features/projects/wiki/user_git_access_wiki_page_spec.rb2
-rw-r--r--spec/features/projects_spec.rb2
-rw-r--r--spec/features/protected_branches_spec.rb2
-rw-r--r--spec/features/protected_tags_spec.rb2
-rw-r--r--spec/features/raven_js_spec.rb2
-rw-r--r--spec/features/runners_spec.rb106
-rw-r--r--spec/features/snippets/explore_spec.rb8
-rw-r--r--spec/features/snippets/internal_snippet_spec.rb6
-rw-r--r--spec/features/snippets/public_snippets_spec.rb6
-rw-r--r--spec/features/snippets/search_snippets_spec.rb6
-rw-r--r--spec/features/snippets/show_spec.rb2
-rw-r--r--spec/features/snippets/user_creates_snippet_spec.rb12
-rw-r--r--spec/features/snippets/user_deletes_snippet_spec.rb2
-rw-r--r--spec/features/snippets/user_edits_snippet_spec.rb2
-rw-r--r--spec/features/snippets/user_snippets_spec.rb12
-rw-r--r--spec/features/tags/master_creates_tag_spec.rb14
-rw-r--r--spec/features/tags/master_deletes_tag_spec.rb8
-rw-r--r--spec/features/tags/master_updates_tag_spec.rb8
-rw-r--r--spec/features/tags/master_views_tags_spec.rb14
-rw-r--r--spec/features/task_lists_spec.rb2
-rw-r--r--spec/features/triggers_spec.rb30
-rw-r--r--spec/features/u2f_spec.rb2
-rw-r--r--spec/features/uploads/user_uploads_avatar_to_group_spec.rb4
-rw-r--r--spec/features/uploads/user_uploads_avatar_to_profile_spec.rb6
-rw-r--r--spec/features/uploads/user_uploads_file_to_note_spec.rb4
-rw-r--r--spec/features/users/active_sessions_spec.rb10
-rw-r--r--spec/features/users/login_spec.rb4
-rw-r--r--spec/features/users/rss_spec.rb2
194 files changed, 797 insertions, 791 deletions
diff --git a/spec/features/abuse_report_spec.rb b/spec/features/abuse_report_spec.rb
index 091fdcec3db..eb12eebe8e6 100644
--- a/spec/features/abuse_report_spec.rb
+++ b/spec/features/abuse_report_spec.rb
@@ -1,13 +1,13 @@
require 'spec_helper'
-feature 'Abuse reports' do
+describe 'Abuse reports' do
let(:another_user) { create(:user) }
before do
sign_in(create(:user))
end
- scenario 'Report abuse' do
+ it 'Report abuse' do
visit user_path(another_user)
click_link 'Report abuse'
diff --git a/spec/features/admin/admin_appearance_spec.rb b/spec/features/admin/admin_appearance_spec.rb
index a5e0ac592b9..3c2ae5b3c6a 100644
--- a/spec/features/admin/admin_appearance_spec.rb
+++ b/spec/features/admin/admin_appearance_spec.rb
@@ -1,9 +1,9 @@
require 'spec_helper'
-feature 'Admin Appearance' do
+describe 'Admin Appearance' do
let!(:appearance) { create(:appearance) }
- scenario 'Create new appearance' do
+ it 'Create new appearance' do
sign_in(create(:admin))
visit admin_appearances_path
@@ -21,7 +21,7 @@ feature 'Admin Appearance' do
expect(page).to have_content 'Last edit'
end
- scenario 'Preview sign-in page appearance' do
+ it 'Preview sign-in page appearance' do
sign_in(create(:admin))
visit admin_appearances_path
@@ -30,7 +30,7 @@ feature 'Admin Appearance' do
expect_custom_sign_in_appearance(appearance)
end
- scenario 'Preview new project page appearance' do
+ it 'Preview new project page appearance' do
sign_in(create(:admin))
visit admin_appearances_path
@@ -39,20 +39,20 @@ feature 'Admin Appearance' do
expect_custom_new_project_appearance(appearance)
end
- scenario 'Custom sign-in page' do
+ it 'Custom sign-in page' do
visit new_user_session_path
expect_custom_sign_in_appearance(appearance)
end
- scenario 'Custom new project page' do
+ it 'Custom new project page' do
sign_in create(:user)
visit new_project_path
expect_custom_new_project_appearance(appearance)
end
- scenario 'Appearance logo' do
+ it 'Appearance logo' do
sign_in(create(:admin))
visit admin_appearances_path
@@ -64,7 +64,7 @@ feature 'Admin Appearance' do
expect(page).not_to have_css(logo_selector)
end
- scenario 'Header logos' do
+ it 'Header logos' do
sign_in(create(:admin))
visit admin_appearances_path
@@ -76,7 +76,7 @@ feature 'Admin Appearance' do
expect(page).not_to have_css(header_logo_selector)
end
- scenario 'Favicon' do
+ it 'Favicon' do
sign_in(create(:admin))
visit admin_appearances_path
diff --git a/spec/features/admin/admin_broadcast_messages_spec.rb b/spec/features/admin/admin_broadcast_messages_spec.rb
index 430a8d22b0f..f6dc499df29 100644
--- a/spec/features/admin/admin_broadcast_messages_spec.rb
+++ b/spec/features/admin/admin_broadcast_messages_spec.rb
@@ -1,17 +1,17 @@
require 'spec_helper'
-feature 'Admin Broadcast Messages' do
+describe 'Admin Broadcast Messages' do
before do
sign_in(create(:admin))
create(:broadcast_message, :expired, message: 'Migration to new server')
visit admin_broadcast_messages_path
end
- scenario 'See broadcast messages list' do
+ it 'See broadcast messages list' do
expect(page).to have_content 'Migration to new server'
end
- scenario 'Create a customized broadcast message' do
+ it 'Create a customized broadcast message' do
fill_in 'broadcast_message_message', with: 'Application update from **4:00 CST to 5:00 CST**'
fill_in 'broadcast_message_color', with: '#f2dede'
fill_in 'broadcast_message_font', with: '#b94a48'
@@ -24,7 +24,7 @@ feature 'Admin Broadcast Messages' do
expect(page).to have_selector %(div[style="background-color: #f2dede; color: #b94a48"])
end
- scenario 'Edit an existing broadcast message' do
+ it 'Edit an existing broadcast message' do
click_link 'Edit'
fill_in 'broadcast_message_message', with: 'Application update RIGHT NOW'
click_button 'Update broadcast message'
@@ -33,14 +33,14 @@ feature 'Admin Broadcast Messages' do
expect(page).to have_content 'Application update RIGHT NOW'
end
- scenario 'Remove an existing broadcast message' do
+ it 'Remove an existing broadcast message' do
click_link 'Remove'
expect(current_path).to eq admin_broadcast_messages_path
expect(page).not_to have_content 'Migration to new server'
end
- scenario 'Live preview a customized broadcast message', :js do
+ it 'Live preview a customized broadcast message', :js do
fill_in 'broadcast_message_message', with: "Live **Markdown** previews. :tada:"
page.within('.broadcast-message-preview') do
diff --git a/spec/features/admin/admin_browse_spam_logs_spec.rb b/spec/features/admin/admin_browse_spam_logs_spec.rb
index 31d4142a8e9..4645fde7522 100644
--- a/spec/features/admin/admin_browse_spam_logs_spec.rb
+++ b/spec/features/admin/admin_browse_spam_logs_spec.rb
@@ -7,7 +7,7 @@ describe 'Admin browse spam logs' do
sign_in(create(:admin))
end
- scenario 'Browse spam logs' do
+ it 'Browse spam logs' do
visit admin_spam_logs_path
expect(page).to have_content('Spam Logs')
diff --git a/spec/features/admin/admin_cohorts_spec.rb b/spec/features/admin/admin_cohorts_spec.rb
index bca52bf674c..9dce9494b97 100644
--- a/spec/features/admin/admin_cohorts_spec.rb
+++ b/spec/features/admin/admin_cohorts_spec.rb
@@ -1,11 +1,11 @@
require 'rails_helper'
-feature 'Admin cohorts page' do
+describe 'Admin cohorts page' do
before do
sign_in(create(:admin))
end
- scenario 'See users count per month' do
+ it 'See users count per month' do
2.times { create(:user) }
visit admin_cohorts_path
diff --git a/spec/features/admin/admin_disables_git_access_protocol_spec.rb b/spec/features/admin/admin_disables_git_access_protocol_spec.rb
index 9946cc77d1d..91c22e7ad82 100644
--- a/spec/features/admin/admin_disables_git_access_protocol_spec.rb
+++ b/spec/features/admin/admin_disables_git_access_protocol_spec.rb
@@ -1,22 +1,22 @@
require 'rails_helper'
-feature 'Admin disables Git access protocol' do
+describe 'Admin disables Git access protocol' do
include StubENV
let(:project) { create(:project, :empty_repo) }
let(:admin) { create(:admin) }
- background do
+ before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
sign_in(admin)
end
context 'with HTTP disabled' do
- background do
+ before do
disable_http_protocol
end
- scenario 'shows only SSH url' do
+ it 'shows only SSH url' do
visit_project
expect(page).to have_content("git clone #{project.ssh_url_to_repo}")
@@ -25,11 +25,11 @@ feature 'Admin disables Git access protocol' do
end
context 'with SSH disabled' do
- background do
+ before do
disable_ssh_protocol
end
- scenario 'shows only HTTP url' do
+ it 'shows only HTTP url' do
visit_project
expect(page).to have_content("git clone #{project.http_url_to_repo}")
@@ -38,11 +38,11 @@ feature 'Admin disables Git access protocol' do
end
context 'with nothing disabled' do
- background do
+ before do
create(:personal_key, user: admin)
end
- scenario 'shows default SSH url and protocol selection dropdown' do
+ it 'shows default SSH url and protocol selection dropdown' do
visit_project
expect(page).to have_content("git clone #{project.ssh_url_to_repo}")
diff --git a/spec/features/admin/admin_disables_two_factor_spec.rb b/spec/features/admin/admin_disables_two_factor_spec.rb
index 2abdd3c9ef2..e41835b4f24 100644
--- a/spec/features/admin/admin_disables_two_factor_spec.rb
+++ b/spec/features/admin/admin_disables_two_factor_spec.rb
@@ -1,7 +1,7 @@
require 'rails_helper'
-feature 'Admin disables 2FA for a user' do
- scenario 'successfully', :js do
+describe 'Admin disables 2FA for a user' do
+ it 'successfully', :js do
sign_in(create(:admin))
user = create(:user, :two_factor)
@@ -16,7 +16,7 @@ feature 'Admin disables 2FA for a user' do
end
end
- scenario 'for a user without 2FA enabled' do
+ it 'for a user without 2FA enabled' do
sign_in(create(:admin))
user = create(:user)
diff --git a/spec/features/admin/admin_groups_spec.rb b/spec/features/admin/admin_groups_spec.rb
index a4226d7a682..5b0a53688c2 100644
--- a/spec/features/admin/admin_groups_spec.rb
+++ b/spec/features/admin/admin_groups_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Admin Groups' do
+describe 'Admin Groups' do
include Select2Helper
let(:internal) { Gitlab::VisibilityLevel::INTERNAL }
@@ -47,13 +47,13 @@ feature 'Admin Groups' do
expect(li_texts).to match group_description
end
- scenario 'shows the visibility level radio populated with the default value' do
+ it 'shows the visibility level radio populated with the default value' do
visit new_admin_group_path
expect_selected_visibility(internal)
end
- scenario 'when entered in group path, it auto filled the group name', :js do
+ it 'when entered in group path, it auto filled the group name', :js do
visit admin_groups_path
click_link "New group"
group_path = 'gitlab'
@@ -64,7 +64,7 @@ feature 'Admin Groups' do
end
describe 'show a group' do
- scenario 'shows the group' do
+ it 'shows the group' do
group = create(:group, :private)
visit admin_group_path(group)
@@ -74,7 +74,7 @@ feature 'Admin Groups' do
end
describe 'group edit' do
- scenario 'shows the visibility level radio populated with the group visibility_level value' do
+ it 'shows the visibility level radio populated with the group visibility_level value' do
group = create(:group, :private)
visit admin_group_edit_path(group)
@@ -82,7 +82,7 @@ feature 'Admin Groups' do
expect_selected_visibility(group.visibility_level)
end
- scenario 'edit group path does not change group name', :js do
+ it 'edit group path does not change group name', :js do
group = create(:group, :private)
visit admin_group_edit_path(group)
diff --git a/spec/features/admin/admin_health_check_spec.rb b/spec/features/admin/admin_health_check_spec.rb
index 3693e5882f9..aaa3e8dc821 100644
--- a/spec/features/admin/admin_health_check_spec.rb
+++ b/spec/features/admin/admin_health_check_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature "Admin Health Check", :feature do
+describe "Admin Health Check", :feature do
include StubENV
before do
diff --git a/spec/features/admin/admin_hook_logs_spec.rb b/spec/features/admin/admin_hook_logs_spec.rb
index 710822ac042..928f97b6d29 100644
--- a/spec/features/admin/admin_hook_logs_spec.rb
+++ b/spec/features/admin/admin_hook_logs_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Admin::HookLogs' do
+describe 'Admin::HookLogs' do
let(:project) { create(:project) }
let(:system_hook) { create(:system_hook) }
let(:hook_log) { create(:web_hook_log, web_hook: system_hook, internal_error_message: 'some error') }
@@ -9,7 +9,7 @@ feature 'Admin::HookLogs' do
sign_in(create(:admin))
end
- scenario 'show list of hook logs' do
+ it 'show list of hook logs' do
hook_log
visit edit_admin_hook_path(system_hook)
@@ -17,7 +17,7 @@ feature 'Admin::HookLogs' do
expect(page).to have_content(hook_log.url)
end
- scenario 'show hook log details' do
+ it 'show hook log details' do
hook_log
visit edit_admin_hook_path(system_hook)
click_link 'View details'
@@ -27,7 +27,7 @@ feature 'Admin::HookLogs' do
expect(page).to have_content('Resend Request')
end
- scenario 'retry hook log' do
+ it 'retry hook log' do
WebMock.stub_request(:post, system_hook.url)
hook_log
diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb
index f3ab4ff771a..9c6758abe86 100644
--- a/spec/features/admin/admin_settings_spec.rb
+++ b/spec/features/admin/admin_settings_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Admin updates settings' do
+describe 'Admin updates settings' do
include StubENV
include TermsHelper
@@ -12,7 +12,7 @@ feature 'Admin updates settings' do
visit admin_application_settings_path
end
- scenario 'Change visibility settings' do
+ it 'Change visibility settings' do
page.within('.as-visibility-access') do
choose "application_setting_default_project_visibility_20"
click_button 'Save changes'
@@ -21,7 +21,7 @@ feature 'Admin updates settings' do
expect(page).to have_content "Application settings saved successfully"
end
- scenario 'Uncheck all restricted visibility levels' do
+ it 'Uncheck all restricted visibility levels' do
page.within('.as-visibility-access') do
find('#application_setting_visibility_level_0').set(false)
find('#application_setting_visibility_level_10').set(false)
@@ -35,7 +35,7 @@ feature 'Admin updates settings' do
expect(find('#application_setting_visibility_level_20')).not_to be_checked
end
- scenario 'Modify import sources' do
+ it 'Modify import sources' do
expect(Gitlab::CurrentSettings.import_sources).not_to be_empty
page.within('.as-visibility-access') do
@@ -58,7 +58,7 @@ feature 'Admin updates settings' do
expect(Gitlab::CurrentSettings.import_sources).to eq(['git'])
end
- scenario 'Change Visibility and Access Controls' do
+ it 'Change Visibility and Access Controls' do
page.within('.as-visibility-access') do
uncheck 'Project export enabled'
click_button 'Save changes'
@@ -68,7 +68,7 @@ feature 'Admin updates settings' do
expect(page).to have_content "Application settings saved successfully"
end
- scenario 'Change Account and Limit Settings' do
+ it 'Change Account and Limit Settings' do
page.within('.as-account-limit') do
uncheck 'Gravatar enabled'
click_button 'Save changes'
@@ -78,7 +78,7 @@ feature 'Admin updates settings' do
expect(page).to have_content "Application settings saved successfully"
end
- scenario 'Change Sign-in restrictions' do
+ it 'Change Sign-in restrictions' do
page.within('.as-signin') do
fill_in 'Home page URL', with: 'https://about.gitlab.com/'
click_button 'Save changes'
@@ -88,7 +88,7 @@ feature 'Admin updates settings' do
expect(page).to have_content "Application settings saved successfully"
end
- scenario 'Terms of Service' do
+ it 'Terms of Service' do
# Already have the admin accept terms, so they don't need to accept in this spec.
_existing_terms = create(:term)
accept_terms(admin)
@@ -104,7 +104,7 @@ feature 'Admin updates settings' do
expect(page).to have_content 'Application settings saved successfully'
end
- scenario 'Modify oauth providers' do
+ it 'Modify oauth providers' do
expect(Gitlab::CurrentSettings.disabled_oauth_sign_in_sources).to be_empty
page.within('.as-signin') do
@@ -124,7 +124,7 @@ feature 'Admin updates settings' do
expect(Gitlab::CurrentSettings.disabled_oauth_sign_in_sources).not_to include('google_oauth2')
end
- scenario 'Oauth providers do not raise validation errors when saving unrelated changes' do
+ it 'Oauth providers do not raise validation errors when saving unrelated changes' do
expect(Gitlab::CurrentSettings.disabled_oauth_sign_in_sources).to be_empty
page.within('.as-signin') do
@@ -147,7 +147,7 @@ feature 'Admin updates settings' do
expect(Gitlab::CurrentSettings.disabled_oauth_sign_in_sources).to include('google_oauth2')
end
- scenario 'Change Help page' do
+ it 'Change Help page' do
page.within('.as-help-page') do
fill_in 'Help page text', with: 'Example text'
check 'Hide marketing-related entries from help'
@@ -161,7 +161,7 @@ feature 'Admin updates settings' do
expect(page).to have_content "Application settings saved successfully"
end
- scenario 'Change Pages settings' do
+ it 'Change Pages settings' do
page.within('.as-pages') do
fill_in 'Maximum size of pages (MB)', with: 15
check 'Require users to prove ownership of custom domains'
@@ -173,7 +173,7 @@ feature 'Admin updates settings' do
expect(page).to have_content "Application settings saved successfully"
end
- scenario 'Change CI/CD settings' do
+ it 'Change CI/CD settings' do
page.within('.as-ci-cd') do
check 'Enabled Auto DevOps for projects by default'
fill_in 'Auto devops domain', with: 'domain.com'
@@ -185,7 +185,7 @@ feature 'Admin updates settings' do
expect(page).to have_content "Application settings saved successfully"
end
- scenario 'Change Influx settings' do
+ it 'Change Influx settings' do
page.within('.as-influx') do
check 'Enable InfluxDB Metrics'
click_button 'Save changes'
@@ -195,7 +195,7 @@ feature 'Admin updates settings' do
expect(page).to have_content "Application settings saved successfully"
end
- scenario 'Change Prometheus settings' do
+ it 'Change Prometheus settings' do
page.within('.as-prometheus') do
check 'Enable Prometheus Metrics'
click_button 'Save changes'
@@ -205,7 +205,7 @@ feature 'Admin updates settings' do
expect(page).to have_content "Application settings saved successfully"
end
- scenario 'Change Performance bar settings' do
+ it 'Change Performance bar settings' do
group = create(:group)
page.within('.as-performance-bar') do
@@ -228,7 +228,7 @@ feature 'Admin updates settings' do
expect(find_field('Allowed group').value).to be_nil
end
- scenario 'Change Background jobs settings' do
+ it 'Change Background jobs settings' do
page.within('.as-background') do
fill_in 'Throttling Factor', with: 1
click_button 'Save changes'
@@ -238,7 +238,7 @@ feature 'Admin updates settings' do
expect(page).to have_content "Application settings saved successfully"
end
- scenario 'Change Spam settings' do
+ it 'Change Spam settings' do
page.within('.as-spam') do
check 'Enable reCAPTCHA'
fill_in 'reCAPTCHA Site Key', with: 'key'
@@ -252,7 +252,7 @@ feature 'Admin updates settings' do
expect(Gitlab::CurrentSettings.unique_ips_limit_per_user).to eq(15)
end
- scenario 'Configure web terminal' do
+ it 'Configure web terminal' do
page.within('.as-terminal') do
fill_in 'Max session time', with: 15
click_button 'Save changes'
@@ -262,7 +262,7 @@ feature 'Admin updates settings' do
expect(Gitlab::CurrentSettings.terminal_max_session_time).to eq(15)
end
- scenario 'Enable outbound requests' do
+ it 'Enable outbound requests' do
page.within('.as-outbound') do
check 'Allow requests to the local network from hooks and services'
click_button 'Save changes'
@@ -272,7 +272,7 @@ feature 'Admin updates settings' do
expect(Gitlab::CurrentSettings.allow_local_requests_from_hooks_and_services).to be true
end
- scenario 'Change Slack Notifications Service template settings' do
+ it 'Change Slack Notifications Service template settings' do
first(:link, 'Service Templates').click
click_link 'Slack notifications'
fill_in 'Webhook', with: 'http://localhost'
@@ -296,7 +296,7 @@ feature 'Admin updates settings' do
expect(find('#service_push_channel').value).to eq '#test_channel'
end
- scenario 'Change Keys settings' do
+ it 'Change Keys settings' do
page.within('.as-visibility-access') do
select 'Are forbidden', from: 'RSA SSH keys'
select 'Are allowed', from: 'DSA SSH keys'
diff --git a/spec/features/admin/admin_uses_repository_checks_spec.rb b/spec/features/admin/admin_uses_repository_checks_spec.rb
index 7371a494d36..e658f1b6738 100644
--- a/spec/features/admin/admin_uses_repository_checks_spec.rb
+++ b/spec/features/admin/admin_uses_repository_checks_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Admin uses repository checks' do
+describe 'Admin uses repository checks' do
include StubENV
before do
@@ -8,7 +8,7 @@ feature 'Admin uses repository checks' do
sign_in(create(:admin))
end
- scenario 'to trigger a single check' do
+ it 'to trigger a single check' do
project = create(:project)
visit_admin_project_page(project)
@@ -19,7 +19,7 @@ feature 'Admin uses repository checks' do
expect(page).to have_content('Repository check was triggered')
end
- scenario 'to see a single failed repository check', :js do
+ it 'to see a single failed repository check', :js do
project = create(:project)
project.update_columns(
last_repository_check_failed: true,
@@ -32,7 +32,7 @@ feature 'Admin uses repository checks' do
end
end
- scenario 'to clear all repository checks', :js do
+ it 'to clear all repository checks', :js do
visit admin_application_settings_path
expect(RepositoryCheck::ClearWorker).to receive(:perform_async)
diff --git a/spec/features/calendar_spec.rb b/spec/features/calendar_spec.rb
index 70faf28e09d..f08946b0593 100644
--- a/spec/features/calendar_spec.rb
+++ b/spec/features/calendar_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Contributions Calendar', :js do
+describe 'Contributions Calendar', :js do
let(:user) { create(:user) }
let(:contributed_project) { create(:project, :public, :repository) }
let(:issue_note) { create(:note, project: contributed_project) }
diff --git a/spec/features/container_registry_spec.rb b/spec/features/container_registry_spec.rb
index bef2aa9e0e5..9986206f619 100644
--- a/spec/features/container_registry_spec.rb
+++ b/spec/features/container_registry_spec.rb
@@ -16,7 +16,7 @@ describe "Container Registry", :js do
end
context 'when there are no image repositories' do
- scenario 'user visits container registry main page' do
+ it 'user visits container registry main page' do
visit_container_registry
expect(page).to have_content 'No container images'
@@ -29,13 +29,13 @@ describe "Container Registry", :js do
project.container_repositories << container_repository
end
- scenario 'user wants to see multi-level container repository' do
+ it 'user wants to see multi-level container repository' do
visit_container_registry
expect(page).to have_content('my/image')
end
- scenario 'user removes entire container repository' do
+ it 'user removes entire container repository' do
visit_container_registry
expect_any_instance_of(ContainerRepository)
@@ -44,7 +44,7 @@ describe "Container Registry", :js do
click_on(class: 'js-remove-repo')
end
- scenario 'user removes a specific tag from container repository' do
+ it 'user removes a specific tag from container repository' do
visit_container_registry
find('.js-toggle-repo').click
diff --git a/spec/features/cycle_analytics_spec.rb b/spec/features/cycle_analytics_spec.rb
index ef493db3f11..dfcd7ada23b 100644
--- a/spec/features/cycle_analytics_spec.rb
+++ b/spec/features/cycle_analytics_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Cycle Analytics', :js do
+describe 'Cycle Analytics', :js do
let(:user) { create(:user) }
let(:guest) { create(:user) }
let(:project) { create(:project, :repository) }
diff --git a/spec/features/dashboard/activity_spec.rb b/spec/features/dashboard/activity_spec.rb
index 941208fa244..9ed912820f7 100644
--- a/spec/features/dashboard/activity_spec.rb
+++ b/spec/features/dashboard/activity_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Dashboard > Activity' do
+describe 'Dashboard > Activity' do
let(:user) { create(:user) }
before do
@@ -66,7 +66,7 @@ feature 'Dashboard > Activity' do
wait_for_requests
end
- scenario 'user should see all events' do
+ it 'user should see all events' do
within '.content_list' do
expect(page).to have_content('pushed new branch')
expect(page).to have_content('joined')
@@ -77,7 +77,7 @@ feature 'Dashboard > Activity' do
end
end
- scenario 'user should see only pushed events' do
+ it 'user should see only pushed events' do
click_link('Push events')
wait_for_requests
@@ -90,7 +90,7 @@ feature 'Dashboard > Activity' do
end
end
- scenario 'user should see only merged events' do
+ it 'user should see only merged events' do
click_link('Merge events')
wait_for_requests
@@ -103,7 +103,7 @@ feature 'Dashboard > Activity' do
end
end
- scenario 'user should see only issues events' do
+ it 'user should see only issues events' do
click_link('Issue events')
wait_for_requests
@@ -117,7 +117,7 @@ feature 'Dashboard > Activity' do
end
end
- scenario 'user should see only comments events' do
+ it 'user should see only comments events' do
click_link('Comments')
wait_for_requests
@@ -130,7 +130,7 @@ feature 'Dashboard > Activity' do
end
end
- scenario 'user should see only joined events' do
+ it 'user should see only joined events' do
click_link('Team')
wait_for_requests
@@ -143,7 +143,7 @@ feature 'Dashboard > Activity' do
end
end
- scenario 'user see selected event after page reloading' do
+ it 'user see selected event after page reloading' do
click_link('Push events')
wait_for_requests
visit activity_dashboard_path
diff --git a/spec/features/dashboard/datetime_on_tooltips_spec.rb b/spec/features/dashboard/datetime_on_tooltips_spec.rb
index 089c388636d..28bff4d2821 100644
--- a/spec/features/dashboard/datetime_on_tooltips_spec.rb
+++ b/spec/features/dashboard/datetime_on_tooltips_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Tooltips on .timeago dates', :js do
+describe 'Tooltips on .timeago dates', :js do
let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) }
let(:created_date) { Date.yesterday.to_time }
diff --git a/spec/features/dashboard/groups_list_spec.rb b/spec/features/dashboard/groups_list_spec.rb
index 29280bd6e06..eceb12e91cd 100644
--- a/spec/features/dashboard/groups_list_spec.rb
+++ b/spec/features/dashboard/groups_list_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Dashboard Groups page', :js do
+describe 'Dashboard Groups page', :js do
let(:user) { create :user }
let(:group) { create(:group) }
let(:nested_group) { create(:group, :nested) }
diff --git a/spec/features/dashboard/issues_filter_spec.rb b/spec/features/dashboard/issues_filter_spec.rb
index 8d0b0be1bd4..340262be502 100644
--- a/spec/features/dashboard/issues_filter_spec.rb
+++ b/spec/features/dashboard/issues_filter_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Dashboard Issues filtering', :js do
+describe 'Dashboard Issues filtering', :js do
include Spec::Support::Helpers::Features::SortingHelpers
let(:user) { create(:user) }
diff --git a/spec/features/dashboard/merge_requests_spec.rb b/spec/features/dashboard/merge_requests_spec.rb
index 0965b745c03..46d7a82d468 100644
--- a/spec/features/dashboard/merge_requests_spec.rb
+++ b/spec/features/dashboard/merge_requests_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Dashboard Merge Requests' do
+describe 'Dashboard Merge Requests' do
include Spec::Support::Helpers::Features::SortingHelpers
include FilterItemSelectHelper
include ProjectForksHelper
diff --git a/spec/features/dashboard/milestone_filter_spec.rb b/spec/features/dashboard/milestone_filter_spec.rb
index 8cd57f4f327..00373050aeb 100644
--- a/spec/features/dashboard/milestone_filter_spec.rb
+++ b/spec/features/dashboard/milestone_filter_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Dashboard > milestone filter', :js do
+describe 'Dashboard > milestone filter', :js do
include FilterItemSelectHelper
let(:user) { create(:user) }
diff --git a/spec/features/dashboard/milestones_spec.rb b/spec/features/dashboard/milestones_spec.rb
index 7787772a958..c0699a72521 100644
--- a/spec/features/dashboard/milestones_spec.rb
+++ b/spec/features/dashboard/milestones_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Dashboard > Milestones' do
+describe 'Dashboard > Milestones' do
describe 'as anonymous user' do
before do
visit dashboard_milestones_path
diff --git a/spec/features/dashboard/project_member_activity_index_spec.rb b/spec/features/dashboard/project_member_activity_index_spec.rb
index 6c3093607b0..cfd6329fad0 100644
--- a/spec/features/dashboard/project_member_activity_index_spec.rb
+++ b/spec/features/dashboard/project_member_activity_index_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Project member activity', :js do
+describe 'Project member activity', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :public, name: 'x', namespace: user.namespace) }
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb
index ef2f0b5b31a..46935662288 100644
--- a/spec/features/dashboard/projects_spec.rb
+++ b/spec/features/dashboard/projects_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Dashboard Projects' do
+describe 'Dashboard Projects' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, name: 'awesome stuff') }
let(:project2) { create(:project, :public, name: 'Community project') }
@@ -121,7 +121,7 @@ feature 'Dashboard Projects' do
visit dashboard_projects_path
end
- scenario 'shows "Create merge request" button' do
+ it 'shows "Create merge request" button' do
expect(page).to have_content 'You pushed to feature'
within('#content-body') do
diff --git a/spec/features/dashboard/shortcuts_spec.rb b/spec/features/dashboard/shortcuts_spec.rb
index e41bd7a8419..e5c5ab9c039 100644
--- a/spec/features/dashboard/shortcuts_spec.rb
+++ b/spec/features/dashboard/shortcuts_spec.rb
@@ -1,13 +1,13 @@
require 'spec_helper'
-feature 'Dashboard shortcuts', :js do
+describe 'Dashboard shortcuts', :js do
context 'logged in' do
before do
sign_in(create(:user))
visit root_dashboard_path
end
- scenario 'Navigate to tabs' do
+ it 'Navigate to tabs' do
find('body').send_keys([:shift, 'I'])
check_page_title('Issues')
@@ -31,7 +31,7 @@ feature 'Dashboard shortcuts', :js do
visit explore_root_path
end
- scenario 'Navigate to tabs' do
+ it 'Navigate to tabs' do
find('body').send_keys([:shift, 'G'])
find('.nothing-here-block')
diff --git a/spec/features/dashboard/todos/target_state_spec.rb b/spec/features/dashboard/todos/target_state_spec.rb
index 030a86d1c01..d55c32b3082 100644
--- a/spec/features/dashboard/todos/target_state_spec.rb
+++ b/spec/features/dashboard/todos/target_state_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Dashboard > Todo target states' do
+describe 'Dashboard > Todo target states' do
let(:user) { create(:user) }
let(:author) { create(:user) }
let(:project) { create(:project, :public) }
@@ -9,7 +9,7 @@ feature 'Dashboard > Todo target states' do
sign_in(user)
end
- scenario 'on a closed issue todo has closed label' do
+ it 'on a closed issue todo has closed label' do
issue_closed = create(:issue, state: 'closed')
create_todo issue_closed
visit dashboard_todos_path
@@ -19,7 +19,7 @@ feature 'Dashboard > Todo target states' do
end
end
- scenario 'on an open issue todo does not have an open label' do
+ it 'on an open issue todo does not have an open label' do
issue_open = create(:issue)
create_todo issue_open
visit dashboard_todos_path
@@ -29,7 +29,7 @@ feature 'Dashboard > Todo target states' do
end
end
- scenario 'on a merged merge request todo has merged label' do
+ it 'on a merged merge request todo has merged label' do
mr_merged = create(:merge_request, :simple, :merged, author: user)
create_todo mr_merged
visit dashboard_todos_path
@@ -39,7 +39,7 @@ feature 'Dashboard > Todo target states' do
end
end
- scenario 'on a closed merge request todo has closed label' do
+ it 'on a closed merge request todo has closed label' do
mr_closed = create(:merge_request, :simple, :closed, author: user)
create_todo mr_closed
visit dashboard_todos_path
@@ -49,7 +49,7 @@ feature 'Dashboard > Todo target states' do
end
end
- scenario 'on an open merge request todo does not have an open label' do
+ it 'on an open merge request todo does not have an open label' do
mr_open = create(:merge_request, :simple, author: user)
create_todo mr_open
visit dashboard_todos_path
diff --git a/spec/features/dashboard/todos/todos_filtering_spec.rb b/spec/features/dashboard/todos/todos_filtering_spec.rb
index 7b359b0c651..85f865321cf 100644
--- a/spec/features/dashboard/todos/todos_filtering_spec.rb
+++ b/spec/features/dashboard/todos/todos_filtering_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Dashboard > User filters todos', :js do
+describe 'Dashboard > User filters todos', :js do
let(:user_1) { create(:user, username: 'user_1', name: 'user_1') }
let(:user_2) { create(:user, username: 'user_2', name: 'user_2') }
diff --git a/spec/features/dashboard/todos/todos_sorting_spec.rb b/spec/features/dashboard/todos/todos_sorting_spec.rb
index 10e3ad843fd..b87caaa1c07 100644
--- a/spec/features/dashboard/todos/todos_sorting_spec.rb
+++ b/spec/features/dashboard/todos/todos_sorting_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Dashboard > User sorts todos' do
+describe 'Dashboard > User sorts todos' do
let(:user) { create(:user) }
let(:project) { create(:project) }
diff --git a/spec/features/dashboard/todos/todos_spec.rb b/spec/features/dashboard/todos/todos_spec.rb
index 5ed20b02a6e..96b22a0f64b 100644
--- a/spec/features/dashboard/todos/todos_spec.rb
+++ b/spec/features/dashboard/todos/todos_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Dashboard Todos' do
+describe 'Dashboard Todos' do
let(:user) { create(:user) }
let(:author) { create(:user) }
let(:project) { create(:project, :public) }
diff --git a/spec/features/expand_collapse_diffs_spec.rb b/spec/features/expand_collapse_diffs_spec.rb
index 31862b2e8f4..8d801161148 100644
--- a/spec/features/expand_collapse_diffs_spec.rb
+++ b/spec/features/expand_collapse_diffs_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Expand and collapse diffs', :js do
+describe 'Expand and collapse diffs', :js do
let(:branch) { 'expand-collapse-diffs' }
let(:project) { create(:project, :repository) }
diff --git a/spec/features/explore/new_menu_spec.rb b/spec/features/explore/new_menu_spec.rb
index 2516db5422f..0a88988ea09 100644
--- a/spec/features/explore/new_menu_spec.rb
+++ b/spec/features/explore/new_menu_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Top Plus Menu', :js do
+describe 'Top Plus Menu', :js do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:project) { create(:project, :repository, creator: user, namespace: user.namespace) }
@@ -15,7 +15,7 @@ feature 'Top Plus Menu', :js do
sign_in(user)
end
- scenario 'click on New project shows new project page' do
+ it 'click on New project shows new project page' do
visit root_dashboard_path
click_topmenuitem("New project")
@@ -24,7 +24,7 @@ feature 'Top Plus Menu', :js do
expect(page).to have_content('Project name')
end
- scenario 'click on New group shows new group page' do
+ it 'click on New group shows new group page' do
visit root_dashboard_path
click_topmenuitem("New group")
@@ -33,7 +33,7 @@ feature 'Top Plus Menu', :js do
expect(page).to have_content('Group name')
end
- scenario 'click on New snippet shows new snippet page' do
+ it 'click on New snippet shows new snippet page' do
visit root_dashboard_path
click_topmenuitem("New snippet")
@@ -42,7 +42,7 @@ feature 'Top Plus Menu', :js do
expect(page).to have_content('Title')
end
- scenario 'click on New issue shows new issue page' do
+ it 'click on New issue shows new issue page' do
visit project_path(project)
click_topmenuitem("New issue")
@@ -51,7 +51,7 @@ feature 'Top Plus Menu', :js do
expect(page).to have_content('Title')
end
- scenario 'click on New merge request shows new merge request page' do
+ it 'click on New merge request shows new merge request page' do
visit project_path(project)
click_topmenuitem("New merge request")
@@ -61,7 +61,7 @@ feature 'Top Plus Menu', :js do
expect(page).to have_content('Target branch')
end
- scenario 'click on New project snippet shows new snippet page' do
+ it 'click on New project snippet shows new snippet page' do
visit project_path(project)
page.within '.header-content' do
@@ -74,7 +74,7 @@ feature 'Top Plus Menu', :js do
expect(page).to have_content('Title')
end
- scenario 'Click on New subgroup shows new group page', :nested_groups do
+ it 'Click on New subgroup shows new group page', :nested_groups do
visit group_path(group)
click_topmenuitem("New subgroup")
@@ -83,7 +83,7 @@ feature 'Top Plus Menu', :js do
expect(page).to have_content('Group name')
end
- scenario 'Click on New project in group shows new project page' do
+ it 'Click on New project in group shows new project page' do
visit group_path(group)
page.within '.header-content' do
@@ -107,7 +107,7 @@ feature 'Top Plus Menu', :js do
sign_in(guest_user)
end
- scenario 'click on New issue shows new issue page' do
+ it 'click on New issue shows new issue page' do
visit project_path(project)
click_topmenuitem("New issue")
@@ -116,37 +116,37 @@ feature 'Top Plus Menu', :js do
expect(page).to have_content('Title')
end
- scenario 'has no New merge request menu item' do
+ it 'has no New merge request menu item' do
visit project_path(project)
hasnot_topmenuitem("New merge request")
end
- scenario 'has no New project snippet menu item' do
+ it 'has no New project snippet menu item' do
visit project_path(project)
expect(find('.header-new.dropdown')).not_to have_selector('.header-new-project-snippet')
end
- scenario 'public project has no New merge request menu item' do
+ it 'public project has no New merge request menu item' do
visit project_path(public_project)
hasnot_topmenuitem("New merge request")
end
- scenario 'public project has no New project snippet menu item' do
+ it 'public project has no New project snippet menu item' do
visit project_path(public_project)
expect(find('.header-new.dropdown')).not_to have_selector('.header-new-project-snippet')
end
- scenario 'has no New subgroup menu item' do
+ it 'has no New subgroup menu item' do
visit group_path(group)
hasnot_topmenuitem("New subgroup")
end
- scenario 'has no New project for group menu item' do
+ it 'has no New project for group menu item' do
visit group_path(group)
expect(find('.header-new.dropdown')).not_to have_selector('.header-new-group-project')
diff --git a/spec/features/global_search_spec.rb b/spec/features/global_search_spec.rb
index f8c4db1403c..df64219de99 100644
--- a/spec/features/global_search_spec.rb
+++ b/spec/features/global_search_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Global search' do
+describe 'Global search' do
let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace) }
diff --git a/spec/features/group_variables_spec.rb b/spec/features/group_variables_spec.rb
index f7863807572..5643240377b 100644
--- a/spec/features/group_variables_spec.rb
+++ b/spec/features/group_variables_spec.rb
@@ -1,12 +1,12 @@
require 'spec_helper'
-feature 'Group variables', :js do
+describe 'Group variables', :js do
let(:user) { create(:user) }
let(:group) { create(:group) }
let!(:variable) { create(:ci_group_variable, key: 'test_key', value: 'test value', group: group) }
let(:page_path) { group_settings_ci_cd_path(group) }
- background do
+ before do
group.add_master(user)
gitlab_sign_in(user)
diff --git a/spec/features/groups/activity_spec.rb b/spec/features/groups/activity_spec.rb
index 0d7d3771071..27520cf0e22 100644
--- a/spec/features/groups/activity_spec.rb
+++ b/spec/features/groups/activity_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Group activity page' do
+describe 'Group activity page' do
let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user }
let(:group) { create(:group) }
let(:path) { activity_group_path(group) }
diff --git a/spec/features/groups/empty_states_spec.rb b/spec/features/groups/empty_states_spec.rb
index 5828d833ae9..dd901b034f7 100644
--- a/spec/features/groups/empty_states_spec.rb
+++ b/spec/features/groups/empty_states_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Group empty states' do
+describe 'Group empty states' do
let(:group) { create(:group) }
let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user }
diff --git a/spec/features/groups/group_settings_spec.rb b/spec/features/groups/group_settings_spec.rb
index bf329b0bb94..59254ecc982 100644
--- a/spec/features/groups/group_settings_spec.rb
+++ b/spec/features/groups/group_settings_spec.rb
@@ -1,10 +1,10 @@
require 'spec_helper'
-feature 'Edit group settings' do
- given(:user) { create(:user) }
- given(:group) { create(:group, path: 'foo') }
+describe 'Edit group settings' do
+ let(:user) { create(:user) }
+ let(:group) { create(:group, path: 'foo') }
- background do
+ before do
group.add_owner(user)
sign_in(user)
end
@@ -14,14 +14,14 @@ feature 'Edit group settings' do
let(:old_group_full_path) { "/#{group.path}" }
let(:new_group_full_path) { "/#{new_group_path}" }
- scenario 'the group is accessible via the new path' do
+ it 'the group is accessible via the new path' do
update_path(new_group_path)
visit new_group_full_path
expect(current_path).to eq(new_group_full_path)
expect(find('h1.group-title')).to have_content(group.name)
end
- scenario 'the old group path redirects to the new path' do
+ it 'the old group path redirects to the new path' do
update_path(new_group_path)
visit old_group_full_path
expect(current_path).to eq(new_group_full_path)
@@ -29,18 +29,18 @@ feature 'Edit group settings' do
end
context 'with a subgroup' do
- given!(:subgroup) { create(:group, parent: group, path: 'subgroup') }
- given(:old_subgroup_full_path) { "/#{group.path}/#{subgroup.path}" }
- given(:new_subgroup_full_path) { "/#{new_group_path}/#{subgroup.path}" }
+ let!(:subgroup) { create(:group, parent: group, path: 'subgroup') }
+ let(:old_subgroup_full_path) { "/#{group.path}/#{subgroup.path}" }
+ let(:new_subgroup_full_path) { "/#{new_group_path}/#{subgroup.path}" }
- scenario 'the subgroup is accessible via the new path' do
+ it 'the subgroup is accessible via the new path' do
update_path(new_group_path)
visit new_subgroup_full_path
expect(current_path).to eq(new_subgroup_full_path)
expect(find('h1.group-title')).to have_content(subgroup.name)
end
- scenario 'the old subgroup path redirects to the new path' do
+ it 'the old subgroup path redirects to the new path' do
update_path(new_group_path)
visit old_subgroup_full_path
expect(current_path).to eq(new_subgroup_full_path)
@@ -49,9 +49,9 @@ feature 'Edit group settings' do
end
context 'with a project' do
- given!(:project) { create(:project, group: group) }
- given(:old_project_full_path) { "/#{group.path}/#{project.path}" }
- given(:new_project_full_path) { "/#{new_group_path}/#{project.path}" }
+ let!(:project) { create(:project, group: group) }
+ let(:old_project_full_path) { "/#{group.path}/#{project.path}" }
+ let(:new_project_full_path) { "/#{new_group_path}/#{project.path}" }
before(:context) do
TestEnv.clean_test_path
@@ -61,14 +61,14 @@ feature 'Edit group settings' do
TestEnv.clean_test_path
end
- scenario 'the project is accessible via the new path' do
+ it 'the project is accessible via the new path' do
update_path(new_group_path)
visit new_project_full_path
expect(current_path).to eq(new_project_full_path)
expect(find('.breadcrumbs')).to have_content(project.path)
end
- scenario 'the old project path redirects to the new path' do
+ it 'the old project path redirects to the new path' do
update_path(new_group_path)
visit old_project_full_path
expect(current_path).to eq(new_project_full_path)
diff --git a/spec/features/groups/issues_spec.rb b/spec/features/groups/issues_spec.rb
index e131ded3688..2bab6aa3d48 100644
--- a/spec/features/groups/issues_spec.rb
+++ b/spec/features/groups/issues_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Group issues page' do
+describe 'Group issues page' do
include FilteredSearchHelpers
let(:group) { create(:group) }
diff --git a/spec/features/groups/labels/edit_spec.rb b/spec/features/groups/labels/edit_spec.rb
index fb338127861..7cfc27a8905 100644
--- a/spec/features/groups/labels/edit_spec.rb
+++ b/spec/features/groups/labels/edit_spec.rb
@@ -1,17 +1,17 @@
require 'spec_helper'
-feature 'Edit group label' do
- given(:user) { create(:user) }
- given(:group) { create(:group) }
- given(:label) { create(:group_label, group: group) }
+describe 'Edit group label' do
+ let(:user) { create(:user) }
+ let(:group) { create(:group) }
+ let(:label) { create(:group_label, group: group) }
- background do
+ before do
group.add_owner(user)
sign_in(user)
visit edit_group_label_path(group, label)
end
- scenario 'update label with new title' do
+ it 'update label with new title' do
fill_in 'label_title', with: 'new label name'
click_button 'Save changes'
diff --git a/spec/features/groups/labels/index_spec.rb b/spec/features/groups/labels/index_spec.rb
index 6c1b43a9013..0ce7dad4040 100644
--- a/spec/features/groups/labels/index_spec.rb
+++ b/spec/features/groups/labels/index_spec.rb
@@ -1,17 +1,17 @@
require 'spec_helper'
-feature 'Group labels' do
+describe 'Group labels' do
let(:user) { create(:user) }
let(:group) { create(:group) }
let!(:label) { create(:group_label, group: group) }
- background do
+ before do
group.add_owner(user)
sign_in(user)
visit group_labels_path(group)
end
- scenario 'label has edit button', :js do
+ it 'label has edit button', :js do
expect(page).to have_selector('.label-action.edit')
end
end
diff --git a/spec/features/groups/labels/subscription_spec.rb b/spec/features/groups/labels/subscription_spec.rb
index 2e06caf98f6..d9543bfa97f 100644
--- a/spec/features/groups/labels/subscription_spec.rb
+++ b/spec/features/groups/labels/subscription_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Labels subscription' do
+describe 'Labels subscription' do
let(:user) { create(:user) }
let(:group) { create(:group) }
let!(:feature) { create(:group_label, group: group, title: 'feature') }
@@ -11,7 +11,7 @@ feature 'Labels subscription' do
gitlab_sign_in user
end
- scenario 'users can subscribe/unsubscribe to group labels', :js do
+ it 'users can subscribe/unsubscribe to group labels', :js do
visit group_labels_path(group)
expect(page).to have_content('feature')
diff --git a/spec/features/groups/labels/user_sees_links_to_issuables.rb b/spec/features/groups/labels/user_sees_links_to_issuables.rb
index 5d6290d2109..1fdba78fa6c 100644
--- a/spec/features/groups/labels/user_sees_links_to_issuables.rb
+++ b/spec/features/groups/labels/user_sees_links_to_issuables.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Groups > Labels > User sees links to issuables' do
+describe 'Groups > Labels > User sees links to issuables' do
set(:group) { create(:group, :public) }
before do
@@ -8,7 +8,7 @@ feature 'Groups > Labels > User sees links to issuables' do
visit group_labels_path(group)
end
- scenario 'shows links to MRs and issues' do
+ it 'shows links to MRs and issues' do
expect(page).to have_link('view merge requests')
expect(page).to have_link('view open issues')
end
diff --git a/spec/features/groups/members/filter_members_spec.rb b/spec/features/groups/members/filter_members_spec.rb
index 5ddb5894624..8b4f6dbcc50 100644
--- a/spec/features/groups/members/filter_members_spec.rb
+++ b/spec/features/groups/members/filter_members_spec.rb
@@ -1,18 +1,18 @@
require 'spec_helper'
-feature 'Groups > Members > Filter members' do
+describe 'Groups > Members > Filter members' do
let(:user) { create(:user) }
let(:user_with_2fa) { create(:user, :two_factor_via_otp) }
let(:group) { create(:group) }
- background do
+ before do
group.add_owner(user)
group.add_master(user_with_2fa)
sign_in(user)
end
- scenario 'shows all members' do
+ it 'shows all members' do
visit_members_list
expect(first_member).to include(user.name)
@@ -20,7 +20,7 @@ feature 'Groups > Members > Filter members' do
expect(page).to have_css('.member-filter-2fa-dropdown .dropdown-toggle-text', text: '2FA: Everyone')
end
- scenario 'shows only 2FA members' do
+ it 'shows only 2FA members' do
visit_members_list(two_factor: 'enabled')
expect(first_member).to include(user_with_2fa.name)
@@ -28,7 +28,7 @@ feature 'Groups > Members > Filter members' do
expect(page).to have_css('.member-filter-2fa-dropdown .dropdown-toggle-text', text: '2FA: Enabled')
end
- scenario 'shows only non 2FA members' do
+ it 'shows only non 2FA members' do
visit_members_list(two_factor: 'disabled')
expect(first_member).to include(user.name)
diff --git a/spec/features/groups/members/leave_group_spec.rb b/spec/features/groups/members/leave_group_spec.rb
index 067a2dc850f..7a91c64d7db 100644
--- a/spec/features/groups/members/leave_group_spec.rb
+++ b/spec/features/groups/members/leave_group_spec.rb
@@ -1,15 +1,15 @@
require 'spec_helper'
-feature 'Groups > Members > Leave group' do
+describe 'Groups > Members > Leave group' do
let(:user) { create(:user) }
let(:other_user) { create(:user) }
let(:group) { create(:group) }
- background do
+ before do
gitlab_sign_in(user)
end
- scenario 'guest leaves the group' do
+ it 'guest leaves the group' do
group.add_guest(user)
group.add_owner(other_user)
@@ -21,7 +21,7 @@ feature 'Groups > Members > Leave group' do
expect(group.users).not_to include(user)
end
- scenario 'guest leaves the group as last member' do
+ it 'guest leaves the group as last member' do
group.add_guest(user)
visit group_path(group)
@@ -32,7 +32,7 @@ feature 'Groups > Members > Leave group' do
expect(group.users).not_to include(user)
end
- scenario 'owner leaves the group if they is not the last owner' do
+ it 'owner leaves the group if they is not the last owner' do
group.add_owner(user)
group.add_owner(other_user)
@@ -44,7 +44,7 @@ feature 'Groups > Members > Leave group' do
expect(group.users).not_to include(user)
end
- scenario 'owner can not leave the group if they is a last owner' do
+ it 'owner can not leave the group if they is a last owner' do
group.add_owner(user)
visit group_path(group)
diff --git a/spec/features/groups/members/list_members_spec.rb b/spec/features/groups/members/list_members_spec.rb
index 5c5d48c3623..33f93fcc470 100644
--- a/spec/features/groups/members/list_members_spec.rb
+++ b/spec/features/groups/members/list_members_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Groups > Members > List members' do
+describe 'Groups > Members > List members' do
include Select2Helper
let(:user1) { create(:user, name: 'John Doe') }
@@ -8,11 +8,11 @@ feature 'Groups > Members > List members' do
let(:group) { create(:group) }
let(:nested_group) { create(:group, parent: group) }
- background do
+ before do
gitlab_sign_in(user1)
end
- scenario 'show members from current group and parent', :nested_groups do
+ it 'show members from current group and parent', :nested_groups do
group.add_developer(user1)
nested_group.add_developer(user2)
@@ -22,7 +22,7 @@ feature 'Groups > Members > List members' do
expect(second_row.text).to include(user2.name)
end
- scenario 'show user once if member of both current group and parent', :nested_groups do
+ it 'show user once if member of both current group and parent', :nested_groups do
group.add_developer(user1)
nested_group.add_developer(user1)
diff --git a/spec/features/groups/members/manage_members_spec.rb b/spec/features/groups/members/manage_members_spec.rb
index 21f7b4999ad..0eda2c7f26d 100644
--- a/spec/features/groups/members/manage_members_spec.rb
+++ b/spec/features/groups/members/manage_members_spec.rb
@@ -1,17 +1,17 @@
require 'spec_helper'
-feature 'Groups > Members > Manage members' do
+describe 'Groups > Members > Manage members' do
include Select2Helper
let(:user1) { create(:user, name: 'John Doe') }
let(:user2) { create(:user, name: 'Mary Jane') }
let(:group) { create(:group) }
- background do
+ before do
sign_in(user1)
end
- scenario 'update user to owner level', :js do
+ it 'update user to owner level', :js do
group.add_owner(user1)
group.add_developer(user2)
@@ -25,7 +25,7 @@ feature 'Groups > Members > Manage members' do
end
end
- scenario 'add user to group', :js do
+ it 'add user to group', :js do
group.add_owner(user1)
visit group_group_members_path(group)
@@ -38,7 +38,7 @@ feature 'Groups > Members > Manage members' do
end
end
- scenario 'do not disclose email addresses', :js do
+ it 'do not disclose email addresses', :js do
group.add_owner(user1)
create(:user, email: 'undisclosed_email@gitlab.com', name: "Jane 'invisible' Doe")
@@ -59,7 +59,7 @@ feature 'Groups > Members > Manage members' do
expect(page).to have_content("Jane 'invisible' Doe")
end
- scenario 'remove user from group', :js do
+ it 'remove user from group', :js do
group.add_owner(user1)
group.add_developer(user2)
@@ -75,7 +75,7 @@ feature 'Groups > Members > Manage members' do
expect(group.users).not_to include(user2)
end
- scenario 'add yourself to group when already an owner', :js do
+ it 'add yourself to group when already an owner', :js do
group.add_owner(user1)
visit group_group_members_path(group)
@@ -88,7 +88,7 @@ feature 'Groups > Members > Manage members' do
end
end
- scenario 'invite user to group', :js do
+ it 'invite user to group', :js do
group.add_owner(user1)
visit group_group_members_path(group)
@@ -102,7 +102,7 @@ feature 'Groups > Members > Manage members' do
end
end
- scenario 'guest can not manage other users' do
+ it 'guest can not manage other users' do
group.add_guest(user1)
group.add_developer(user2)
diff --git a/spec/features/groups/members/master_manages_access_requests_spec.rb b/spec/features/groups/members/master_manages_access_requests_spec.rb
index 2fd6d1ec599..4fdf1497781 100644
--- a/spec/features/groups/members/master_manages_access_requests_spec.rb
+++ b/spec/features/groups/members/master_manages_access_requests_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Groups > Members > Master manages access requests' do
+describe 'Groups > Members > Master manages access requests' do
it_behaves_like 'Master manages access requests' do
let(:entity) { create(:group, :public, :access_requestable) }
let(:members_page_path) { group_group_members_path(entity) }
diff --git a/spec/features/groups/members/request_access_spec.rb b/spec/features/groups/members/request_access_spec.rb
index 10389a74703..1c833c36a61 100644
--- a/spec/features/groups/members/request_access_spec.rb
+++ b/spec/features/groups/members/request_access_spec.rb
@@ -1,25 +1,25 @@
require 'spec_helper'
-feature 'Groups > Members > Request access' do
+describe 'Groups > Members > Request access' do
let(:user) { create(:user) }
let(:owner) { create(:user) }
let(:group) { create(:group, :public, :access_requestable) }
let!(:project) { create(:project, :private, namespace: group) }
- background do
+ before do
group.add_owner(owner)
sign_in(user)
visit group_path(group)
end
- scenario 'request access feature is disabled' do
+ it 'request access feature is disabled' do
group.update_attributes(request_access_enabled: false)
visit group_path(group)
expect(page).not_to have_content 'Request Access'
end
- scenario 'user can request access to a group' do
+ it 'user can request access to a group' do
perform_enqueued_jobs { click_link 'Request Access' }
expect(ActionMailer::Base.deliveries.last.to).to eq [owner.notification_email]
@@ -32,13 +32,13 @@ feature 'Groups > Members > Request access' do
expect(page).not_to have_content 'Leave group'
end
- scenario 'user does not see private projects' do
+ it 'user does not see private projects' do
perform_enqueued_jobs { click_link 'Request Access' }
expect(page).not_to have_content project.name
end
- scenario 'user does not see group in the Dashboard > Groups page' do
+ it 'user does not see group in the Dashboard > Groups page' do
perform_enqueued_jobs { click_link 'Request Access' }
visit dashboard_groups_path
@@ -46,7 +46,7 @@ feature 'Groups > Members > Request access' do
expect(page).not_to have_content group.name
end
- scenario 'user is not listed in the group members page' do
+ it 'user is not listed in the group members page' do
click_link 'Request Access'
expect(group.requesters.exists?(user_id: user)).to be_truthy
@@ -58,7 +58,7 @@ feature 'Groups > Members > Request access' do
end
end
- scenario 'user can withdraw its request for access' do
+ it 'user can withdraw its request for access' do
click_link 'Request Access'
expect(group.requesters.exists?(user_id: user)).to be_truthy
@@ -69,7 +69,7 @@ feature 'Groups > Members > Request access' do
expect(page).to have_content 'Your access request to the group has been withdrawn.'
end
- scenario 'member does not see the request access button' do
+ it 'member does not see the request access button' do
group.add_owner(user)
visit group_path(group)
diff --git a/spec/features/groups/members/sort_members_spec.rb b/spec/features/groups/members/sort_members_spec.rb
index e175ad04f86..ee32f6d77fe 100644
--- a/spec/features/groups/members/sort_members_spec.rb
+++ b/spec/features/groups/members/sort_members_spec.rb
@@ -1,18 +1,18 @@
require 'spec_helper'
-feature 'Groups > Members > Sort members' do
+describe 'Groups > Members > Sort members' do
let(:owner) { create(:user, name: 'John Doe') }
let(:developer) { create(:user, name: 'Mary Jane', last_sign_in_at: 5.days.ago) }
let(:group) { create(:group) }
- background do
+ before do
create(:group_member, :owner, user: owner, group: group, created_at: 5.days.ago)
create(:group_member, :developer, user: developer, group: group, created_at: 3.days.ago)
sign_in(owner)
end
- scenario 'sorts alphabetically by default' do
+ it 'sorts alphabetically by default' do
visit_members_list(sort: nil)
expect(first_member).to include(owner.name)
@@ -20,7 +20,7 @@ feature 'Groups > Members > Sort members' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, ascending')
end
- scenario 'sorts by access level ascending' do
+ it 'sorts by access level ascending' do
visit_members_list(sort: :access_level_asc)
expect(first_member).to include(developer.name)
@@ -28,7 +28,7 @@ feature 'Groups > Members > Sort members' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Access level, ascending')
end
- scenario 'sorts by access level descending' do
+ it 'sorts by access level descending' do
visit_members_list(sort: :access_level_desc)
expect(first_member).to include(owner.name)
@@ -36,7 +36,7 @@ feature 'Groups > Members > Sort members' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Access level, descending')
end
- scenario 'sorts by last joined' do
+ it 'sorts by last joined' do
visit_members_list(sort: :last_joined)
expect(first_member).to include(developer.name)
@@ -44,7 +44,7 @@ feature 'Groups > Members > Sort members' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Last joined')
end
- scenario 'sorts by oldest joined' do
+ it 'sorts by oldest joined' do
visit_members_list(sort: :oldest_joined)
expect(first_member).to include(owner.name)
@@ -52,7 +52,7 @@ feature 'Groups > Members > Sort members' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Oldest joined')
end
- scenario 'sorts by name ascending' do
+ it 'sorts by name ascending' do
visit_members_list(sort: :name_asc)
expect(first_member).to include(owner.name)
@@ -60,7 +60,7 @@ feature 'Groups > Members > Sort members' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, ascending')
end
- scenario 'sorts by name descending' do
+ it 'sorts by name descending' do
visit_members_list(sort: :name_desc)
expect(first_member).to include(developer.name)
@@ -68,7 +68,7 @@ feature 'Groups > Members > Sort members' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, descending')
end
- scenario 'sorts by recent sign in', :clean_gitlab_redis_shared_state do
+ it 'sorts by recent sign in', :clean_gitlab_redis_shared_state do
visit_members_list(sort: :recent_sign_in)
expect(first_member).to include(owner.name)
@@ -76,7 +76,7 @@ feature 'Groups > Members > Sort members' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Recent sign in')
end
- scenario 'sorts by oldest sign in', :clean_gitlab_redis_shared_state do
+ it 'sorts by oldest sign in', :clean_gitlab_redis_shared_state do
visit_members_list(sort: :oldest_sign_in)
expect(first_member).to include(developer.name)
diff --git a/spec/features/groups/merge_requests_spec.rb b/spec/features/groups/merge_requests_spec.rb
index 921a447f6ee..54a8016c157 100644
--- a/spec/features/groups/merge_requests_spec.rb
+++ b/spec/features/groups/merge_requests_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Group merge requests page' do
+describe 'Group merge requests page' do
include FilteredSearchHelpers
let(:path) { merge_requests_group_path(group) }
diff --git a/spec/features/groups/milestone_spec.rb b/spec/features/groups/milestone_spec.rb
index 2108d763028..5ab03cb6ee6 100644
--- a/spec/features/groups/milestone_spec.rb
+++ b/spec/features/groups/milestone_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Group milestones' do
+describe 'Group milestones' do
let(:group) { create(:group) }
let!(:project) { create(:project_empty_repo, group: group) }
let(:user) { create(:group_member, :master, user: create(:user), group: group ).user }
diff --git a/spec/features/groups/milestones_sorting_spec.rb b/spec/features/groups/milestones_sorting_spec.rb
index a0fe40cf1d3..5deb55bc8bb 100644
--- a/spec/features/groups/milestones_sorting_spec.rb
+++ b/spec/features/groups/milestones_sorting_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Milestones sorting', :js do
+describe 'Milestones sorting', :js do
let(:group) { create(:group) }
let!(:project) { create(:project_empty_repo, group: group) }
let!(:other_project) { create(:project_empty_repo, group: group) }
@@ -15,7 +15,7 @@ feature 'Milestones sorting', :js do
sign_in(user)
end
- scenario 'visit group milestones and sort by due_date_asc' do
+ it 'visit group milestones and sort by due_date_asc' do
visit group_milestones_path(group)
expect(page).to have_button('Due soon')
diff --git a/spec/features/groups/settings/group_badges_spec.rb b/spec/features/groups/settings/group_badges_spec.rb
index a99da4a119b..070a4a31ffa 100644
--- a/spec/features/groups/settings/group_badges_spec.rb
+++ b/spec/features/groups/settings/group_badges_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Group Badges' do
+describe 'Group Badges' do
include WaitForRequests
let(:user) { create(:user) }
diff --git a/spec/features/groups/share_lock_spec.rb b/spec/features/groups/share_lock_spec.rb
index cefbc15e068..5bbe77019ca 100644
--- a/spec/features/groups/share_lock_spec.rb
+++ b/spec/features/groups/share_lock_spec.rb
@@ -1,19 +1,19 @@
require 'spec_helper'
-feature 'Group share with group lock' do
- given(:root_owner) { create(:user) }
- given(:root_group) { create(:group) }
+describe 'Group share with group lock' do
+ let(:root_owner) { create(:user) }
+ let(:root_group) { create(:group) }
- background do
+ before do
root_group.add_owner(root_owner)
sign_in(root_owner)
end
context 'with a subgroup', :nested_groups do
- given!(:subgroup) { create(:group, parent: root_group) }
+ let!(:subgroup) { create(:group, parent: root_group) }
context 'when enabling the parent group share with group lock' do
- scenario 'the subgroup share with group lock becomes enabled' do
+ it 'the subgroup share with group lock becomes enabled' do
visit edit_group_path(root_group)
enable_group_lock
@@ -23,14 +23,14 @@ feature 'Group share with group lock' do
end
context 'when disabling the parent group share with group lock (which was already enabled)' do
- background do
+ before do
visit edit_group_path(root_group)
enable_group_lock
end
context 'and the subgroup share with group lock is enabled' do
- scenario 'the subgroup share with group lock does not change' do
+ it 'the subgroup share with group lock does not change' do
visit edit_group_path(root_group)
disable_group_lock
@@ -40,13 +40,13 @@ feature 'Group share with group lock' do
end
context 'but the subgroup share with group lock is disabled' do
- background do
+ before do
visit edit_group_path(subgroup)
disable_group_lock
end
- scenario 'the subgroup share with group lock does not change' do
+ it 'the subgroup share with group lock does not change' do
visit edit_group_path(root_group)
disable_group_lock
diff --git a/spec/features/groups/show_spec.rb b/spec/features/groups/show_spec.rb
index b7a7aa0e174..ac961e98a61 100644
--- a/spec/features/groups/show_spec.rb
+++ b/spec/features/groups/show_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Group show page' do
+describe 'Group show page' do
let(:group) { create(:group) }
let(:path) { group_path(group) }
diff --git a/spec/features/groups/user_sees_users_dropdowns_in_issuables_list_spec.rb b/spec/features/groups/user_sees_users_dropdowns_in_issuables_list_spec.rb
index 5ed4f3ad2bc..6d6f206d761 100644
--- a/spec/features/groups/user_sees_users_dropdowns_in_issuables_list_spec.rb
+++ b/spec/features/groups/user_sees_users_dropdowns_in_issuables_list_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Groups > User sees users dropdowns in issuables list' do
+describe 'Groups > User sees users dropdowns in issuables list' do
let(:entity) { create(:group) }
let(:user_in_dropdown) { create(:user) }
let!(:user_not_in_dropdown) { create(:user) }
diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb
index 236768b5d7f..053e3b189c3 100644
--- a/spec/features/groups_spec.rb
+++ b/spec/features/groups_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Group' do
+describe 'Group' do
before do
sign_in(create(:admin))
end
diff --git a/spec/features/issuables/shortcuts_issuable_spec.rb b/spec/features/issuables/shortcuts_issuable_spec.rb
index 0a19086ffbd..a0ae6720a9f 100644
--- a/spec/features/issuables/shortcuts_issuable_spec.rb
+++ b/spec/features/issuables/shortcuts_issuable_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Blob shortcuts', :js do
+describe 'Blob shortcuts', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :public, :repository) }
let(:issue) { create(:issue, project: project, author: user) }
diff --git a/spec/features/issues/award_spec.rb b/spec/features/issues/award_spec.rb
index ddb69d414da..e53a4ce49c7 100644
--- a/spec/features/issues/award_spec.rb
+++ b/spec/features/issues/award_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Issue awards', :js do
+describe 'Issue awards', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :public) }
let(:issue) { create(:issue, project: project) }
diff --git a/spec/features/issues/bulk_assignment_labels_spec.rb b/spec/features/issues/bulk_assignment_labels_spec.rb
index cf283119f36..44ddc032656 100644
--- a/spec/features/issues/bulk_assignment_labels_spec.rb
+++ b/spec/features/issues/bulk_assignment_labels_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Issues > Labels bulk assignment' do
+describe 'Issues > Labels bulk assignment' do
let(:user) { create(:user) }
let!(:project) { create(:project) }
let!(:issue1) { create(:issue, project: project, title: "Issue 1") }
diff --git a/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb b/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb
index 52962002c33..32c6ac52f92 100644
--- a/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb
+++ b/spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Resolving all open discussions in a merge request from an issue', :js do
+describe 'Resolving all open discussions in a merge request from an issue', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
let(:merge_request) { create(:merge_request, source_project: project) }
diff --git a/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb b/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb
index 9170f9295f0..b8222283a98 100644
--- a/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb
+++ b/spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Resolve an open discussion in a merge request by creating an issue', :js do
+describe 'Resolve an open discussion in a merge request by creating an issue', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, only_allow_merge_if_all_discussions_are_resolved: true) }
let(:merge_request) { create(:merge_request, source_project: project) }
diff --git a/spec/features/issues/gfm_autocomplete_spec.rb b/spec/features/issues/gfm_autocomplete_spec.rb
index f2624f55c86..a330ba4c8b3 100644
--- a/spec/features/issues/gfm_autocomplete_spec.rb
+++ b/spec/features/issues/gfm_autocomplete_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'GFM autocomplete', :js do
+describe 'GFM autocomplete', :js do
let(:user) { create(:user, name: '💃speciąl someone💃', username: 'someone.special') }
let(:project) { create(:project) }
let(:label) { create(:label, project: project, title: 'special+') }
diff --git a/spec/features/issues/issue_detail_spec.rb b/spec/features/issues/issue_detail_spec.rb
index babb0285590..088ab114df3 100644
--- a/spec/features/issues/issue_detail_spec.rb
+++ b/spec/features/issues/issue_detail_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Issue Detail', :js do
+describe 'Issue Detail', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :public) }
let(:issue) { create(:issue, project: project, author: user) }
diff --git a/spec/features/issues/issue_sidebar_spec.rb b/spec/features/issues/issue_sidebar_spec.rb
index 830c794376d..b4cb3835a13 100644
--- a/spec/features/issues/issue_sidebar_spec.rb
+++ b/spec/features/issues/issue_sidebar_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Issue Sidebar' do
+describe 'Issue Sidebar' do
include MobileHelpers
let(:group) { create(:group, :nested) }
diff --git a/spec/features/issues/markdown_toolbar_spec.rb b/spec/features/issues/markdown_toolbar_spec.rb
index fee8fd9b365..042ecdb172a 100644
--- a/spec/features/issues/markdown_toolbar_spec.rb
+++ b/spec/features/issues/markdown_toolbar_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Issue markdown toolbar', :js do
+describe 'Issue markdown toolbar', :js do
let(:project) { create(:project, :public) }
let(:issue) { create(:issue, project: project) }
let(:user) { create(:user) }
diff --git a/spec/features/issues/move_spec.rb b/spec/features/issues/move_spec.rb
index 3c01ff345fc..2abc50b04e4 100644
--- a/spec/features/issues/move_spec.rb
+++ b/spec/features/issues/move_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'issue move to another project' do
+describe 'issue move to another project' do
let(:user) { create(:user) }
let(:old_project) { create(:project, :repository) }
let(:text) { 'Some issue description' }
@@ -9,16 +9,18 @@ feature 'issue move to another project' do
create(:issue, description: text, project: old_project, author: user)
end
- background { sign_in(user) }
+ before do
+ sign_in(user)
+ end
context 'user does not have permission to move issue' do
- background do
+ before do
old_project.add_guest(user)
visit issue_path(issue)
end
- scenario 'moving issue to another project not allowed' do
+ it 'moving issue to another project not allowed' do
expect(page).to have_no_selector('.js-sidebar-move-issue-block')
end
end
@@ -30,14 +32,14 @@ feature 'issue move to another project' do
let(:text) { "Text with #{mr.to_reference}" }
let(:cross_reference) { old_project.to_reference(new_project) }
- background do
+ before do
old_project.add_reporter(user)
new_project.add_reporter(user)
visit issue_path(issue)
end
- scenario 'moving issue to another project', :js do
+ it 'moving issue to another project', :js do
find('.js-move-issue').click
wait_for_requests
all('.js-move-issue-dropdown-item')[0].click
@@ -49,7 +51,7 @@ feature 'issue move to another project' do
expect(page.current_path).to include project_path(new_project)
end
- scenario 'searching project dropdown', :js do
+ it 'searching project dropdown', :js do
new_project_search.add_reporter(user)
find('.js-move-issue').click
@@ -66,9 +68,11 @@ feature 'issue move to another project' do
context 'user does not have permission to move the issue to a project', :js do
let!(:private_project) { create(:project, :private) }
let(:another_project) { create(:project) }
- background { another_project.add_guest(user) }
+ before do
+ another_project.add_guest(user)
+ end
- scenario 'browsing projects in projects select' do
+ it 'browsing projects in projects select' do
find('.js-move-issue').click
wait_for_requests
@@ -84,7 +88,7 @@ feature 'issue move to another project' do
create(:issue, project: old_project, author: user, moved_to: new_issue)
end
- scenario 'user wants to move issue that has already been moved' do
+ it 'user wants to move issue that has already been moved' do
expect(page).to have_no_selector('#move_to_project_id')
end
end
diff --git a/spec/features/issues/note_polling_spec.rb b/spec/features/issues/note_polling_spec.rb
index 793572851da..3cd7ce6dada 100644
--- a/spec/features/issues/note_polling_spec.rb
+++ b/spec/features/issues/note_polling_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Issue notes polling', :js do
+describe 'Issue notes polling', :js do
include NoteInteractionHelpers
let(:project) { create(:project, :public) }
diff --git a/spec/features/issues/todo_spec.rb b/spec/features/issues/todo_spec.rb
index 4a44ec302fc..d23f9059d0f 100644
--- a/spec/features/issues/todo_spec.rb
+++ b/spec/features/issues/todo_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Manually create a todo item from issue', :js do
+describe 'Manually create a todo item from issue', :js do
let!(:project) { create(:project) }
let!(:issue) { create(:issue, project: project) }
let!(:user) { create(:user)}
diff --git a/spec/features/issues/update_issues_spec.rb b/spec/features/issues/update_issues_spec.rb
index 7d6edc171f8..cd6a5977eb8 100644
--- a/spec/features/issues/update_issues_spec.rb
+++ b/spec/features/issues/update_issues_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Multiple issue updating from issues#index', :js do
+describe 'Multiple issue updating from issues#index', :js do
let!(:project) { create(:project) }
let!(:issue) { create(:issue, project: project) }
let!(:user) { create(:user)}
diff --git a/spec/features/issues/user_uses_slash_commands_spec.rb b/spec/features/issues/user_uses_slash_commands_spec.rb
index 17818beb947..a28378b22ca 100644
--- a/spec/features/issues/user_uses_slash_commands_spec.rb
+++ b/spec/features/issues/user_uses_slash_commands_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Issues > User uses quick actions', :js do
+describe 'Issues > User uses quick actions', :js do
include Spec::Support::Helpers::Features::NotesHelpers
it_behaves_like 'issuable record that supports quick actions in its description and notes', :issue do
diff --git a/spec/features/labels_hierarchy_spec.rb b/spec/features/labels_hierarchy_spec.rb
index 5573148f8bc..6f917f522bc 100644
--- a/spec/features/labels_hierarchy_spec.rb
+++ b/spec/features/labels_hierarchy_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Labels Hierarchy', :js, :nested_groups do
+describe 'Labels Hierarchy', :js, :nested_groups do
include FilteredSearchHelpers
let!(:user) { create(:user) }
diff --git a/spec/features/merge_request/user_creates_image_diff_notes_spec.rb b/spec/features/merge_request/user_creates_image_diff_notes_spec.rb
index 728e89db400..f0d38dc6a0c 100644
--- a/spec/features/merge_request/user_creates_image_diff_notes_spec.rb
+++ b/spec/features/merge_request/user_creates_image_diff_notes_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Merge request > User creates image diff notes', :js do
+describe 'Merge request > User creates image diff notes', :js do
include NoteInteractionHelpers
let(:project) { create(:project, :public, :repository) }
diff --git a/spec/features/merge_request/user_resolves_outdated_diff_discussions_spec.rb b/spec/features/merge_request/user_resolves_outdated_diff_discussions_spec.rb
index fdf9a84e997..777464ef841 100644
--- a/spec/features/merge_request/user_resolves_outdated_diff_discussions_spec.rb
+++ b/spec/features/merge_request/user_resolves_outdated_diff_discussions_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Merge request > User resolves outdated diff discussions', :js do
+describe 'Merge request > User resolves outdated diff discussions', :js do
let(:project) { create(:project, :repository, :public) }
let(:merge_request) do
diff --git a/spec/features/merge_requests/user_squashes_merge_request_spec.rb b/spec/features/merge_requests/user_squashes_merge_request_spec.rb
index 6c952791591..da3d6772eeb 100644
--- a/spec/features/merge_requests/user_squashes_merge_request_spec.rb
+++ b/spec/features/merge_requests/user_squashes_merge_request_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'User squashes a merge request', :js do
+describe 'User squashes a merge request', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
let(:source_branch) { 'csv' }
diff --git a/spec/features/milestone_spec.rb b/spec/features/milestone_spec.rb
index b0db6870ddf..b12aba2c263 100644
--- a/spec/features/milestone_spec.rb
+++ b/spec/features/milestone_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Milestone' do
+describe 'Milestone' do
let(:group) { create(:group, :public) }
let(:project) { create(:project, :public, namespace: group) }
let(:user) { create(:user) }
@@ -11,8 +11,8 @@ feature 'Milestone' do
sign_in(user)
end
- feature 'Create a milestone' do
- scenario 'shows an informative message for a new milestone' do
+ describe 'Create a milestone' do
+ it 'shows an informative message for a new milestone' do
visit new_project_milestone_path(project)
page.within '.milestone-form' do
@@ -28,8 +28,8 @@ feature 'Milestone' do
end
end
- feature 'Open a milestone with closed issues' do
- scenario 'shows an informative message' do
+ describe 'Open a milestone with closed issues' do
+ it 'shows an informative message' do
milestone = create(:milestone, project: project, title: 8.7)
create(:issue, title: "Bugfix1", project: project, milestone: milestone, state: "closed")
@@ -39,8 +39,8 @@ feature 'Milestone' do
end
end
- feature 'Open a project milestone with an existing title' do
- scenario 'displays validation message when there is a project milestone with same title' do
+ describe 'Open a project milestone with an existing title' do
+ it 'displays validation message when there is a project milestone with same title' do
milestone = create(:milestone, project: project, title: 8.7)
visit new_project_milestone_path(project)
@@ -52,7 +52,7 @@ feature 'Milestone' do
expect(find('.alert-danger')).to have_content('already being used for another group or project milestone.')
end
- scenario 'displays validation message when there is a group milestone with same title' do
+ it 'displays validation message when there is a group milestone with same title' do
milestone = create(:milestone, project_id: nil, group: project.group, title: 8.7)
visit new_group_milestone_path(project.group)
@@ -66,8 +66,8 @@ feature 'Milestone' do
end
end
- feature 'Open a milestone', :js do
- scenario 'shows total issue time spent correctly when no time has been logged' do
+ describe 'Open a milestone', :js do
+ it 'shows total issue time spent correctly when no time has been logged' do
milestone = create(:milestone, project: project, title: 8.7)
visit project_milestone_path(project, milestone)
@@ -79,7 +79,7 @@ feature 'Milestone' do
end
end
- scenario 'shows total issue time spent' do
+ it 'shows total issue time spent' do
milestone = create(:milestone, project: project, title: 8.7)
issue1 = create(:issue, project: project, milestone: milestone)
issue2 = create(:issue, project: project, milestone: milestone)
@@ -98,8 +98,8 @@ feature 'Milestone' do
end
end
- feature 'Deleting a milestone' do
- scenario "The delete milestone button does not show for unauthorized users" do
+ describe 'Deleting a milestone' do
+ it "The delete milestone button does not show for unauthorized users" do
create(:milestone, project: project, title: 8.7)
sign_out(user)
@@ -109,7 +109,7 @@ feature 'Milestone' do
end
end
- feature 'deprecation popover', :js do
+ describe 'deprecation popover', :js do
it 'opens deprecation popover' do
milestone = create(:milestone, project: project)
diff --git a/spec/features/oauth_login_spec.rb b/spec/features/oauth_login_spec.rb
index 013cdaa6479..f4105730402 100644
--- a/spec/features/oauth_login_spec.rb
+++ b/spec/features/oauth_login_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'OAuth Login', :js, :allow_forgery_protection do
+describe 'OAuth Login', :js, :allow_forgery_protection do
include DeviseHelpers
def enter_code(code)
diff --git a/spec/features/participants_autocomplete_spec.rb b/spec/features/participants_autocomplete_spec.rb
index b3bb8c48b4a..134731a4639 100644
--- a/spec/features/participants_autocomplete_spec.rb
+++ b/spec/features/participants_autocomplete_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Member autocomplete', :js do
+describe 'Member autocomplete', :js do
let(:project) { create(:project, :public) }
let(:user) { create(:user) }
let(:author) { create(:user) }
diff --git a/spec/features/password_reset_spec.rb b/spec/features/password_reset_spec.rb
index 73a526c3d8a..dcc63dff9f5 100644
--- a/spec/features/password_reset_spec.rb
+++ b/spec/features/password_reset_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Password reset' do
+describe 'Password reset' do
describe 'throttling' do
it 'sends reset instructions when not previously sent' do
user = create(:user)
diff --git a/spec/features/profiles/account_spec.rb b/spec/features/profiles/account_spec.rb
index 95947d2f111..90d0e9bb77c 100644
--- a/spec/features/profiles/account_spec.rb
+++ b/spec/features/profiles/account_spec.rb
@@ -1,25 +1,25 @@
require 'rails_helper'
-feature 'Profile > Account', :js do
- given(:user) { create(:user, username: 'foo') }
+describe 'Profile > Account', :js do
+ let(:user) { create(:user, username: 'foo') }
before do
sign_in(user)
end
describe 'Change username' do
- given(:new_username) { 'bar' }
- given(:new_user_path) { "/#{new_username}" }
- given(:old_user_path) { "/#{user.username}" }
+ let(:new_username) { 'bar' }
+ let(:new_user_path) { "/#{new_username}" }
+ let(:old_user_path) { "/#{user.username}" }
- scenario 'the user is accessible via the new path' do
+ it 'the user is accessible via the new path' do
update_username(new_username)
visit new_user_path
expect(current_path).to eq(new_user_path)
expect(find('.user-info')).to have_content(new_username)
end
- scenario 'the old user path redirects to the new path' do
+ it 'the old user path redirects to the new path' do
update_username(new_username)
visit old_user_path
expect(current_path).to eq(new_user_path)
@@ -27,9 +27,9 @@ feature 'Profile > Account', :js do
end
context 'with a project' do
- given!(:project) { create(:project, namespace: user.namespace) }
- given(:new_project_path) { "/#{new_username}/#{project.path}" }
- given(:old_project_path) { "/#{user.username}/#{project.path}" }
+ let!(:project) { create(:project, namespace: user.namespace) }
+ let(:new_project_path) { "/#{new_username}/#{project.path}" }
+ let(:old_project_path) { "/#{user.username}/#{project.path}" }
before(:context) do
TestEnv.clean_test_path
@@ -39,14 +39,14 @@ feature 'Profile > Account', :js do
TestEnv.clean_test_path
end
- scenario 'the project is accessible via the new path' do
+ it 'the project is accessible via the new path' do
update_username(new_username)
visit new_project_path
expect(current_path).to eq(new_project_path)
expect(find('.breadcrumbs-sub-title')).to have_content('Details')
end
- scenario 'the old project path redirects to the new path' do
+ it 'the old project path redirects to the new path' do
update_username(new_username)
visit old_project_path
expect(current_path).to eq(new_project_path)
diff --git a/spec/features/profiles/active_sessions_spec.rb b/spec/features/profiles/active_sessions_spec.rb
index 4045cfd21c4..d3050760c06 100644
--- a/spec/features/profiles/active_sessions_spec.rb
+++ b/spec/features/profiles/active_sessions_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Profile > Active Sessions', :clean_gitlab_redis_shared_state do
+describe 'Profile > Active Sessions', :clean_gitlab_redis_shared_state do
let(:user) do
create(:user).tap do |user|
user.current_sign_in_at = Time.current
@@ -13,7 +13,7 @@ feature 'Profile > Active Sessions', :clean_gitlab_redis_shared_state do
end
end
- scenario 'User sees their active sessions' do
+ it 'User sees their active sessions' do
Capybara::Session.new(:session1)
Capybara::Session.new(:session2)
@@ -60,7 +60,7 @@ feature 'Profile > Active Sessions', :clean_gitlab_redis_shared_state do
end
end
- scenario 'User can revoke a session', :js, :redis_session_store do
+ it 'User can revoke a session', :js, :redis_session_store do
Capybara::Session.new(:session1)
Capybara::Session.new(:session2)
diff --git a/spec/features/profiles/chat_names_spec.rb b/spec/features/profiles/chat_names_spec.rb
index 5c959acbbc9..c72069f6262 100644
--- a/spec/features/profiles/chat_names_spec.rb
+++ b/spec/features/profiles/chat_names_spec.rb
@@ -1,19 +1,19 @@
require 'rails_helper'
-feature 'Profile > Chat' do
- given(:user) { create(:user) }
- given(:service) { create(:service) }
+describe 'Profile > Chat' do
+ let(:user) { create(:user) }
+ let(:service) { create(:service) }
before do
sign_in(user)
end
describe 'uses authorization link' do
- given(:params) do
+ let(:params) do
{ team_id: 'T00', team_domain: 'my_chat_team', user_id: 'U01', user_name: 'my_chat_user' }
end
- given!(:authorize_url) { ChatNames::AuthorizeUserService.new(service, params).execute }
- given(:authorize_path) { URI.parse(authorize_url).request_uri }
+ let!(:authorize_url) { ChatNames::AuthorizeUserService.new(service, params).execute }
+ let(:authorize_path) { URI.parse(authorize_url).request_uri }
before do
visit authorize_path
@@ -24,13 +24,13 @@ feature 'Profile > Chat' do
click_button 'Authorize'
end
- scenario 'goes to list of chat names and see chat account' do
+ it 'goes to list of chat names and see chat account' do
expect(page.current_path).to eq(profile_chat_names_path)
expect(page).to have_content('my_chat_team')
expect(page).to have_content('my_chat_user')
end
- scenario 'second use of link is denied' do
+ it 'second use of link is denied' do
visit authorize_path
expect(page).to have_gitlab_http_status(:not_found)
@@ -42,13 +42,13 @@ feature 'Profile > Chat' do
click_button 'Deny'
end
- scenario 'goes to list of chat names and do not see chat account' do
+ it 'goes to list of chat names and do not see chat account' do
expect(page.current_path).to eq(profile_chat_names_path)
expect(page).not_to have_content('my_chat_team')
expect(page).not_to have_content('my_chat_user')
end
- scenario 'second use of link is denied' do
+ it 'second use of link is denied' do
visit authorize_path
expect(page).to have_gitlab_http_status(:not_found)
@@ -57,18 +57,18 @@ feature 'Profile > Chat' do
end
describe 'visits chat accounts' do
- given!(:chat_name) { create(:chat_name, user: user, service: service) }
+ let!(:chat_name) { create(:chat_name, user: user, service: service) }
before do
visit profile_chat_names_path
end
- scenario 'sees chat user' do
+ it 'sees chat user' do
expect(page).to have_content(chat_name.team_domain)
expect(page).to have_content(chat_name.chat_name)
end
- scenario 'removes chat account' do
+ it 'removes chat account' do
click_link 'Remove'
expect(page).to have_content("You don't have any active chat names.")
diff --git a/spec/features/profiles/emails_spec.rb b/spec/features/profiles/emails_spec.rb
index 11cc8aae6f3..bc6d54b5ed7 100644
--- a/spec/features/profiles/emails_spec.rb
+++ b/spec/features/profiles/emails_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Profile > Emails' do
+describe 'Profile > Emails' do
let(:user) { create(:user) }
before do
@@ -12,7 +12,7 @@ feature 'Profile > Emails' do
visit profile_emails_path
end
- scenario 'saves the new email' do
+ it 'saves the new email' do
fill_in('Email', with: 'my@email.com')
click_button('Add email address')
@@ -21,7 +21,7 @@ feature 'Profile > Emails' do
expect(page).to have_content('Resend confirmation email')
end
- scenario 'does not add a duplicate email' do
+ it 'does not add a duplicate email' do
fill_in('Email', with: user.email)
click_button('Add email address')
@@ -31,7 +31,7 @@ feature 'Profile > Emails' do
end
end
- scenario 'User removes email' do
+ it 'User removes email' do
user.emails.create(email: 'my@email.com')
visit profile_emails_path
expect(page).to have_content("my@email.com")
@@ -40,7 +40,7 @@ feature 'Profile > Emails' do
expect(page).not_to have_content("my@email.com")
end
- scenario 'User confirms email' do
+ it 'User confirms email' do
email = user.emails.create(email: 'my@email.com')
visit profile_emails_path
expect(page).to have_content("#{email.email} Unverified")
@@ -52,7 +52,7 @@ feature 'Profile > Emails' do
expect(page).to have_content("#{email.email} Verified")
end
- scenario 'User re-sends confirmation email' do
+ it 'User re-sends confirmation email' do
email = user.emails.create(email: 'my@email.com')
visit profile_emails_path
@@ -60,7 +60,7 @@ feature 'Profile > Emails' do
expect(page).to have_content("Confirmation email sent to #{email.email}")
end
- scenario 'old unconfirmed emails show Send Confirmation button' do
+ it 'old unconfirmed emails show Send Confirmation button' do
email = user.emails.create(email: 'my@email.com')
email.update_attribute(:confirmation_sent_at, nil)
visit profile_emails_path
diff --git a/spec/features/profiles/gpg_keys_spec.rb b/spec/features/profiles/gpg_keys_spec.rb
index 59233e92f93..ec3ec795b63 100644
--- a/spec/features/profiles/gpg_keys_spec.rb
+++ b/spec/features/profiles/gpg_keys_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Profile > GPG Keys' do
+describe 'Profile > GPG Keys' do
let(:user) { create(:user, email: GpgHelpers::User2.emails.first) }
before do
@@ -12,7 +12,7 @@ feature 'Profile > GPG Keys' do
visit profile_gpg_keys_path
end
- scenario 'saves the new key' do
+ it 'saves the new key' do
fill_in('Key', with: GpgHelpers::User2.public_key)
click_button('Add key')
@@ -21,7 +21,7 @@ feature 'Profile > GPG Keys' do
expect(page).to have_content(GpgHelpers::User2.fingerprint)
end
- scenario 'with multiple subkeys' do
+ it 'with multiple subkeys' do
fill_in('Key', with: GpgHelpers::User3.public_key)
click_button('Add key')
@@ -34,7 +34,7 @@ feature 'Profile > GPG Keys' do
end
end
- scenario 'User sees their key' do
+ it 'User sees their key' do
create(:gpg_key, user: user, key: GpgHelpers::User2.public_key)
visit profile_gpg_keys_path
@@ -43,7 +43,7 @@ feature 'Profile > GPG Keys' do
expect(page).to have_content(GpgHelpers::User2.fingerprint)
end
- scenario 'User removes a key via the key index' do
+ it 'User removes a key via the key index' do
create(:gpg_key, user: user, key: GpgHelpers::User2.public_key)
visit profile_gpg_keys_path
@@ -52,7 +52,7 @@ feature 'Profile > GPG Keys' do
expect(page).to have_content('Your GPG keys (0)')
end
- scenario 'User revokes a key via the key index' do
+ it 'User revokes a key via the key index' do
gpg_key = create :gpg_key, user: user, key: GpgHelpers::User2.public_key
gpg_signature = create :gpg_signature, gpg_key: gpg_key, verification_status: :verified
diff --git a/spec/features/profiles/keys_spec.rb b/spec/features/profiles/keys_spec.rb
index b04a5422fed..bfb17a56613 100644
--- a/spec/features/profiles/keys_spec.rb
+++ b/spec/features/profiles/keys_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Profile > SSH Keys' do
+describe 'Profile > SSH Keys' do
let(:user) { create(:user) }
before do
@@ -12,13 +12,13 @@ feature 'Profile > SSH Keys' do
visit profile_keys_path
end
- scenario 'auto-populates the title', :js do
+ it 'auto-populates the title', :js do
fill_in('Key', with: attributes_for(:key).fetch(:key))
expect(page).to have_field("Title", with: "dummy@gitlab.com")
end
- scenario 'saves the new key' do
+ it 'saves the new key' do
attrs = attributes_for(:key)
fill_in('Key', with: attrs[:key])
@@ -36,7 +36,7 @@ feature 'Profile > SSH Keys' do
stub_application_setting(rsa_key_restriction: forbidden, ed25519_key_restriction: forbidden)
end
- scenario 'shows a validation error' do
+ it 'shows a validation error' do
attrs = attributes_for(:key)
fill_in('Key', with: attrs[:key])
@@ -48,14 +48,14 @@ feature 'Profile > SSH Keys' do
end
end
- scenario 'User sees their keys' do
+ it 'User sees their keys' do
key = create(:key, user: user)
visit profile_keys_path
expect(page).to have_content(key.title)
end
- scenario 'User removes a key via the key index' do
+ it 'User removes a key via the key index' do
create(:key, user: user)
visit profile_keys_path
@@ -64,7 +64,7 @@ feature 'Profile > SSH Keys' do
expect(page).to have_content('Your SSH keys (0)')
end
- scenario 'User removes a key via its details page' do
+ it 'User removes a key via its details page' do
key = create(:key, user: user)
visit profile_key_path(key)
diff --git a/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb b/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb
index d5fe5bdffc5..f618bc330ea 100644
--- a/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb
+++ b/spec/features/profiles/user_changes_notified_of_own_activity_spec.rb
@@ -1,13 +1,13 @@
require 'spec_helper'
-feature 'Profile > Notifications > User changes notified_of_own_activity setting', :js do
+describe 'Profile > Notifications > User changes notified_of_own_activity setting', :js do
let(:user) { create(:user) }
before do
sign_in(user)
end
- scenario 'User opts into receiving notifications about their own activity' do
+ it 'User opts into receiving notifications about their own activity' do
visit profile_notifications_path
expect(page).not_to have_checked_field('user[notified_of_own_activity]')
@@ -18,7 +18,7 @@ feature 'Profile > Notifications > User changes notified_of_own_activity setting
expect(page).to have_checked_field('user[notified_of_own_activity]')
end
- scenario 'User opts out of receiving notifications about their own activity' do
+ it 'User opts out of receiving notifications about their own activity' do
user.update!(notified_of_own_activity: true)
visit profile_notifications_path
diff --git a/spec/features/profiles/user_visits_notifications_tab_spec.rb b/spec/features/profiles/user_visits_notifications_tab_spec.rb
index 95953fbcfac..689196c2258 100644
--- a/spec/features/profiles/user_visits_notifications_tab_spec.rb
+++ b/spec/features/profiles/user_visits_notifications_tab_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'User visits the notifications tab', :js do
+describe 'User visits the notifications tab', :js do
let(:project) { create(:project) }
let(:user) { create(:user) }
diff --git a/spec/features/projects/activity/rss_spec.rb b/spec/features/projects/activity/rss_spec.rb
index 4ac34adde0e..411134e7b8e 100644
--- a/spec/features/projects/activity/rss_spec.rb
+++ b/spec/features/projects/activity/rss_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Project Activity RSS' do
+describe 'Project Activity RSS' do
let(:project) { create(:project, :public) }
let(:user) { project.owner }
let(:path) { activity_project_path(project) }
diff --git a/spec/features/projects/activity/user_sees_activity_spec.rb b/spec/features/projects/activity/user_sees_activity_spec.rb
index 644a837dc14..e0248911b5f 100644
--- a/spec/features/projects/activity/user_sees_activity_spec.rb
+++ b/spec/features/projects/activity/user_sees_activity_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Projects > Activity > User sees activity' do
+describe 'Projects > Activity > User sees activity' do
let(:project) { create(:project, :repository, :public) }
let(:user) { project.creator }
diff --git a/spec/features/projects/artifacts/file_spec.rb b/spec/features/projects/artifacts/file_spec.rb
index df1d17bdcb7..993d0040434 100644
--- a/spec/features/projects/artifacts/file_spec.rb
+++ b/spec/features/projects/artifacts/file_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Artifact file', :js do
+describe 'Artifact file', :js do
let(:project) { create(:project, :public) }
let(:pipeline) { create(:ci_empty_pipeline, project: project) }
let(:build) { create(:ci_build, :artifacts, pipeline: pipeline) }
diff --git a/spec/features/projects/artifacts/raw_spec.rb b/spec/features/projects/artifacts/raw_spec.rb
index 0bec6e9ad31..d8ee9adda6b 100644
--- a/spec/features/projects/artifacts/raw_spec.rb
+++ b/spec/features/projects/artifacts/raw_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Raw artifact', :js do
+describe 'Raw artifact', :js do
let(:project) { create(:project, :public) }
let(:pipeline) { create(:ci_empty_pipeline, project: project) }
let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) }
diff --git a/spec/features/projects/badges/coverage_spec.rb b/spec/features/projects/badges/coverage_spec.rb
index f51001edcd7..8522ea747fa 100644
--- a/spec/features/projects/badges/coverage_spec.rb
+++ b/spec/features/projects/badges/coverage_spec.rb
@@ -1,16 +1,16 @@
require 'spec_helper'
-feature 'test coverage badge' do
- given!(:user) { create(:user) }
- given!(:project) { create(:project, :private) }
+describe 'test coverage badge' do
+ let!(:user) { create(:user) }
+ let!(:project) { create(:project, :private) }
context 'when user has access to view badge' do
- background do
+ before do
project.add_developer(user)
sign_in(user)
end
- scenario 'user requests coverage badge image for pipeline' do
+ it 'user requests coverage badge image for pipeline' do
create_pipeline do |pipeline|
create_build(pipeline, coverage: 100, name: 'test:1')
create_build(pipeline, coverage: 90, name: 'test:2')
@@ -21,7 +21,7 @@ feature 'test coverage badge' do
expect_coverage_badge('95.00%')
end
- scenario 'user requests coverage badge for specific job' do
+ it 'user requests coverage badge for specific job' do
create_pipeline do |pipeline|
create_build(pipeline, coverage: 50, name: 'test:1')
create_build(pipeline, coverage: 50, name: 'test:2')
@@ -33,7 +33,7 @@ feature 'test coverage badge' do
expect_coverage_badge('85.00%')
end
- scenario 'user requests coverage badge for pipeline without coverage' do
+ it 'user requests coverage badge for pipeline without coverage' do
create_pipeline do |pipeline|
create_build(pipeline, coverage: nil, name: 'test')
end
@@ -45,9 +45,11 @@ feature 'test coverage badge' do
end
context 'when user does not have access to view badge' do
- background { sign_in(user) }
+ before do
+ sign_in(user)
+ end
- scenario 'user requests test coverage badge image' do
+ it 'user requests test coverage badge image' do
show_test_coverage_badge
expect(page).to have_gitlab_http_status(404)
diff --git a/spec/features/projects/badges/list_spec.rb b/spec/features/projects/badges/list_spec.rb
index 0abef4bc447..da87039ad44 100644
--- a/spec/features/projects/badges/list_spec.rb
+++ b/spec/features/projects/badges/list_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
-feature 'list of badges' do
- background do
+describe 'list of badges' do
+ before do
user = create(:user)
project = create(:project, :repository)
project.add_master(user)
@@ -9,7 +9,7 @@ feature 'list of badges' do
visit project_settings_ci_cd_path(project)
end
- scenario 'user wants to see build status badge' do
+ it 'user wants to see build status badge' do
page.within('.pipeline-status') do
expect(page).to have_content 'pipeline status'
expect(page).to have_content 'Markdown'
@@ -24,7 +24,7 @@ feature 'list of badges' do
end
end
- scenario 'user wants to see coverage report badge' do
+ it 'user wants to see coverage report badge' do
page.within('.coverage-report') do
expect(page).to have_content 'coverage report'
expect(page).to have_content 'Markdown'
@@ -39,7 +39,7 @@ feature 'list of badges' do
end
end
- scenario 'user changes current ref of build status badge', :js do
+ it 'user changes current ref of build status badge', :js do
page.within('.pipeline-status') do
first('.js-project-refs-dropdown').click
diff --git a/spec/features/projects/badges/pipeline_badge_spec.rb b/spec/features/projects/badges/pipeline_badge_spec.rb
index b83ea8f4eaa..8c4488b2ca6 100644
--- a/spec/features/projects/badges/pipeline_badge_spec.rb
+++ b/spec/features/projects/badges/pipeline_badge_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Pipeline Badge' do
+describe 'Pipeline Badge' do
set(:project) { create(:project, :repository, :public) }
let(:ref) { project.default_branch }
diff --git a/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb b/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb
index c12e56d2c3f..96f514f4f04 100644
--- a/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb
+++ b/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Blob button line permalinks (BlobLinePermalinkUpdater)', :js do
+describe 'Blob button line permalinks (BlobLinePermalinkUpdater)', :js do
include TreeHelper
let(:project) { create(:project, :public, :repository) }
diff --git a/spec/features/projects/blobs/blob_show_spec.rb b/spec/features/projects/blobs/blob_show_spec.rb
index e7b305925f7..7280d421cea 100644
--- a/spec/features/projects/blobs/blob_show_spec.rb
+++ b/spec/features/projects/blobs/blob_show_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'File blob', :js do
+describe 'File blob', :js do
include MobileHelpers
let(:project) { create(:project, :public, :repository) }
diff --git a/spec/features/projects/blobs/edit_spec.rb b/spec/features/projects/blobs/edit_spec.rb
index 89d3bd24b89..2657f5d999f 100644
--- a/spec/features/projects/blobs/edit_spec.rb
+++ b/spec/features/projects/blobs/edit_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Editing file blob', :js do
+describe 'Editing file blob', :js do
include TreeHelper
let(:project) { create(:project, :public, :repository) }
diff --git a/spec/features/projects/blobs/shortcuts_blob_spec.rb b/spec/features/projects/blobs/shortcuts_blob_spec.rb
index 9f1fef80ab5..aeed38aeb76 100644
--- a/spec/features/projects/blobs/shortcuts_blob_spec.rb
+++ b/spec/features/projects/blobs/shortcuts_blob_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Blob shortcuts' do
+describe 'Blob shortcuts' do
include TreeHelper
let(:project) { create(:project, :public, :repository) }
let(:path) { project.repository.ls_files(project.repository.root_ref)[0] }
diff --git a/spec/features/projects/blobs/user_creates_new_blob_in_new_project_spec.rb b/spec/features/projects/blobs/user_creates_new_blob_in_new_project_spec.rb
index b7d063596c1..0b7988f6335 100644
--- a/spec/features/projects/blobs/user_creates_new_blob_in_new_project_spec.rb
+++ b/spec/features/projects/blobs/user_creates_new_blob_in_new_project_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'User creates blob in new project', :js do
+describe 'User creates blob in new project', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :empty_repo) }
diff --git a/spec/features/projects/branches/download_buttons_spec.rb b/spec/features/projects/branches/download_buttons_spec.rb
index 605298ba8ab..c8dc72a34ec 100644
--- a/spec/features/projects/branches/download_buttons_spec.rb
+++ b/spec/features/projects/branches/download_buttons_spec.rb
@@ -1,12 +1,12 @@
require 'spec_helper'
-feature 'Download buttons in branches page' do
- given(:user) { create(:user) }
- given(:role) { :developer }
- given(:status) { 'success' }
- given(:project) { create(:project, :repository) }
+describe 'Download buttons in branches page' do
+ let(:user) { create(:user) }
+ let(:role) { :developer }
+ let(:status) { 'success' }
+ let(:project) { create(:project, :repository) }
- given(:pipeline) do
+ let(:pipeline) do
create(:ci_pipeline,
project: project,
sha: project.commit('binary-encoding').sha,
@@ -14,14 +14,14 @@ feature 'Download buttons in branches page' do
status: status)
end
- given!(:build) do
+ let!(:build) do
create(:ci_build, :success, :artifacts,
pipeline: pipeline,
status: pipeline.status,
name: 'build')
end
- background do
+ before do
sign_in(user)
project.add_role(user, role)
end
@@ -32,7 +32,7 @@ feature 'Download buttons in branches page' do
visit project_branches_filtered_path(project, state: 'all', search: 'binary-encoding')
end
- scenario 'shows download artifacts button' do
+ it 'shows download artifacts button' do
href = latest_succeeded_project_artifacts_path(project, 'binary-encoding/download', job: 'build')
expect(page).to have_link "Download '#{build.name}'", href: href
diff --git a/spec/features/projects/clusters/applications_spec.rb b/spec/features/projects/clusters/applications_spec.rb
index 7b2c57aa652..f57647a348f 100644
--- a/spec/features/projects/clusters/applications_spec.rb
+++ b/spec/features/projects/clusters/applications_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Clusters Applications', :js do
+describe 'Clusters Applications', :js do
include GoogleApi::CloudPlatformHelpers
let(:project) { create(:project) }
@@ -19,7 +19,7 @@ feature 'Clusters Applications', :js do
context 'when cluster is being created' do
let(:cluster) { create(:cluster, :providing_by_gcp, projects: [project])}
- scenario 'user is unable to install applications' do
+ it 'user is unable to install applications' do
page.within('.js-cluster-application-row-helm') do
expect(page.find(:css, '.js-cluster-application-install-button')['disabled']).to eq('true')
expect(page).to have_css('.js-cluster-application-install-button', exact_text: 'Install')
@@ -30,7 +30,7 @@ feature 'Clusters Applications', :js do
context 'when cluster is created' do
let(:cluster) { create(:cluster, :provided_by_gcp, projects: [project])}
- scenario 'user can install applications' do
+ it 'user can install applications' do
page.within('.js-cluster-application-row-helm') do
expect(page.find(:css, '.js-cluster-application-install-button')['disabled']).to be_nil
expect(page).to have_css('.js-cluster-application-install-button', exact_text: 'Install')
diff --git a/spec/features/projects/clusters/gcp_spec.rb b/spec/features/projects/clusters/gcp_spec.rb
index 19404fb893d..bd8cb9b4b94 100644
--- a/spec/features/projects/clusters/gcp_spec.rb
+++ b/spec/features/projects/clusters/gcp_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Gcp Cluster', :js do
+describe 'Gcp Cluster', :js do
include GoogleApi::CloudPlatformHelpers
let(:project) { create(:project) }
diff --git a/spec/features/projects/clusters/interchangeability_spec.rb b/spec/features/projects/clusters/interchangeability_spec.rb
index 3ddb35c755c..0033e12b6b1 100644
--- a/spec/features/projects/clusters/interchangeability_spec.rb
+++ b/spec/features/projects/clusters/interchangeability_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Interchangeability between KubernetesService and Platform::Kubernetes' do
+describe 'Interchangeability between KubernetesService and Platform::Kubernetes' do
EXCEPT_METHODS = %i[test title description help fields initialize_properties namespace namespace= api_url api_url= deprecated? deprecation_message].freeze
EXCEPT_METHODS_GREP_V = %w[_touched? _changed? _was].freeze
diff --git a/spec/features/projects/clusters/user_spec.rb b/spec/features/projects/clusters/user_spec.rb
index 766ea58cc17..a49dd72a91f 100644
--- a/spec/features/projects/clusters/user_spec.rb
+++ b/spec/features/projects/clusters/user_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'User Cluster', :js do
+describe 'User Cluster', :js do
include GoogleApi::CloudPlatformHelpers
let(:project) { create(:project) }
diff --git a/spec/features/projects/clusters_spec.rb b/spec/features/projects/clusters_spec.rb
index 64241102c8b..a7274c99704 100644
--- a/spec/features/projects/clusters_spec.rb
+++ b/spec/features/projects/clusters_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Clusters', :js do
+describe 'Clusters', :js do
include GoogleApi::CloudPlatformHelpers
let(:project) { create(:project) }
diff --git a/spec/features/projects/commit/builds_spec.rb b/spec/features/projects/commit/builds_spec.rb
index 36a746ac83d..da0552441fe 100644
--- a/spec/features/projects/commit/builds_spec.rb
+++ b/spec/features/projects/commit/builds_spec.rb
@@ -1,22 +1,22 @@
require 'spec_helper'
-feature 'project commit pipelines', :js do
- given(:project) { create(:project, :repository) }
+describe 'project commit pipelines', :js do
+ let(:project) { create(:project, :repository) }
- background do
+ before do
user = create(:user)
project.add_master(user)
sign_in(user)
end
context 'when no builds triggered yet' do
- background do
+ before do
create(:ci_pipeline, project: project,
sha: project.commit.sha,
ref: 'master')
end
- scenario 'user views commit pipelines page' do
+ it 'user views commit pipelines page' do
visit pipelines_project_commit_path(project, project.commit.sha)
page.within('.table-holder') do
diff --git a/spec/features/projects/commit/diff_notes_spec.rb b/spec/features/projects/commit/diff_notes_spec.rb
index 4dbfc6f6edf..6d66889761f 100644
--- a/spec/features/projects/commit/diff_notes_spec.rb
+++ b/spec/features/projects/commit/diff_notes_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Commit diff', :js do
+describe 'Commit diff', :js do
include RepoHelpers
let(:user) { create(:user) }
diff --git a/spec/features/projects/commit/mini_pipeline_graph_spec.rb b/spec/features/projects/commit/mini_pipeline_graph_spec.rb
index 91282063a8d..19f6ebf2c1a 100644
--- a/spec/features/projects/commit/mini_pipeline_graph_spec.rb
+++ b/spec/features/projects/commit/mini_pipeline_graph_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Mini Pipeline Graph in Commit View', :js do
+describe 'Mini Pipeline Graph in Commit View', :js do
let(:project) { create(:project, :public, :repository) }
context 'when commit has pipelines' do
diff --git a/spec/features/projects/commits/rss_spec.rb b/spec/features/projects/commits/rss_spec.rb
index 0bc207da970..cfc2637f1b2 100644
--- a/spec/features/projects/commits/rss_spec.rb
+++ b/spec/features/projects/commits/rss_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Project Commits RSS' do
+describe 'Project Commits RSS' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
let(:path) { project_commits_path(project, :master) }
diff --git a/spec/features/projects/diffs/diff_show_spec.rb b/spec/features/projects/diffs/diff_show_spec.rb
index 9bfcb1e816a..237157cd89d 100644
--- a/spec/features/projects/diffs/diff_show_spec.rb
+++ b/spec/features/projects/diffs/diff_show_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Diff file viewer', :js do
+describe 'Diff file viewer', :js do
let(:project) { create(:project, :public, :repository) }
def visit_commit(sha, anchor: nil)
diff --git a/spec/features/projects/environments/environment_metrics_spec.rb b/spec/features/projects/environments/environment_metrics_spec.rb
index 82a722c5960..edbab14f7c1 100644
--- a/spec/features/projects/environments/environment_metrics_spec.rb
+++ b/spec/features/projects/environments/environment_metrics_spec.rb
@@ -1,16 +1,16 @@
require 'spec_helper'
-feature 'Environment > Metrics' do
+describe 'Environment > Metrics' do
include PrometheusHelpers
- given(:user) { create(:user) }
- given(:project) { create(:prometheus_project) }
- given(:pipeline) { create(:ci_pipeline, project: project) }
- given(:build) { create(:ci_build, pipeline: pipeline) }
- given(:environment) { create(:environment, project: project) }
- given(:current_time) { Time.now.utc }
+ let(:user) { create(:user) }
+ let(:project) { create(:prometheus_project) }
+ let(:pipeline) { create(:ci_pipeline, project: project) }
+ let(:build) { create(:ci_build, pipeline: pipeline) }
+ let(:environment) { create(:environment, project: project) }
+ let(:current_time) { Time.now.utc }
- background do
+ before do
project.add_developer(user)
create(:deployment, environment: environment, deployable: build)
stub_all_prometheus_requests(environment.slug)
@@ -24,7 +24,7 @@ feature 'Environment > Metrics' do
end
context 'with deployments and related deployable present' do
- scenario 'shows metrics' do
+ it 'shows metrics' do
click_link('See metrics')
expect(page).to have_css('div#prometheus-graphs')
diff --git a/spec/features/projects/environments/environment_spec.rb b/spec/features/projects/environments/environment_spec.rb
index b233af83eec..0c34309c1f4 100644
--- a/spec/features/projects/environments/environment_spec.rb
+++ b/spec/features/projects/environments/environment_spec.rb
@@ -1,42 +1,42 @@
require 'spec_helper'
-feature 'Environment' do
- given(:project) { create(:project) }
- given(:user) { create(:user) }
- given(:role) { :developer }
+describe 'Environment' do
+ let(:project) { create(:project) }
+ let(:user) { create(:user) }
+ let(:role) { :developer }
- background do
+ before do
sign_in(user)
project.add_role(user, role)
end
- feature 'environment details page' do
- given!(:environment) { create(:environment, project: project) }
- given!(:permissions) { }
- given!(:deployment) { }
- given!(:action) { }
+ describe 'environment details page' do
+ let!(:environment) { create(:environment, project: project) }
+ let!(:permissions) { }
+ let!(:deployment) { }
+ let!(:action) { }
before do
visit_environment(environment)
end
- scenario 'shows environment name' do
+ it 'shows environment name' do
expect(page).to have_content(environment.name)
end
context 'without deployments' do
- scenario 'does show no deployments' do
+ it 'does show no deployments' do
expect(page).to have_content('You don\'t have any deployments right now.')
end
end
context 'with deployments' do
context 'when there is no related deployable' do
- given(:deployment) do
+ let(:deployment) do
create(:deployment, environment: environment, deployable: nil)
end
- scenario 'does show deployment SHA' do
+ it 'does show deployment SHA' do
expect(page).to have_link(deployment.short_sha)
expect(page).not_to have_link('Re-deploy')
expect(page).not_to have_terminal_button
@@ -44,27 +44,27 @@ feature 'Environment' do
end
context 'with related deployable present' do
- given(:pipeline) { create(:ci_pipeline, project: project) }
- given(:build) { create(:ci_build, pipeline: pipeline) }
+ let(:pipeline) { create(:ci_pipeline, project: project) }
+ let(:build) { create(:ci_build, pipeline: pipeline) }
- given(:deployment) do
+ let(:deployment) do
create(:deployment, environment: environment, deployable: build)
end
- scenario 'does show build name' do
+ it 'does show build name' do
expect(page).to have_link("#{build.name} (##{build.id})")
expect(page).to have_link('Re-deploy')
expect(page).not_to have_terminal_button
end
context 'with manual action' do
- given(:action) do
+ let(:action) do
create(:ci_build, :manual, pipeline: pipeline,
name: 'deploy to production')
end
context 'when user has ability to trigger deployment' do
- given(:permissions) do
+ let(:permissions) do
create(:protected_branch, :developers_can_merge,
name: action.ref, project: project)
end
@@ -91,11 +91,11 @@ feature 'Environment' do
end
context 'with external_url' do
- given(:environment) { create(:environment, project: project, external_url: 'https://git.gitlab.com') }
- given(:build) { create(:ci_build, pipeline: pipeline) }
- given(:deployment) { create(:deployment, environment: environment, deployable: build) }
+ let(:environment) { create(:environment, project: project, external_url: 'https://git.gitlab.com') }
+ let(:build) { create(:ci_build, pipeline: pipeline) }
+ let(:deployment) { create(:deployment, environment: environment, deployable: build) }
- scenario 'does show an external link button' do
+ it 'does show an external link button' do
expect(page).to have_link(nil, href: environment.external_url)
end
end
@@ -105,7 +105,7 @@ feature 'Environment' do
context 'for project master' do
let(:role) { :master }
- scenario 'it shows the terminal button' do
+ it 'it shows the terminal button' do
expect(page).to have_terminal_button
end
@@ -126,7 +126,7 @@ feature 'Environment' do
context 'for developer' do
let(:role) { :developer }
- scenario 'does not show terminal button' do
+ it 'does not show terminal button' do
expect(page).not_to have_terminal_button
end
end
@@ -148,19 +148,19 @@ feature 'Environment' do
context 'when environment is available' do
context 'with stop action' do
- given(:action) do
+ let(:action) do
create(:ci_build, :manual, pipeline: pipeline,
name: 'close_app')
end
- given(:deployment) do
+ let(:deployment) do
create(:deployment, environment: environment,
deployable: build,
on_stop: 'close_app')
end
context 'when user has ability to stop environment' do
- given(:permissions) do
+ let(:permissions) do
create(:protected_branch, :developers_can_merge,
name: action.ref, project: project)
end
@@ -181,7 +181,7 @@ feature 'Environment' do
context 'for reporter' do
let(:role) { :reporter }
- scenario 'does not show stop button' do
+ it 'does not show stop button' do
expect(page).not_to have_link('Stop')
end
end
@@ -189,9 +189,9 @@ feature 'Environment' do
end
context 'when environment is stopped' do
- given(:environment) { create(:environment, project: project, state: :stopped) }
+ let(:environment) { create(:environment, project: project, state: :stopped) }
- scenario 'does not show stop button' do
+ it 'does not show stop button' do
expect(page).not_to have_link('Stop')
end
end
@@ -200,7 +200,7 @@ feature 'Environment' do
end
end
- feature 'environment folders', :js do
+ describe 'environment folders', :js do
context 'when folder name contains special charaters' do
before do
create(:environment, project: project,
@@ -219,21 +219,21 @@ feature 'Environment' do
end
end
- feature 'auto-close environment when branch is deleted' do
- given(:project) { create(:project, :repository) }
+ describe 'auto-close environment when branch is deleted' do
+ let(:project) { create(:project, :repository) }
- given!(:environment) do
+ let!(:environment) do
create(:environment, :with_review_app, project: project,
ref: 'feature')
end
- scenario 'user visits environment page' do
+ it 'user visits environment page' do
visit_environment(environment)
expect(page).to have_link('Stop')
end
- scenario 'user deletes the branch with running environment' do
+ it 'user deletes the branch with running environment' do
visit project_branches_filtered_path(project, state: 'all', search: 'feature')
remove_branch_with_hooks(project, user, 'feature') do
diff --git a/spec/features/projects/environments/environments_spec.rb b/spec/features/projects/environments/environments_spec.rb
index f9defa22d35..9900c13095e 100644
--- a/spec/features/projects/environments/environments_spec.rb
+++ b/spec/features/projects/environments/environments_spec.rb
@@ -1,11 +1,11 @@
require 'spec_helper'
-feature 'Environments page', :js do
- given(:project) { create(:project) }
- given(:user) { create(:user) }
- given(:role) { :developer }
+describe 'Environments page', :js do
+ let(:project) { create(:project) }
+ let(:user) { create(:user) }
+ let(:role) { :developer }
- background do
+ before do
project.add_role(user, role)
sign_in(user)
end
@@ -99,7 +99,7 @@ feature 'Environments page', :js do
end
describe 'environments table' do
- given!(:environment) do
+ let!(:environment) do
create(:environment, project: project, state: :available)
end
@@ -125,9 +125,9 @@ feature 'Environments page', :js do
end
context 'when there are deployments' do
- given(:project) { create(:project, :repository) }
+ let(:project) { create(:project, :repository) }
- given!(:deployment) do
+ let!(:deployment) do
create(:deployment, environment: environment,
sha: project.commit.id)
end
@@ -140,14 +140,14 @@ feature 'Environments page', :js do
end
context 'when builds and manual actions are present' do
- given!(:pipeline) { create(:ci_pipeline, project: project) }
- given!(:build) { create(:ci_build, pipeline: pipeline) }
+ let!(:pipeline) { create(:ci_pipeline, project: project) }
+ let!(:build) { create(:ci_build, pipeline: pipeline) }
- given!(:action) do
+ let!(:action) do
create(:ci_build, :manual, pipeline: pipeline, name: 'deploy to production')
end
- given!(:deployment) do
+ let!(:deployment) do
create(:deployment, environment: environment,
deployable: build,
sha: project.commit.id)
@@ -190,9 +190,9 @@ feature 'Environments page', :js do
end
context 'with external_url' do
- given(:environment) { create(:environment, project: project, external_url: 'https://git.gitlab.com') }
- given(:build) { create(:ci_build, pipeline: pipeline) }
- given(:deployment) { create(:deployment, environment: environment, deployable: build) }
+ let(:environment) { create(:environment, project: project, external_url: 'https://git.gitlab.com') }
+ let(:build) { create(:ci_build, pipeline: pipeline) }
+ let(:deployment) { create(:deployment, environment: environment, deployable: build) }
it 'shows an external link button' do
expect(page).to have_link(nil, href: environment.external_url)
@@ -200,11 +200,11 @@ feature 'Environments page', :js do
end
context 'with stop action' do
- given(:action) do
+ let(:action) do
create(:ci_build, :manual, pipeline: pipeline, name: 'close_app')
end
- given(:deployment) do
+ let(:deployment) do
create(:deployment, environment: environment,
deployable: build,
on_stop: 'close_app')
@@ -271,9 +271,9 @@ feature 'Environments page', :js do
end
context 'user is a developer' do
- given(:role) { :developer }
+ let(:role) { :developer }
- scenario 'developer creates a new environment with a valid name' do
+ it 'developer creates a new environment with a valid name' do
within(".top-area") { click_link 'New environment' }
fill_in('Name', with: 'production')
click_on 'Save'
@@ -281,7 +281,7 @@ feature 'Environments page', :js do
expect(page).to have_content('production')
end
- scenario 'developer creates a new environmetn with invalid name' do
+ it 'developer creates a new environmetn with invalid name' do
within(".top-area") { click_link 'New environment' }
fill_in('Name', with: 'name,with,commas')
click_on 'Save'
@@ -291,9 +291,9 @@ feature 'Environments page', :js do
end
context 'user is a reporter' do
- given(:role) { :reporter }
+ let(:role) { :reporter }
- scenario 'reporters tries to create a new environment' do
+ it 'reporters tries to create a new environment' do
expect(page).not_to have_link('New environment')
end
end
@@ -309,7 +309,7 @@ feature 'Environments page', :js do
state: :available)
end
- scenario 'users unfurls an environment folder' do
+ it 'users unfurls an environment folder' do
visit_environments(project)
expect(page).not_to have_content 'review-1'
@@ -335,7 +335,7 @@ feature 'Environments page', :js do
state: :available)
end
- scenario 'user opens folder view' do
+ it 'user opens folder view' do
visit folder_project_environments_path(project, 'staging.review')
wait_for_requests
diff --git a/spec/features/projects/files/template_selector_menu_spec.rb b/spec/features/projects/files/template_selector_menu_spec.rb
index b549a69ddf3..b7e1e172af9 100644
--- a/spec/features/projects/files/template_selector_menu_spec.rb
+++ b/spec/features/projects/files/template_selector_menu_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Template selector menu', :js do
+describe 'Template selector menu', :js do
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
@@ -14,7 +14,7 @@ feature 'Template selector menu', :js do
create_and_edit_file('README.md')
end
- scenario 'is not displayed' do
+ it 'is not displayed' do
check_template_selector_menu_display(false)
end
@@ -23,7 +23,7 @@ feature 'Template selector menu', :js do
click_link 'Preview'
end
- scenario 'template selector menu is not displayed' do
+ it 'template selector menu is not displayed' do
check_template_selector_menu_display(false)
click_link 'Write'
check_template_selector_menu_display(false)
@@ -36,7 +36,7 @@ feature 'Template selector menu', :js do
visit project_edit_blob_path(project, File.join(project.default_branch, 'LICENSE'))
end
- scenario 'is displayed' do
+ it 'is displayed' do
check_template_selector_menu_display(true)
end
@@ -45,7 +45,7 @@ feature 'Template selector menu', :js do
click_link 'Preview'
end
- scenario 'template selector menu is hidden and shown correctly' do
+ it 'template selector menu is hidden and shown correctly' do
check_template_selector_menu_display(false)
click_link 'Write'
check_template_selector_menu_display(true)
diff --git a/spec/features/projects/files/user_reads_pipeline_status_spec.rb b/spec/features/projects/files/user_reads_pipeline_status_spec.rb
index 2fb9da2f0a2..2d0b447913e 100644
--- a/spec/features/projects/files/user_reads_pipeline_status_spec.rb
+++ b/spec/features/projects/files/user_reads_pipeline_status_spec.rb
@@ -17,7 +17,7 @@ describe 'user reads pipeline status', :js do
end
shared_examples 'visiting project tree' do
- scenario 'sees the correct pipeline status' do
+ it 'sees the correct pipeline status' do
visit project_tree_path(project, expected_pipeline.ref)
wait_for_requests
diff --git a/spec/features/projects/hook_logs/user_reads_log_spec.rb b/spec/features/projects/hook_logs/user_reads_log_spec.rb
index 18e975fa653..c3bc35565f6 100644
--- a/spec/features/projects/hook_logs/user_reads_log_spec.rb
+++ b/spec/features/projects/hook_logs/user_reads_log_spec.rb
@@ -1,9 +1,9 @@
require 'spec_helper'
-feature 'Hook logs' do
- given(:web_hook_log) { create(:web_hook_log, response_body: '<script>') }
- given(:project) { web_hook_log.web_hook.project }
- given(:user) { create(:user) }
+describe 'Hook logs' do
+ let(:web_hook_log) { create(:web_hook_log, response_body: '<script>') }
+ let(:project) { web_hook_log.web_hook.project }
+ let(:user) { create(:user) }
before do
project.add_master(user)
@@ -11,7 +11,7 @@ feature 'Hook logs' do
sign_in(user)
end
- scenario 'user reads log without getting XSS' do
+ it 'user reads log without getting XSS' do
visit(
project_hook_hook_log_path(
project, web_hook_log.web_hook, web_hook_log))
diff --git a/spec/features/projects/import_export/export_file_spec.rb b/spec/features/projects/import_export/export_file_spec.rb
index 6732cf61767..8a418356541 100644
--- a/spec/features/projects/import_export/export_file_spec.rb
+++ b/spec/features/projects/import_export/export_file_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
# It looks up for any sensitive word inside the JSON, so if a sensitive word is found
# we'll have to either include it adding the model that includes it to the +safe_list+
# or make sure the attribute is blacklisted in the +import_export.yml+ configuration
-feature 'Import/Export - project export integration test', :js do
+describe 'Import/Export - project export integration test', :js do
include Select2Helper
include ExportFileHelper
@@ -23,7 +23,7 @@ feature 'Import/Export - project export integration test', :js do
let(:project) { setup_project }
- background do
+ before do
allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(export_path)
end
@@ -36,7 +36,7 @@ feature 'Import/Export - project export integration test', :js do
sign_in(user)
end
- scenario 'exports a project successfully' do
+ it 'exports a project successfully' do
visit edit_project_path(project)
expect(page).to have_content('Export project')
diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb
index d0912e645bc..9cbfb62d872 100644
--- a/spec/features/projects/import_export/import_file_spec.rb
+++ b/spec/features/projects/import_export/import_file_spec.rb
@@ -1,13 +1,13 @@
require 'spec_helper'
-feature 'Import/Export - project import integration test', :js do
+describe 'Import/Export - project import integration test', :js do
include Select2Helper
let(:user) { create(:user) }
let(:file) { File.join(Rails.root, 'spec', 'features', 'projects', 'import_export', 'test_project_export.tar.gz') }
let(:export_path) { "#{Dir.tmpdir}/import_file_spec" }
- background do
+ before do
allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(export_path)
gitlab_sign_in(user)
end
@@ -22,7 +22,7 @@ feature 'Import/Export - project import integration test', :js do
let(:project_path) { 'test-project-path' + SecureRandom.hex }
context 'prefilled the path' do
- scenario 'user imports an exported project successfully' do
+ it 'user imports an exported project successfully' do
visit new_project_path
select2(namespace.id, from: '#project_namespace_id')
@@ -51,7 +51,7 @@ feature 'Import/Export - project import integration test', :js do
end
context 'path is not prefilled' do
- scenario 'user imports an exported project successfully' do
+ it 'user imports an exported project successfully' do
visit new_project_path
click_import_project_tab
click_link 'GitLab export'
@@ -68,7 +68,7 @@ feature 'Import/Export - project import integration test', :js do
end
end
- scenario 'invalid project' do
+ it 'invalid project' do
project = create(:project, namespace: user.namespace)
visit new_project_path
diff --git a/spec/features/projects/issuable_templates_spec.rb b/spec/features/projects/issuable_templates_spec.rb
index e26caf1f456..9cd4af2de80 100644
--- a/spec/features/projects/issuable_templates_spec.rb
+++ b/spec/features/projects/issuable_templates_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'issuable templates', :js do
+describe 'issuable templates', :js do
include ProjectForksHelper
let(:user) { create(:user) }
@@ -18,7 +18,7 @@ feature 'issuable templates', :js do
let(:issue) { create(:issue, author: user, assignees: [user], project: project) }
let(:description_addition) { ' appending to description' }
- background do
+ before do
project.repository.create_file(
user,
'.gitlab/issue_templates/bug.md',
@@ -36,14 +36,14 @@ feature 'issuable templates', :js do
fill_in :'issuable-title', with: 'test issue title'
end
- scenario 'user selects "bug" template' do
+ it 'user selects "bug" template' do
select_template 'bug'
wait_for_requests
assert_template(page_part: issue_form_location)
save_changes
end
- scenario 'user selects "bug" template and then "no template"' do
+ it 'user selects "bug" template and then "no template"' do
select_template 'bug'
wait_for_requests
select_option 'No template'
@@ -51,7 +51,7 @@ feature 'issuable templates', :js do
save_changes('')
end
- scenario 'user selects "bug" template, edits description and then selects "reset template"' do
+ it 'user selects "bug" template, edits description and then selects "reset template"' do
select_template 'bug'
wait_for_requests
find_field('issue-description').send_keys(description_addition)
@@ -67,7 +67,7 @@ feature 'issuable templates', :js do
let(:template_content) { 'this is a test "bug" template' }
let(:issue) { create(:issue, author: user, assignees: [user], project: project) }
- background do
+ before do
project.repository.create_file(
user,
'.gitlab/issue_templates/bug.md',
@@ -80,7 +80,7 @@ feature 'issuable templates', :js do
fill_in :'issue-description', with: prior_description
end
- scenario 'user selects "bug" template' do
+ it 'user selects "bug" template' do
select_template 'bug'
wait_for_requests
assert_template(page_part: issue_form_location)
@@ -92,7 +92,7 @@ feature 'issuable templates', :js do
let(:template_content) { 'this is a test "feature-proposal" template' }
let(:merge_request) { create(:merge_request, :with_diffs, source_project: project) }
- background do
+ before do
project.repository.create_file(
user,
'.gitlab/merge_request_templates/feature-proposal.md',
@@ -103,7 +103,7 @@ feature 'issuable templates', :js do
fill_in :'merge_request[title]', with: 'test merge request title'
end
- scenario 'user selects "feature-proposal" template' do
+ it 'user selects "feature-proposal" template' do
select_template 'feature-proposal'
wait_for_requests
assert_template
@@ -117,7 +117,7 @@ feature 'issuable templates', :js do
let(:forked_project) { fork_project(project, fork_user, repository: true) }
let(:merge_request) { create(:merge_request, :with_diffs, source_project: forked_project, target_project: project) }
- background do
+ before do
sign_out(:user)
project.add_developer(fork_user)
@@ -136,7 +136,7 @@ feature 'issuable templates', :js do
context 'feature proposal template' do
context 'template exists in target project' do
- scenario 'user selects template' do
+ it 'user selects template' do
select_template 'feature-proposal'
wait_for_requests
assert_template
diff --git a/spec/features/projects/issues/rss_spec.rb b/spec/features/projects/issues/rss_spec.rb
index 8b1f7d432ee..0e1383cd607 100644
--- a/spec/features/projects/issues/rss_spec.rb
+++ b/spec/features/projects/issues/rss_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Project Issues RSS' do
+describe 'Project Issues RSS' do
let(:project) { create(:project, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
let(:path) { project_issues_path(project) }
diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb
index d06abdd999b..c742eb79392 100644
--- a/spec/features/projects/jobs_spec.rb
+++ b/spec/features/projects/jobs_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
require 'tempfile'
-feature 'Jobs', :clean_gitlab_redis_shared_state do
+describe 'Jobs', :clean_gitlab_redis_shared_state do
let(:user) { create(:user) }
let(:user_access_level) { :developer }
let(:project) { create(:project, :repository) }
@@ -259,7 +259,7 @@ feature 'Jobs', :clean_gitlab_redis_shared_state do
end
end
- feature 'Raw trace' do
+ describe 'Raw trace' do
before do
job.run!
@@ -271,7 +271,7 @@ feature 'Jobs', :clean_gitlab_redis_shared_state do
end
end
- feature 'HTML trace', :js do
+ describe 'HTML trace', :js do
before do
job.run!
@@ -291,7 +291,7 @@ feature 'Jobs', :clean_gitlab_redis_shared_state do
end
end
- feature 'Variables' do
+ describe 'Variables' do
let(:trigger_request) { create(:ci_trigger_request) }
let(:job) do
diff --git a/spec/features/projects/labels/issues_sorted_by_priority_spec.rb b/spec/features/projects/labels/issues_sorted_by_priority_spec.rb
index 0292a3192d8..6178f11ded7 100644
--- a/spec/features/projects/labels/issues_sorted_by_priority_spec.rb
+++ b/spec/features/projects/labels/issues_sorted_by_priority_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Issue prioritization' do
+describe 'Issue prioritization' do
let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) }
@@ -13,7 +13,7 @@ feature 'Issue prioritization' do
# According to https://gitlab.com/gitlab-org/gitlab-ce/issues/14189#note_4360653
context 'when issues have one label' do
- scenario 'Are sorted properly' do
+ it 'Are sorted properly' do
# Issues
issue_1 = create(:issue, title: 'issue_1', project: project)
issue_2 = create(:issue, title: 'issue_2', project: project)
@@ -43,7 +43,7 @@ feature 'Issue prioritization' do
end
context 'when issues have multiple labels' do
- scenario 'Are sorted properly' do
+ it 'Are sorted properly' do
# Issues
issue_1 = create(:issue, title: 'issue_1', project: project)
issue_2 = create(:issue, title: 'issue_2', project: project)
diff --git a/spec/features/projects/labels/subscription_spec.rb b/spec/features/projects/labels/subscription_spec.rb
index fafd338e448..49227eebf3d 100644
--- a/spec/features/projects/labels/subscription_spec.rb
+++ b/spec/features/projects/labels/subscription_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Labels subscription' do
+describe 'Labels subscription' do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:project) { create(:project, :public, namespace: group) }
@@ -13,7 +13,7 @@ feature 'Labels subscription' do
sign_in user
end
- scenario 'users can subscribe/unsubscribe to labels', :js do
+ it 'users can subscribe/unsubscribe to labels', :js do
visit project_labels_path(project)
expect(page).to have_content('bug')
diff --git a/spec/features/projects/labels/update_prioritization_spec.rb b/spec/features/projects/labels/update_prioritization_spec.rb
index 359381c391c..996040fde02 100644
--- a/spec/features/projects/labels/update_prioritization_spec.rb
+++ b/spec/features/projects/labels/update_prioritization_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Prioritize labels' do
+describe 'Prioritize labels' do
include DragTo
let(:user) { create(:user) }
@@ -17,7 +17,7 @@ feature 'Prioritize labels' do
sign_in user
end
- scenario 'user can prioritize a group label', :js do
+ it 'user can prioritize a group label', :js do
visit project_labels_path(project)
expect(page).to have_content('Star labels to start sorting by priority')
@@ -34,7 +34,7 @@ feature 'Prioritize labels' do
end
end
- scenario 'user can unprioritize a group label', :js do
+ it 'user can unprioritize a group label', :js do
create(:label_priority, project: project, label: feature, priority: 1)
visit project_labels_path(project)
@@ -52,7 +52,7 @@ feature 'Prioritize labels' do
end
end
- scenario 'user can prioritize a project label', :js do
+ it 'user can prioritize a project label', :js do
visit project_labels_path(project)
expect(page).to have_content('Star labels to start sorting by priority')
@@ -69,7 +69,7 @@ feature 'Prioritize labels' do
end
end
- scenario 'user can unprioritize a project label', :js do
+ it 'user can unprioritize a project label', :js do
create(:label_priority, project: project, label: bug, priority: 1)
visit project_labels_path(project)
@@ -88,7 +88,7 @@ feature 'Prioritize labels' do
end
end
- scenario 'user can sort prioritized labels and persist across reloads', :js do
+ it 'user can sort prioritized labels and persist across reloads', :js do
create(:label_priority, project: project, label: bug, priority: 1)
create(:label_priority, project: project, label: feature, priority: 2)
diff --git a/spec/features/projects/labels/user_sees_links_to_issuables.rb b/spec/features/projects/labels/user_sees_links_to_issuables.rb
index aa56fd7f74e..c404fc8d66f 100644
--- a/spec/features/projects/labels/user_sees_links_to_issuables.rb
+++ b/spec/features/projects/labels/user_sees_links_to_issuables.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Projects > Labels > User sees links to issuables' do
+describe 'Projects > Labels > User sees links to issuables' do
set(:user) { create(:user) }
before do
@@ -16,7 +16,7 @@ feature 'Projects > Labels > User sees links to issuables' do
context 'when merge requests and issues are enabled for the project' do
let(:project) { create(:project, :public) }
- scenario 'shows links to MRs and issues' do
+ it 'shows links to MRs and issues' do
expect(page).to have_link('view merge requests')
expect(page).to have_link('view open issues')
end
@@ -25,7 +25,7 @@ feature 'Projects > Labels > User sees links to issuables' do
context 'when issues are disabled for the project' do
let(:project) { create(:project, :public, issues_access_level: ProjectFeature::DISABLED) }
- scenario 'shows links to MRs but not to issues' do
+ it 'shows links to MRs but not to issues' do
expect(page).to have_link('view merge requests')
expect(page).not_to have_link('view open issues')
end
@@ -34,7 +34,7 @@ feature 'Projects > Labels > User sees links to issuables' do
context 'when merge requests are disabled for the project' do
let(:project) { create(:project, :public, merge_requests_access_level: ProjectFeature::DISABLED) }
- scenario 'shows links to issues but not to MRs' do
+ it 'shows links to issues but not to MRs' do
expect(page).not_to have_link('view merge requests')
expect(page).to have_link('view open issues')
end
@@ -48,7 +48,7 @@ feature 'Projects > Labels > User sees links to issuables' do
context 'when merge requests and issues are enabled for the project' do
let(:project) { create(:project, :public, namespace: group) }
- scenario 'shows links to MRs and issues' do
+ it 'shows links to MRs and issues' do
expect(page).to have_link('view merge requests')
expect(page).to have_link('view open issues')
end
@@ -57,7 +57,7 @@ feature 'Projects > Labels > User sees links to issuables' do
context 'when issues are disabled for the project' do
let(:project) { create(:project, :public, namespace: group, issues_access_level: ProjectFeature::DISABLED) }
- scenario 'shows links to MRs and issues' do
+ it 'shows links to MRs and issues' do
expect(page).to have_link('view merge requests')
expect(page).to have_link('view open issues')
end
@@ -66,7 +66,7 @@ feature 'Projects > Labels > User sees links to issuables' do
context 'when merge requests are disabled for the project' do
let(:project) { create(:project, :public, namespace: group, merge_requests_access_level: ProjectFeature::DISABLED) }
- scenario 'shows links to MRs and issues' do
+ it 'shows links to MRs and issues' do
expect(page).to have_link('view merge requests')
expect(page).to have_link('view open issues')
end
diff --git a/spec/features/projects/members/anonymous_user_sees_members_spec.rb b/spec/features/projects/members/anonymous_user_sees_members_spec.rb
index e2a48bfd1d4..19e52294a38 100644
--- a/spec/features/projects/members/anonymous_user_sees_members_spec.rb
+++ b/spec/features/projects/members/anonymous_user_sees_members_spec.rb
@@ -1,16 +1,16 @@
require 'spec_helper'
-feature 'Projects > Members > Anonymous user sees members' do
+describe 'Projects > Members > Anonymous user sees members' do
let(:user) { create(:user) }
let(:group) { create(:group, :public) }
let(:project) { create(:project, :public) }
- background do
+ before do
project.add_master(user)
create(:project_group_link, project: project, group: group)
end
- scenario "anonymous user visits the project's members page and sees the list of members" do
+ it "anonymous user visits the project's members page and sees the list of members" do
visit project_project_members_path(project)
expect(current_path).to eq(
diff --git a/spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb b/spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb
index 6b450fa4e45..0ab29660189 100644
--- a/spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb
+++ b/spec/features/projects/members/group_member_cannot_leave_group_project_spec.rb
@@ -1,17 +1,17 @@
require 'spec_helper'
-feature 'Projects > Members > Group member cannot leave group project' do
+describe 'Projects > Members > Group member cannot leave group project' do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:project) { create(:project, namespace: group) }
- background do
+ before do
group.add_developer(user)
sign_in(user)
visit project_path(project)
end
- scenario 'user does not see a "Leave project" link' do
+ it 'user does not see a "Leave project" link' do
expect(page).not_to have_content 'Leave project'
end
end
diff --git a/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb b/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb
index 296a80a3c60..7bc53345ddf 100644
--- a/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb
+++ b/spec/features/projects/members/group_member_cannot_request_access_to_his_group_project_spec.rb
@@ -1,39 +1,39 @@
require 'spec_helper'
-feature 'Projects > Members > Group member cannot request access to his group project' do
+describe 'Projects > Members > Group member cannot request access to his group project' do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:project) { create(:project, namespace: group) }
- scenario 'owner does not see the request access button' do
+ it 'owner does not see the request access button' do
group.add_owner(user)
login_and_visit_project_page(user)
expect(page).not_to have_content 'Request Access'
end
- scenario 'master does not see the request access button' do
+ it 'master does not see the request access button' do
group.add_master(user)
login_and_visit_project_page(user)
expect(page).not_to have_content 'Request Access'
end
- scenario 'developer does not see the request access button' do
+ it 'developer does not see the request access button' do
group.add_developer(user)
login_and_visit_project_page(user)
expect(page).not_to have_content 'Request Access'
end
- scenario 'reporter does not see the request access button' do
+ it 'reporter does not see the request access button' do
group.add_reporter(user)
login_and_visit_project_page(user)
expect(page).not_to have_content 'Request Access'
end
- scenario 'guest does not see the request access button' do
+ it 'guest does not see the request access button' do
group.add_guest(user)
login_and_visit_project_page(user)
diff --git a/spec/features/projects/members/group_members_spec.rb b/spec/features/projects/members/group_members_spec.rb
index e22b6fa6c43..41b2beb40b9 100644
--- a/spec/features/projects/members/group_members_spec.rb
+++ b/spec/features/projects/members/group_members_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Projects members' do
+describe 'Projects members' do
let(:user) { create(:user) }
let(:developer) { create(:user) }
let(:group) { create(:group, :public, :access_requestable) }
@@ -10,7 +10,7 @@ feature 'Projects members' do
let(:project_requester) { create(:user) }
let(:group_requester) { create(:user) }
- background do
+ before do
project.add_developer(developer)
group.add_owner(user)
sign_in(user)
@@ -22,7 +22,7 @@ feature 'Projects members' do
visit project_settings_members_path(project)
end
- scenario 'does not appear in the project members page' do
+ it 'does not appear in the project members page' do
page.within first('.content-list') do
expect(page).not_to have_content('test2@abc.com')
end
@@ -36,7 +36,7 @@ feature 'Projects members' do
visit project_settings_members_path(project)
end
- scenario 'shows the project invitee, the project developer, and the group owner' do
+ it 'shows the project invitee, the project developer, and the group owner' do
page.within first('.content-list') do
expect(page).to have_content('test1@abc.com')
expect(page).not_to have_content('test2@abc.com')
@@ -57,7 +57,7 @@ feature 'Projects members' do
visit project_settings_members_path(project)
end
- scenario 'does not appear in the project members page' do
+ it 'does not appear in the project members page' do
page.within first('.content-list') do
expect(page).not_to have_content(group_requester.name)
end
@@ -71,7 +71,7 @@ feature 'Projects members' do
visit project_settings_members_path(project)
end
- scenario 'shows the project requester, the project developer, and the group owner' do
+ it 'shows the project requester, the project developer, and the group owner' do
page.within first('.content-list') do
expect(page).to have_content(project_requester.name)
expect(page).not_to have_content(group_requester.name)
diff --git a/spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb b/spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb
index 6d729f2f85f..ea3894c92bd 100644
--- a/spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb
+++ b/spec/features/projects/members/group_requester_cannot_request_access_to_project_spec.rb
@@ -1,12 +1,12 @@
require 'spec_helper'
-feature 'Projects > Members > Group requester cannot request access to project', :js do
+describe 'Projects > Members > Group requester cannot request access to project', :js do
let(:user) { create(:user) }
let(:owner) { create(:user) }
let(:group) { create(:group, :public, :access_requestable) }
let(:project) { create(:project, :public, :access_requestable, namespace: group) }
- background do
+ before do
group.add_owner(owner)
sign_in(user)
visit group_path(group)
@@ -14,7 +14,7 @@ feature 'Projects > Members > Group requester cannot request access to project',
visit project_path(project)
end
- scenario 'group requester does not see the request access / withdraw access request button' do
+ it 'group requester does not see the request access / withdraw access request button' do
expect(page).not_to have_content 'Request Access'
expect(page).not_to have_content 'Withdraw Access Request'
end
diff --git a/spec/features/projects/members/groups_with_access_list_spec.rb b/spec/features/projects/members/groups_with_access_list_spec.rb
index e6d0c6e00f8..b65c46b345f 100644
--- a/spec/features/projects/members/groups_with_access_list_spec.rb
+++ b/spec/features/projects/members/groups_with_access_list_spec.rb
@@ -1,11 +1,11 @@
require 'spec_helper'
-feature 'Projects > Members > Groups with access list', :js do
+describe 'Projects > Members > Groups with access list', :js do
let(:user) { create(:user) }
let(:group) { create(:group, :public) }
let(:project) { create(:project, :public) }
- background do
+ before do
project.add_master(user)
@group_link = create(:project_group_link, project: project, group: group)
@@ -13,7 +13,7 @@ feature 'Projects > Members > Groups with access list', :js do
visit project_settings_members_path(project)
end
- scenario 'updates group access level' do
+ it 'updates group access level' do
click_button @group_link.human_access
page.within '.dropdown-menu' do
@@ -27,7 +27,7 @@ feature 'Projects > Members > Groups with access list', :js do
expect(first('.group_member')).to have_content('Guest')
end
- scenario 'updates expiry date' do
+ it 'updates expiry date' do
tomorrow = Date.today + 3
fill_in "member_expires_at_#{group.id}", with: tomorrow.strftime("%F")
@@ -39,7 +39,7 @@ feature 'Projects > Members > Groups with access list', :js do
end
end
- scenario 'deletes group link' do
+ it 'deletes group link' do
page.within(first('.group_member')) do
accept_confirm { find('.btn-remove').click }
end
@@ -49,7 +49,7 @@ feature 'Projects > Members > Groups with access list', :js do
end
context 'search in existing members (yes, this filters the groups list as well)' do
- scenario 'finds no results' do
+ it 'finds no results' do
page.within '.member-search-form' do
fill_in 'search', with: 'testing 123'
find('.member-search-btn').click
@@ -58,7 +58,7 @@ feature 'Projects > Members > Groups with access list', :js do
expect(page).not_to have_selector('.group_member')
end
- scenario 'finds results' do
+ it 'finds results' do
page.within '.member-search-form' do
fill_in 'search', with: group.name
find('.member-search-btn').click
diff --git a/spec/features/projects/members/list_spec.rb b/spec/features/projects/members/list_spec.rb
index 65b11a1d9e7..c2e980e75b8 100644
--- a/spec/features/projects/members/list_spec.rb
+++ b/spec/features/projects/members/list_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Project members list' do
+describe 'Project members list' do
include Select2Helper
let(:user1) { create(:user, name: 'John Doe') }
@@ -8,12 +8,12 @@ feature 'Project members list' do
let(:group) { create(:group) }
let(:project) { create(:project, namespace: group) }
- background do
+ before do
sign_in(user1)
group.add_owner(user1)
end
- scenario 'show members from project and group' do
+ it 'show members from project and group' do
project.add_developer(user2)
visit_members_page
@@ -22,7 +22,7 @@ feature 'Project members list' do
expect(second_row.text).to include(user2.name)
end
- scenario 'show user once if member of both group and project' do
+ it 'show user once if member of both group and project' do
project.add_developer(user1)
visit_members_page
@@ -31,7 +31,7 @@ feature 'Project members list' do
expect(second_row).to be_blank
end
- scenario 'update user acess level', :js do
+ it 'update user acess level', :js do
project.add_developer(user2)
visit_members_page
@@ -44,7 +44,7 @@ feature 'Project members list' do
end
end
- scenario 'add user to project', :js do
+ it 'add user to project', :js do
visit_members_page
add_user(user2.id, 'Reporter')
@@ -55,7 +55,7 @@ feature 'Project members list' do
end
end
- scenario 'remove user from project', :js do
+ it 'remove user from project', :js do
other_user = create(:user)
project.add_developer(other_user)
@@ -71,7 +71,7 @@ feature 'Project members list' do
expect(project.users).not_to include(other_user)
end
- scenario 'invite user to project', :js do
+ it 'invite user to project', :js do
visit_members_page
add_user('test@example.com', 'Reporter')
diff --git a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb
index 8fe340d3bae..90f09bf6264 100644
--- a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb
+++ b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Projects > Members > Master adds member with expiration date', :js do
+describe 'Projects > Members > Master adds member with expiration date', :js do
include Select2Helper
include ActiveSupport::Testing::TimeHelpers
@@ -8,12 +8,12 @@ feature 'Projects > Members > Master adds member with expiration date', :js do
let(:project) { create(:project) }
let!(:new_member) { create(:user) }
- background do
+ before do
project.add_master(master)
sign_in(master)
end
- scenario 'expiration date is displayed in the members list' do
+ it 'expiration date is displayed in the members list' do
travel_to Time.zone.parse('2016-08-06 08:00') do
date = 4.days.from_now
visit project_project_members_path(project)
@@ -30,7 +30,7 @@ feature 'Projects > Members > Master adds member with expiration date', :js do
end
end
- scenario 'change expiration date' do
+ it 'change expiration date' do
travel_to Time.zone.parse('2016-08-06 08:00') do
date = 3.days.from_now
project.team.add_users([new_member.id], :developer, expires_at: Date.today.to_s(:medium))
diff --git a/spec/features/projects/members/master_manages_access_requests_spec.rb b/spec/features/projects/members/master_manages_access_requests_spec.rb
index 3ac6ca4fc86..112b06c047d 100644
--- a/spec/features/projects/members/master_manages_access_requests_spec.rb
+++ b/spec/features/projects/members/master_manages_access_requests_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Projects > Members > Master manages access requests' do
+describe 'Projects > Members > Master manages access requests' do
it_behaves_like 'Master manages access requests' do
let(:entity) { create(:project, :public, :access_requestable) }
let(:members_page_path) { project_project_members_path(entity) }
diff --git a/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb b/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb
index 47911c32a72..f612ad8d551 100644
--- a/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb
+++ b/spec/features/projects/members/member_cannot_request_access_to_his_project_spec.rb
@@ -1,16 +1,16 @@
require 'spec_helper'
-feature 'Projects > Members > Member cannot request access to his project' do
+describe 'Projects > Members > Member cannot request access to his project' do
let(:member) { create(:user) }
let(:project) { create(:project) }
- background do
+ before do
project.add_developer(member)
sign_in(member)
visit project_path(project)
end
- scenario 'member does not see the request access button' do
+ it 'member does not see the request access button' do
expect(page).not_to have_content 'Request Access'
end
end
diff --git a/spec/features/projects/members/member_leaves_project_spec.rb b/spec/features/projects/members/member_leaves_project_spec.rb
index e54c2c76975..94b29de4686 100644
--- a/spec/features/projects/members/member_leaves_project_spec.rb
+++ b/spec/features/projects/members/member_leaves_project_spec.rb
@@ -1,16 +1,16 @@
require 'spec_helper'
-feature 'Projects > Members > Member leaves project' do
+describe 'Projects > Members > Member leaves project' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
- background do
+ before do
project.add_developer(user)
sign_in(user)
visit project_path(project)
end
- scenario 'user leaves project' do
+ it 'user leaves project' do
click_link 'Leave project'
expect(current_path).to eq(dashboard_projects_path)
diff --git a/spec/features/projects/members/owner_cannot_leave_project_spec.rb b/spec/features/projects/members/owner_cannot_leave_project_spec.rb
index 15162d01c44..0aa005adb4d 100644
--- a/spec/features/projects/members/owner_cannot_leave_project_spec.rb
+++ b/spec/features/projects/members/owner_cannot_leave_project_spec.rb
@@ -1,14 +1,14 @@
require 'spec_helper'
-feature 'Projects > Members > Owner cannot leave project' do
+describe 'Projects > Members > Owner cannot leave project' do
let(:project) { create(:project) }
- background do
+ before do
sign_in(project.owner)
visit project_path(project)
end
- scenario 'user does not see a "Leave project" link' do
+ it 'user does not see a "Leave project" link' do
expect(page).not_to have_content 'Leave project'
end
end
diff --git a/spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb b/spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb
index c27925c8dc4..eb1b720af05 100644
--- a/spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb
+++ b/spec/features/projects/members/owner_cannot_request_access_to_his_project_spec.rb
@@ -1,14 +1,14 @@
require 'spec_helper'
-feature 'Projects > Members > Owner cannot request access to his project' do
+describe 'Projects > Members > Owner cannot request access to his project' do
let(:project) { create(:project) }
- background do
+ before do
sign_in(project.owner)
visit project_path(project)
end
- scenario 'owner does not see the request access button' do
+ it 'owner does not see the request access button' do
expect(page).not_to have_content 'Request Access'
end
end
diff --git a/spec/features/projects/members/share_with_group_spec.rb b/spec/features/projects/members/share_with_group_spec.rb
index 134c8b8bc39..b126f0c6cb1 100644
--- a/spec/features/projects/members/share_with_group_spec.rb
+++ b/spec/features/projects/members/share_with_group_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Project > Members > Share with Group', :js do
+describe 'Project > Members > Share with Group', :js do
include Select2Helper
include ActionView::Helpers::DateHelper
@@ -8,14 +8,14 @@ feature 'Project > Members > Share with Group', :js do
describe 'Share with group lock' do
shared_examples 'the project can be shared with groups' do
- scenario 'the "Share with group" tab exists' do
+ it 'the "Share with group" tab exists' do
visit project_settings_members_path(project)
expect(page).to have_selector('#share-with-group-tab')
end
end
shared_examples 'the project cannot be shared with groups' do
- scenario 'the "Share with group" tab does not exist' do
+ it 'the "Share with group" tab does not exist' do
visit project_settings_members_path(project)
expect(page).to have_selector('#add-member-tab')
expect(page).not_to have_selector('#share-with-group-tab')
@@ -26,7 +26,7 @@ feature 'Project > Members > Share with Group', :js do
let!(:group_to_share_with) { create(:group) }
let(:project) { create(:project, namespace: create(:group)) }
- background do
+ before do
project.add_master(master)
sign_in(master)
end
@@ -34,7 +34,7 @@ feature 'Project > Members > Share with Group', :js do
context 'when the group has "Share with group lock" disabled' do
it_behaves_like 'the project can be shared with groups'
- scenario 'the project can be shared with another group' do
+ it 'the project can be shared with another group' do
visit project_settings_members_path(project)
click_on 'share-with-group-tab'
@@ -64,7 +64,7 @@ feature 'Project > Members > Share with Group', :js do
let(:subgroup) { create(:group, parent: root_group) }
let(:project) { create(:project, namespace: subgroup) }
- background do
+ before do
project.add_master(master)
sign_in(master)
end
@@ -126,7 +126,7 @@ feature 'Project > Members > Share with Group', :js do
find('.btn-create').click
end
- scenario 'the group link shows the expiration time with a warning class' do
+ it 'the group link shows the expiration time with a warning class' do
page.within('.project-members-groups') do
# Using distance_of_time_in_words_to_now because it is not the same as
# subtraction, and this way avoids time zone issues as well
@@ -141,7 +141,7 @@ feature 'Project > Members > Share with Group', :js do
context 'with multiple groups to choose from' do
let(:project) { create(:project) }
- background do
+ before do
project.add_master(master)
sign_in(master)
@@ -173,14 +173,14 @@ feature 'Project > Members > Share with Group', :js do
let!(:group_to_share_with) { create(:group) }
let!(:project) { create(:project, namespace: nested_group) }
- background do
+ before do
project.add_master(master)
sign_in(master)
group.add_master(master)
group_to_share_with.add_master(master)
end
- scenario 'the groups dropdown does not show ancestors', :nested_groups do
+ it 'the groups dropdown does not show ancestors', :nested_groups do
visit project_settings_members_path(project)
click_on 'share-with-group-tab'
diff --git a/spec/features/projects/members/sorting_spec.rb b/spec/features/projects/members/sorting_spec.rb
index afa173c59e5..1e1071348c3 100644
--- a/spec/features/projects/members/sorting_spec.rb
+++ b/spec/features/projects/members/sorting_spec.rb
@@ -1,17 +1,17 @@
require 'spec_helper'
-feature 'Projects > Members > Sorting' do
+describe 'Projects > Members > Sorting' do
let(:master) { create(:user, name: 'John Doe') }
let(:developer) { create(:user, name: 'Mary Jane', last_sign_in_at: 5.days.ago) }
let(:project) { create(:project, namespace: master.namespace, creator: master) }
- background do
+ before do
create(:project_member, :developer, user: developer, project: project, created_at: 3.days.ago)
sign_in(master)
end
- scenario 'sorts alphabetically by default' do
+ it 'sorts alphabetically by default' do
visit_members_list(sort: nil)
expect(first_member).to include(master.name)
@@ -19,7 +19,7 @@ feature 'Projects > Members > Sorting' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, ascending')
end
- scenario 'sorts by access level ascending' do
+ it 'sorts by access level ascending' do
visit_members_list(sort: :access_level_asc)
expect(first_member).to include(developer.name)
@@ -27,7 +27,7 @@ feature 'Projects > Members > Sorting' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Access level, ascending')
end
- scenario 'sorts by access level descending' do
+ it 'sorts by access level descending' do
visit_members_list(sort: :access_level_desc)
expect(first_member).to include(master.name)
@@ -35,7 +35,7 @@ feature 'Projects > Members > Sorting' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Access level, descending')
end
- scenario 'sorts by last joined' do
+ it 'sorts by last joined' do
visit_members_list(sort: :last_joined)
expect(first_member).to include(master.name)
@@ -43,7 +43,7 @@ feature 'Projects > Members > Sorting' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Last joined')
end
- scenario 'sorts by oldest joined' do
+ it 'sorts by oldest joined' do
visit_members_list(sort: :oldest_joined)
expect(first_member).to include(developer.name)
@@ -51,7 +51,7 @@ feature 'Projects > Members > Sorting' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Oldest joined')
end
- scenario 'sorts by name ascending' do
+ it 'sorts by name ascending' do
visit_members_list(sort: :name_asc)
expect(first_member).to include(master.name)
@@ -59,7 +59,7 @@ feature 'Projects > Members > Sorting' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, ascending')
end
- scenario 'sorts by name descending' do
+ it 'sorts by name descending' do
visit_members_list(sort: :name_desc)
expect(first_member).to include(developer.name)
@@ -67,7 +67,7 @@ feature 'Projects > Members > Sorting' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Name, descending')
end
- scenario 'sorts by recent sign in', :clean_gitlab_redis_shared_state do
+ it 'sorts by recent sign in', :clean_gitlab_redis_shared_state do
visit_members_list(sort: :recent_sign_in)
expect(first_member).to include(master.name)
@@ -75,7 +75,7 @@ feature 'Projects > Members > Sorting' do
expect(page).to have_css('.member-sort-dropdown .dropdown-toggle-text', text: 'Recent sign in')
end
- scenario 'sorts by oldest sign in', :clean_gitlab_redis_shared_state do
+ it 'sorts by oldest sign in', :clean_gitlab_redis_shared_state do
visit_members_list(sort: :oldest_sign_in)
expect(first_member).to include(developer.name)
diff --git a/spec/features/projects/members/user_requests_access_spec.rb b/spec/features/projects/members/user_requests_access_spec.rb
index 672d5daa3d8..35d6ac1c650 100644
--- a/spec/features/projects/members/user_requests_access_spec.rb
+++ b/spec/features/projects/members/user_requests_access_spec.rb
@@ -1,23 +1,23 @@
require 'spec_helper'
-feature 'Projects > Members > User requests access', :js do
+describe 'Projects > Members > User requests access', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :public, :access_requestable, :repository) }
let(:master) { project.owner }
- background do
+ before do
sign_in(user)
visit project_path(project)
end
- scenario 'request access feature is disabled' do
+ it 'request access feature is disabled' do
project.update_attributes(request_access_enabled: false)
visit project_path(project)
expect(page).not_to have_content 'Request Access'
end
- scenario 'user can request access to a project' do
+ it 'user can request access to a project' do
perform_enqueued_jobs { click_link 'Request Access' }
expect(ActionMailer::Base.deliveries.last.to).to eq [master.notification_email]
@@ -31,7 +31,7 @@ feature 'Projects > Members > User requests access', :js do
end
context 'code access is restricted' do
- scenario 'user can request access' do
+ it 'user can request access' do
project.project_feature.update!(repository_access_level: ProjectFeature::PRIVATE,
builds_access_level: ProjectFeature::PRIVATE,
merge_requests_access_level: ProjectFeature::PRIVATE)
@@ -41,7 +41,7 @@ feature 'Projects > Members > User requests access', :js do
end
end
- scenario 'user is not listed in the project members page' do
+ it 'user is not listed in the project members page' do
click_link 'Request Access'
expect(project.requesters.exists?(user_id: user)).to be_truthy
@@ -55,7 +55,7 @@ feature 'Projects > Members > User requests access', :js do
end
end
- scenario 'user can withdraw its request for access' do
+ it 'user can withdraw its request for access' do
click_link 'Request Access'
expect(project.requesters.exists?(user_id: user)).to be_truthy
diff --git a/spec/features/projects/merge_request_button_spec.rb b/spec/features/projects/merge_request_button_spec.rb
index b571d5a0e26..69561b4d733 100644
--- a/spec/features/projects/merge_request_button_spec.rb
+++ b/spec/features/projects/merge_request_button_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Merge Request button' do
+describe 'Merge Request button' do
shared_examples 'Merge request button only shown when allowed' do
let(:user) { create(:user) }
let(:project) { create(:project, :public, :repository) }
diff --git a/spec/features/projects/milestones/milestone_spec.rb b/spec/features/projects/milestones/milestone_spec.rb
index 20a52d6011f..ff31092b910 100644
--- a/spec/features/projects/milestones/milestone_spec.rb
+++ b/spec/features/projects/milestones/milestone_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Project milestone' do
+describe 'Project milestone' do
let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) }
let(:milestone) { create(:milestone, project: project) }
diff --git a/spec/features/projects/milestones/milestones_sorting_spec.rb b/spec/features/projects/milestones/milestones_sorting_spec.rb
index b64786d4eec..dc711377e6e 100644
--- a/spec/features/projects/milestones/milestones_sorting_spec.rb
+++ b/spec/features/projects/milestones/milestones_sorting_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Milestones sorting', :js do
+describe 'Milestones sorting', :js do
let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) }
@@ -17,7 +17,7 @@ feature 'Milestones sorting', :js do
sign_in(user)
end
- scenario 'visit project milestones and sort by due_date_asc' do
+ it 'visit project milestones and sort by due_date_asc' do
visit project_milestones_path(project)
expect(page).to have_button('Due soon')
diff --git a/spec/features/projects/milestones/new_spec.rb b/spec/features/projects/milestones/new_spec.rb
index 6595bff549b..0b5ab547dce 100644
--- a/spec/features/projects/milestones/new_spec.rb
+++ b/spec/features/projects/milestones/new_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Creating a new project milestone', :js do
+describe 'Creating a new project milestone', :js do
let(:user) { create(:user) }
let(:project) { create(:project, name: 'test', namespace: user.namespace) }
diff --git a/spec/features/projects/new_project_spec.rb b/spec/features/projects/new_project_spec.rb
index 3876e0cc3b1..f23ec11a458 100644
--- a/spec/features/projects/new_project_spec.rb
+++ b/spec/features/projects/new_project_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'New project' do
+describe 'New project' do
include Select2Helper
let(:user) { create(:admin) }
diff --git a/spec/features/projects/pages_spec.rb b/spec/features/projects/pages_spec.rb
index a2899ec0f48..6bf65e16291 100644
--- a/spec/features/projects/pages_spec.rb
+++ b/spec/features/projects/pages_spec.rb
@@ -1,11 +1,11 @@
require 'spec_helper'
-feature 'Pages' do
- given(:project) { create(:project) }
- given(:user) { create(:user) }
- given(:role) { :master }
+describe 'Pages' do
+ let(:project) { create(:project) }
+ let(:user) { create(:user) }
+ let(:role) { :master }
- background do
+ before do
allow(Gitlab.config.pages).to receive(:enabled).and_return(true)
project.add_role(user, role)
@@ -14,7 +14,7 @@ feature 'Pages' do
end
shared_examples 'no pages deployed' do
- scenario 'does not see anything to destroy' do
+ it 'does not see anything to destroy' do
visit project_pages_path(project)
expect(page).to have_content('Configure pages')
@@ -24,16 +24,16 @@ feature 'Pages' do
end
context 'when user is the owner' do
- background do
+ before do
project.namespace.update(owner: user)
end
context 'when pages deployed' do
- background do
+ before do
allow_any_instance_of(Project).to receive(:pages_deployed?) { true }
end
- scenario 'renders Access pages' do
+ it 'renders Access pages' do
visit project_pages_path(project)
expect(page).to have_content('Access pages')
@@ -48,7 +48,7 @@ feature 'Pages' do
end
context 'when pages are exposed on external HTTP address', :http_pages_enabled do
- given(:project) { create(:project, pages_https_only: false) }
+ let(:project) { create(:project, pages_https_only: false) }
shared_examples 'adds new domain' do
it 'adds new domain' do
@@ -210,11 +210,11 @@ feature 'Pages' do
context 'when the user is not the owner' do
context 'when pages deployed' do
- background do
+ before do
allow_any_instance_of(Project).to receive(:pages_deployed?) { true }
end
- scenario 'sees "Only the project owner can remove pages" text' do
+ it 'sees "Only the project owner can remove pages" text' do
visit project_pages_path(project)
expect(page).to have_text('Only the project owner can remove pages')
@@ -225,13 +225,13 @@ feature 'Pages' do
end
describe 'HTTPS settings', :js, :https_pages_enabled do
- background do
+ before do
project.namespace.update(owner: user)
allow_any_instance_of(Project).to receive(:pages_deployed?) { true }
end
- scenario 'tries to change the setting' do
+ it 'tries to change the setting' do
visit project_pages_path(project)
expect(page).to have_content("Force domains with SSL certificates to use HTTPS")
@@ -251,7 +251,7 @@ feature 'Pages' do
allow(service).to receive(:execute).and_return(status: :error)
end
- scenario 'tries to change the setting' do
+ it 'tries to change the setting' do
visit project_pages_path(project)
uncheck :project_pages_https_only
@@ -263,13 +263,13 @@ feature 'Pages' do
end
context 'non-HTTPS domain exists' do
- given(:project) { create(:project, pages_https_only: false) }
+ let(:project) { create(:project, pages_https_only: false) }
before do
create(:pages_domain, :without_key, :without_certificate, project: project)
end
- scenario 'the setting is disabled' do
+ it 'the setting is disabled' do
visit project_pages_path(project)
expect(page).to have_field(:project_pages_https_only, disabled: true)
@@ -278,7 +278,7 @@ feature 'Pages' do
end
context 'HTTPS pages are disabled', :https_pages_disabled do
- scenario 'the setting is unavailable' do
+ it 'the setting is unavailable' do
visit project_pages_path(project)
expect(page).not_to have_field(:project_pages_https_only)
diff --git a/spec/features/projects/pipeline_schedules_spec.rb b/spec/features/projects/pipeline_schedules_spec.rb
index 065d00d51d4..220b3529c59 100644
--- a/spec/features/projects/pipeline_schedules_spec.rb
+++ b/spec/features/projects/pipeline_schedules_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Pipeline Schedules', :js do
+describe 'Pipeline Schedules', :js do
include PipelineSchedulesHelper
let!(:project) { create(:project, :repository) }
@@ -155,7 +155,7 @@ feature 'Pipeline Schedules', :js do
end
context 'when user creates a new pipeline schedule with variables' do
- background do
+ before do
visit_pipelines_schedules
click_link 'New schedule'
fill_in_schedule_form
@@ -166,7 +166,7 @@ feature 'Pipeline Schedules', :js do
save_pipeline_schedule
end
- scenario 'user sees the new variable in edit window' do
+ it 'user sees the new variable in edit window' do
find(".content-list .pipeline-schedule-table-row:nth-child(1) .btn-group a[title='Edit']").click
page.within('.ci-variable-list') do
expect(find(".ci-variable-row:nth-child(1) .js-ci-variable-input-key").value).to eq('AAA')
@@ -178,7 +178,7 @@ feature 'Pipeline Schedules', :js do
end
context 'when user edits a variable of a pipeline schedule' do
- background do
+ before do
create(:ci_pipeline_schedule, project: project, owner: user).tap do |pipeline_schedule|
create(:ci_pipeline_schedule_variable, key: 'AAA', value: 'AAA123', pipeline_schedule: pipeline_schedule)
end
@@ -192,7 +192,7 @@ feature 'Pipeline Schedules', :js do
click_button 'Save pipeline schedule'
end
- scenario 'user sees the updated variable in edit window' do
+ it 'user sees the updated variable in edit window' do
find(".content-list .pipeline-schedule-table-row:nth-child(1) .btn-group a[title='Edit']").click
page.within('.ci-variable-list') do
expect(find(".ci-variable-row:nth-child(1) .js-ci-variable-input-key").value).to eq('foo')
@@ -202,7 +202,7 @@ feature 'Pipeline Schedules', :js do
end
context 'when user removes a variable of a pipeline schedule' do
- background do
+ before do
create(:ci_pipeline_schedule, project: project, owner: user).tap do |pipeline_schedule|
create(:ci_pipeline_schedule_variable, key: 'AAA', value: 'AAA123', pipeline_schedule: pipeline_schedule)
end
@@ -213,7 +213,7 @@ feature 'Pipeline Schedules', :js do
click_button 'Save pipeline schedule'
end
- scenario 'user does not see the removed variable in edit window' do
+ it 'user does not see the removed variable in edit window' do
find(".content-list .pipeline-schedule-table-row:nth-child(1) .btn-group a[title='Edit']").click
page.within('.ci-variable-list') do
expect(find(".ci-variable-row:nth-child(1) .js-ci-variable-input-key").value).to eq('')
@@ -223,13 +223,13 @@ feature 'Pipeline Schedules', :js do
end
context 'when active is true and next_run_at is NULL' do
- background do
+ before do
create(:ci_pipeline_schedule, project: project, owner: user).tap do |pipeline_schedule|
pipeline_schedule.update_attribute(:cron, nil) # Consequently next_run_at will be nil
end
end
- scenario 'user edit and recover the problematic pipeline schedule' do
+ it 'user edit and recover the problematic pipeline schedule' do
visit_pipelines_schedules
find(".content-list .pipeline-schedule-table-row:nth-child(1) .btn-group a[title='Edit']").click
fill_in 'schedule_cron', with: '* 1 2 3 4'
diff --git a/spec/features/projects/remote_mirror_spec.rb b/spec/features/projects/remote_mirror_spec.rb
index 81a6b613cc8..53a3f6f474b 100644
--- a/spec/features/projects/remote_mirror_spec.rb
+++ b/spec/features/projects/remote_mirror_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Project remote mirror', :feature do
+describe 'Project remote mirror', :feature do
let(:project) { create(:project, :repository, :remote_mirror) }
let(:remote_mirror) { project.remote_mirrors.first }
let(:user) { create(:user) }
diff --git a/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb b/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb
index fce41ce347f..d4a6417290d 100644
--- a/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb
+++ b/spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Setup Mattermost slash commands', :js do
+describe 'Setup Mattermost slash commands', :js do
let(:user) { create(:user) }
let(:project) { create(:project) }
let(:service) { project.create_mattermost_slash_commands_service }
diff --git a/spec/features/projects/services/user_activates_slack_slash_command_spec.rb b/spec/features/projects/services/user_activates_slack_slash_command_spec.rb
index 4a88654210c..f540b76c784 100644
--- a/spec/features/projects/services/user_activates_slack_slash_command_spec.rb
+++ b/spec/features/projects/services/user_activates_slack_slash_command_spec.rb
@@ -1,11 +1,11 @@
require 'spec_helper'
-feature 'Slack slash commands' do
- given(:user) { create(:user) }
- given(:project) { create(:project) }
- given(:service) { project.create_slack_slash_commands_service }
+describe 'Slack slash commands' do
+ let(:user) { create(:user) }
+ let(:project) { create(:project) }
+ let(:service) { project.create_slack_slash_commands_service }
- background do
+ before do
project.add_master(user)
sign_in(user)
visit edit_project_service_path(project, service)
diff --git a/spec/features/projects/settings/project_badges_spec.rb b/spec/features/projects/settings/project_badges_spec.rb
index 4893bef8884..e53da997c1d 100644
--- a/spec/features/projects/settings/project_badges_spec.rb
+++ b/spec/features/projects/settings/project_badges_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Project Badges' do
+describe 'Project Badges' do
include WaitForRequests
let(:user) { create(:user) }
diff --git a/spec/features/projects/settings/repository_settings_spec.rb b/spec/features/projects/settings/repository_settings_spec.rb
index 08b40653764..f085e1aa50a 100644
--- a/spec/features/projects/settings/repository_settings_spec.rb
+++ b/spec/features/projects/settings/repository_settings_spec.rb
@@ -101,7 +101,7 @@ describe 'Projects > Settings > Repository settings' do
visit project_settings_repository_path(project)
end
- scenario 'view deploy tokens' do
+ it 'view deploy tokens' do
within('.deploy-tokens') do
expect(page).to have_content(deploy_token.name)
expect(page).to have_content('read_repository')
@@ -109,7 +109,7 @@ describe 'Projects > Settings > Repository settings' do
end
end
- scenario 'add a new deploy token' do
+ it 'add a new deploy token' do
fill_in 'deploy_token_name', with: 'new_deploy_key'
fill_in 'deploy_token_expires_at', with: (Date.today + 1.month).to_s
check 'deploy_token_read_repository'
diff --git a/spec/features/projects/show/developer_views_empty_project_instructions_spec.rb b/spec/features/projects/show/developer_views_empty_project_instructions_spec.rb
index 8803b5222be..227bdf524fe 100644
--- a/spec/features/projects/show/developer_views_empty_project_instructions_spec.rb
+++ b/spec/features/projects/show/developer_views_empty_project_instructions_spec.rb
@@ -1,23 +1,23 @@
require 'rails_helper'
-feature 'Projects > Show > Developer views empty project instructions' do
+describe 'Projects > Show > Developer views empty project instructions' do
let(:project) { create(:project, :empty_repo) }
let(:developer) { create(:user) }
- background do
+ before do
project.add_developer(developer)
sign_in(developer)
end
context 'without an SSH key' do
- scenario 'defaults to HTTP' do
+ it 'defaults to HTTP' do
visit_project
expect_instructions_for('http')
end
- scenario 'switches to SSH', :js do
+ it 'switches to SSH', :js do
visit_project
select_protocol('SSH')
@@ -27,17 +27,17 @@ feature 'Projects > Show > Developer views empty project instructions' do
end
context 'with an SSH key' do
- background do
+ before do
create(:personal_key, user: developer)
end
- scenario 'defaults to SSH' do
+ it 'defaults to SSH' do
visit_project
expect_instructions_for('ssh')
end
- scenario 'switches to HTTP', :js do
+ it 'switches to HTTP', :js do
visit_project
select_protocol('HTTP')
diff --git a/spec/features/projects/show/download_buttons_spec.rb b/spec/features/projects/show/download_buttons_spec.rb
index 254affd4a94..3a2dcc5aa55 100644
--- a/spec/features/projects/show/download_buttons_spec.rb
+++ b/spec/features/projects/show/download_buttons_spec.rb
@@ -1,12 +1,12 @@
require 'spec_helper'
-feature 'Projects > Show > Download buttons' do
- given(:user) { create(:user) }
- given(:role) { :developer }
- given(:status) { 'success' }
- given(:project) { create(:project, :repository) }
+describe 'Projects > Show > Download buttons' do
+ let(:user) { create(:user) }
+ let(:role) { :developer }
+ let(:status) { 'success' }
+ let(:project) { create(:project, :repository) }
- given(:pipeline) do
+ let(:pipeline) do
create(:ci_pipeline,
project: project,
sha: project.commit.sha,
@@ -14,14 +14,14 @@ feature 'Projects > Show > Download buttons' do
status: status)
end
- given!(:build) do
+ let!(:build) do
create(:ci_build, :success, :artifacts,
pipeline: pipeline,
status: pipeline.status,
name: 'build')
end
- background do
+ before do
sign_in(user)
project.add_role(user, role)
end
@@ -32,13 +32,13 @@ feature 'Projects > Show > Download buttons' do
visit project_path(project)
end
- scenario 'shows download artifacts button' do
+ it 'shows download artifacts button' do
href = latest_succeeded_project_artifacts_path(project, "#{project.default_branch}/download", job: 'build')
expect(page).to have_link "Download '#{build.name}'", href: href
end
- scenario 'download links have download attribute' do
+ it 'download links have download attribute' do
expect(page).to have_selector('a', text: 'Download')
page.all('a', text: 'Download').each do |link|
expect(link[:download]).to eq ''
diff --git a/spec/features/projects/show/no_password_spec.rb b/spec/features/projects/show/no_password_spec.rb
index b3b3212556c..8259d482fd9 100644
--- a/spec/features/projects/show/no_password_spec.rb
+++ b/spec/features/projects/show/no_password_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'No Password Alert' do
+describe 'No Password Alert' do
let(:project) { create(:project, :repository, namespace: user.namespace) }
context 'with internal auth enabled' do
diff --git a/spec/features/projects/show/rss_spec.rb b/spec/features/projects/show/rss_spec.rb
index 52164d30c40..4d9135b9677 100644
--- a/spec/features/projects/show/rss_spec.rb
+++ b/spec/features/projects/show/rss_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Projects > Show > RSS' do
+describe 'Projects > Show > RSS' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
let(:path) { project_path(project) }
diff --git a/spec/features/projects/tags/download_buttons_spec.rb b/spec/features/projects/tags/download_buttons_spec.rb
index b62498194c4..fbfd8cee7aa 100644
--- a/spec/features/projects/tags/download_buttons_spec.rb
+++ b/spec/features/projects/tags/download_buttons_spec.rb
@@ -1,13 +1,13 @@
require 'spec_helper'
-feature 'Download buttons in tags page' do
- given(:user) { create(:user) }
- given(:role) { :developer }
- given(:status) { 'success' }
- given(:tag) { 'v1.0.0' }
- given(:project) { create(:project, :repository) }
+describe 'Download buttons in tags page' do
+ let(:user) { create(:user) }
+ let(:role) { :developer }
+ let(:status) { 'success' }
+ let(:tag) { 'v1.0.0' }
+ let(:project) { create(:project, :repository) }
- given(:pipeline) do
+ let(:pipeline) do
create(:ci_pipeline,
project: project,
sha: project.commit(tag).sha,
@@ -15,14 +15,14 @@ feature 'Download buttons in tags page' do
status: status)
end
- given!(:build) do
+ let!(:build) do
create(:ci_build, :success, :artifacts,
pipeline: pipeline,
status: pipeline.status,
name: 'build')
end
- background do
+ before do
sign_in(user)
project.add_role(user, role)
end
@@ -33,7 +33,7 @@ feature 'Download buttons in tags page' do
visit project_tags_path(project)
end
- scenario 'shows download artifacts button' do
+ it 'shows download artifacts button' do
href = latest_succeeded_project_artifacts_path(project, "#{tag}/download", job: 'build')
expect(page).to have_link "Download '#{build.name}'", href: href
diff --git a/spec/features/projects/tree/create_directory_spec.rb b/spec/features/projects/tree/create_directory_spec.rb
index 3017048e506..d0902bce7f3 100644
--- a/spec/features/projects/tree/create_directory_spec.rb
+++ b/spec/features/projects/tree/create_directory_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Multi-file editor new directory', :js do
+describe 'Multi-file editor new directory', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
diff --git a/spec/features/projects/tree/create_file_spec.rb b/spec/features/projects/tree/create_file_spec.rb
index 56471c8e7aa..03a29fae0bd 100644
--- a/spec/features/projects/tree/create_file_spec.rb
+++ b/spec/features/projects/tree/create_file_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Multi-file editor new file', :js do
+describe 'Multi-file editor new file', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
diff --git a/spec/features/projects/tree/rss_spec.rb b/spec/features/projects/tree/rss_spec.rb
index f52b3cc1d86..022167d9c5f 100644
--- a/spec/features/projects/tree/rss_spec.rb
+++ b/spec/features/projects/tree/rss_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Project Tree RSS' do
+describe 'Project Tree RSS' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
let(:path) { project_tree_path(project, :master) }
diff --git a/spec/features/projects/tree/tree_show_spec.rb b/spec/features/projects/tree/tree_show_spec.rb
index c4b3fb9d171..dc59666ffce 100644
--- a/spec/features/projects/tree/tree_show_spec.rb
+++ b/spec/features/projects/tree/tree_show_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Projects tree' do
+describe 'Projects tree' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
diff --git a/spec/features/projects/tree/upload_file_spec.rb b/spec/features/projects/tree/upload_file_spec.rb
index 4dfc325b37e..804a4450ae2 100644
--- a/spec/features/projects/tree/upload_file_spec.rb
+++ b/spec/features/projects/tree/upload_file_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Multi-file editor upload file', :js do
+describe 'Multi-file editor upload file', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
let(:txt_file) { File.join(Rails.root, 'spec', 'fixtures', 'doc_sample.txt') }
diff --git a/spec/features/projects/user_creates_project_spec.rb b/spec/features/projects/user_creates_project_spec.rb
index f95469ad070..83d18996f4e 100644
--- a/spec/features/projects/user_creates_project_spec.rb
+++ b/spec/features/projects/user_creates_project_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'User creates a project', :js do
+describe 'User creates a project', :js do
let(:user) { create(:user) }
before do
diff --git a/spec/features/projects/wiki/markdown_preview_spec.rb b/spec/features/projects/wiki/markdown_preview_spec.rb
index bbdd98a7623..ef15e7e1ff9 100644
--- a/spec/features/projects/wiki/markdown_preview_spec.rb
+++ b/spec/features/projects/wiki/markdown_preview_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Projects > Wiki > User previews markdown changes', :js do
+describe 'Projects > Wiki > User previews markdown changes', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
let(:wiki_content) do
@@ -12,7 +12,7 @@ feature 'Projects > Wiki > User previews markdown changes', :js do
HEREDOC
end
- background do
+ before do
project.add_master(user)
sign_in(user)
diff --git a/spec/features/projects/wiki/shortcuts_spec.rb b/spec/features/projects/wiki/shortcuts_spec.rb
index 6178361082e..c01be1f14ed 100644
--- a/spec/features/projects/wiki/shortcuts_spec.rb
+++ b/spec/features/projects/wiki/shortcuts_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Wiki shortcuts', :js do
+describe 'Wiki shortcuts', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
let(:wiki_page) { create(:wiki_page, wiki: project.wiki, attrs: { title: 'home', content: 'Home page' }) }
@@ -10,7 +10,7 @@ feature 'Wiki shortcuts', :js do
visit project_wiki_path(project, wiki_page)
end
- scenario 'Visit edit wiki page using "e" keyboard shortcut' do
+ it 'Visit edit wiki page using "e" keyboard shortcut' do
find('body').native.send_key('e')
expect(find('.wiki-page-title')).to have_content('Edit Page')
diff --git a/spec/features/projects/wiki/user_deletes_wiki_page_spec.rb b/spec/features/projects/wiki/user_deletes_wiki_page_spec.rb
index 2c67cec6b67..5007794cd77 100644
--- a/spec/features/projects/wiki/user_deletes_wiki_page_spec.rb
+++ b/spec/features/projects/wiki/user_deletes_wiki_page_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'User deletes wiki page', :js do
+describe 'User deletes wiki page', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
let(:wiki_page) { create(:wiki_page, wiki: project.wiki) }
diff --git a/spec/features/projects/wiki/user_git_access_wiki_page_spec.rb b/spec/features/projects/wiki/user_git_access_wiki_page_spec.rb
index 823399ac3c3..db97d59e918 100644
--- a/spec/features/projects/wiki/user_git_access_wiki_page_spec.rb
+++ b/spec/features/projects/wiki/user_git_access_wiki_page_spec.rb
@@ -9,7 +9,7 @@ describe 'Projects > Wiki > User views Git access wiki page' do
sign_in(user)
end
- scenario 'Visit Wiki Page Current Commit' do
+ it 'Visit Wiki Page Current Commit' do
visit project_wiki_path(project, wiki_page)
click_link 'Clone repository'
diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb
index cfe979a8647..8636d17f2c4 100644
--- a/spec/features/projects_spec.rb
+++ b/spec/features/projects_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Project' do
+describe 'Project' do
include ProjectForksHelper
describe 'creating from template' do
diff --git a/spec/features/protected_branches_spec.rb b/spec/features/protected_branches_spec.rb
index 39bd4af6cd0..83a5f88f0b5 100644
--- a/spec/features/protected_branches_spec.rb
+++ b/spec/features/protected_branches_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Protected Branches', :js do
+describe 'Protected Branches', :js do
let(:user) { create(:user) }
let(:admin) { create(:admin) }
let(:project) { create(:project, :repository) }
diff --git a/spec/features/protected_tags_spec.rb b/spec/features/protected_tags_spec.rb
index efccaeaff6c..c8e92cd1c07 100644
--- a/spec/features/protected_tags_spec.rb
+++ b/spec/features/protected_tags_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Protected Tags', :js do
+describe 'Protected Tags', :js do
let(:user) { create(:user, :admin) }
let(:project) { create(:project, :repository) }
diff --git a/spec/features/raven_js_spec.rb b/spec/features/raven_js_spec.rb
index a9e815eaf4f..b0923b451ee 100644
--- a/spec/features/raven_js_spec.rb
+++ b/spec/features/raven_js_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'RavenJS' do
+describe 'RavenJS' do
let(:raven_path) { '/raven.chunk.js' }
it 'should not load raven if sentry is disabled' do
diff --git a/spec/features/runners_spec.rb b/spec/features/runners_spec.rb
index fe0b03a7e00..443c2b9acae 100644
--- a/spec/features/runners_spec.rb
+++ b/spec/features/runners_spec.rb
@@ -1,20 +1,20 @@
require 'spec_helper'
-feature 'Runners' do
- given(:user) { create(:user) }
+describe 'Runners' do
+ let(:user) { create(:user) }
- background do
+ before do
sign_in(user)
end
context 'when user opens runners page' do
- given(:project) { create(:project) }
+ let(:project) { create(:project) }
- background do
+ before do
project.add_master(user)
end
- scenario 'user can see a button to install runners on kubernetes clusters' do
+ it 'user can see a button to install runners on kubernetes clusters' do
visit project_runners_path(project)
expect(page).to have_link('Install Runner on Kubernetes', href: project_clusters_path(project))
@@ -22,16 +22,16 @@ feature 'Runners' do
end
context 'when a project has enabled shared_runners' do
- given(:project) { create(:project) }
+ let(:project) { create(:project) }
- background do
+ before do
project.add_master(user)
end
context 'when a project_type runner is activated on the project' do
- given!(:specific_runner) { create(:ci_runner, :project, projects: [project]) }
+ let!(:specific_runner) { create(:ci_runner, :project, projects: [project]) }
- scenario 'user sees the specific runner' do
+ it 'user sees the specific runner' do
visit project_runners_path(project)
within '.activated-specific-runners' do
@@ -43,7 +43,7 @@ feature 'Runners' do
expect(page).to have_content(specific_runner.platform)
end
- scenario 'user can pause and resume the specific runner' do
+ it 'user can pause and resume the specific runner' do
visit project_runners_path(project)
within '.activated-specific-runners' do
@@ -63,7 +63,7 @@ feature 'Runners' do
end
end
- scenario 'user removes an activated specific runner if this is last project for that runners' do
+ it 'user removes an activated specific runner if this is last project for that runners' do
visit project_runners_path(project)
within '.activated-specific-runners' do
@@ -73,7 +73,7 @@ feature 'Runners' do
expect(page).not_to have_content(specific_runner.display_name)
end
- scenario 'user edits the runner to be protected' do
+ it 'user edits the runner to be protected' do
visit project_runners_path(project)
within '.activated-specific-runners' do
@@ -89,11 +89,11 @@ feature 'Runners' do
end
context 'when a runner has a tag' do
- background do
+ before do
specific_runner.update(tag_list: ['tag'])
end
- scenario 'user edits runner not to run untagged jobs' do
+ it 'user edits runner not to run untagged jobs' do
visit project_runners_path(project)
within '.activated-specific-runners' do
@@ -110,9 +110,9 @@ feature 'Runners' do
end
context 'when a shared runner is activated on the project' do
- given!(:shared_runner) { create(:ci_runner, :instance) }
+ let!(:shared_runner) { create(:ci_runner, :instance) }
- scenario 'user sees CI/CD setting page' do
+ it 'user sees CI/CD setting page' do
visit project_runners_path(project)
expect(page.find('.available-shared-runners')).to have_content(shared_runner.display_name)
@@ -121,14 +121,14 @@ feature 'Runners' do
end
context 'when a specific runner exists in another project' do
- given(:another_project) { create(:project) }
- given!(:specific_runner) { create(:ci_runner, :project, projects: [another_project]) }
+ let(:another_project) { create(:project) }
+ let!(:specific_runner) { create(:ci_runner, :project, projects: [another_project]) }
- background do
+ before do
another_project.add_master(user)
end
- scenario 'user enables and disables a specific runner' do
+ it 'user enables and disables a specific runner' do
visit project_runners_path(project)
within '.available-specific-runners' do
@@ -146,14 +146,14 @@ feature 'Runners' do
end
context 'when application settings have shared_runners_text' do
- given(:shared_runners_text) { 'custom **shared** runners description' }
- given(:shared_runners_html) { 'custom shared runners description' }
+ let(:shared_runners_text) { 'custom **shared** runners description' }
+ let(:shared_runners_html) { 'custom shared runners description' }
- background do
+ before do
stub_application_setting(shared_runners_text: shared_runners_text)
end
- scenario 'user sees shared runners description' do
+ it 'user sees shared runners description' do
visit project_runners_path(project)
expect(page.find('.shared-runners-description')).to have_content(shared_runners_html)
@@ -162,13 +162,13 @@ feature 'Runners' do
end
context 'when a project has disabled shared_runners' do
- given(:project) { create(:project, shared_runners_enabled: false) }
+ let(:project) { create(:project, shared_runners_enabled: false) }
- background do
+ before do
project.add_master(user)
end
- scenario 'user enables shared runners' do
+ it 'user enables shared runners' do
visit project_runners_path(project)
click_on 'Enable shared Runners'
@@ -178,21 +178,21 @@ feature 'Runners' do
end
context 'group runners in project settings' do
- background do
+ before do
project.add_master(user)
end
- given(:group) { create :group }
+ let(:group) { create :group }
context 'as project and group maintainer' do
- background do
+ before do
group.add_master(user)
end
context 'project with a group but no group runner' do
- given(:project) { create :project, group: group }
+ let(:project) { create :project, group: group }
- scenario 'group runners are not available' do
+ it 'group runners are not available' do
visit project_runners_path(project)
expect(page).to have_content 'This group does not provide any group Runners yet'
@@ -205,9 +205,9 @@ feature 'Runners' do
context 'as project maintainer' do
context 'project without a group' do
- given(:project) { create :project }
+ let(:project) { create :project }
- scenario 'group runners are not available' do
+ it 'group runners are not available' do
visit project_runners_path(project)
expect(page).to have_content 'This project does not belong to a group and can therefore not make use of group Runners.'
@@ -215,10 +215,10 @@ feature 'Runners' do
end
context 'project with a group but no group runner' do
- given(:group) { create(:group) }
- given(:project) { create(:project, group: group) }
+ let(:group) { create(:group) }
+ let(:project) { create(:project, group: group) }
- scenario 'group runners are not available' do
+ it 'group runners are not available' do
visit project_runners_path(project)
expect(page).to have_content 'This group does not provide any group Runners yet.'
@@ -229,18 +229,18 @@ feature 'Runners' do
end
context 'project with a group and a group runner' do
- given(:group) { create(:group) }
- given(:project) { create(:project, group: group) }
- given!(:ci_runner) { create(:ci_runner, :group, groups: [group], description: 'group-runner') }
+ let(:group) { create(:group) }
+ let(:project) { create(:project, group: group) }
+ let!(:ci_runner) { create(:ci_runner, :group, groups: [group], description: 'group-runner') }
- scenario 'group runners are available' do
+ it 'group runners are available' do
visit project_runners_path(project)
expect(page).to have_content 'Available group Runners : 1'
expect(page).to have_content 'group-runner'
end
- scenario 'group runners may be disabled for a project' do
+ it 'group runners may be disabled for a project' do
visit project_runners_path(project)
click_on 'Disable group Runners'
@@ -258,13 +258,13 @@ feature 'Runners' do
end
context 'group runners in group settings' do
- given(:group) { create(:group) }
- background do
+ let(:group) { create(:group) }
+ before do
group.add_master(user)
end
context 'group with no runners' do
- scenario 'there are no runners displayed' do
+ it 'there are no runners displayed' do
visit group_settings_ci_cd_path(group)
expect(page).to have_content 'This group does not provide any group Runners yet'
@@ -274,7 +274,7 @@ feature 'Runners' do
context 'group with a runner' do
let!(:runner) { create(:ci_runner, :group, groups: [group], description: 'group-runner') }
- scenario 'the runner is visible' do
+ it 'the runner is visible' do
visit group_settings_ci_cd_path(group)
expect(page).not_to have_content 'This group does not provide any group Runners yet'
@@ -282,7 +282,7 @@ feature 'Runners' do
expect(page).to have_content 'group-runner'
end
- scenario 'user can pause and resume the group runner' do
+ it 'user can pause and resume the group runner' do
visit group_settings_ci_cd_path(group)
expect(page).to have_content('Pause')
@@ -299,7 +299,7 @@ feature 'Runners' do
expect(page).not_to have_content('Resume')
end
- scenario 'user can view runner details' do
+ it 'user can view runner details' do
visit group_settings_ci_cd_path(group)
expect(page).to have_content(runner.display_name)
@@ -309,7 +309,7 @@ feature 'Runners' do
expect(page).to have_content(runner.platform)
end
- scenario 'user can remove a group runner' do
+ it 'user can remove a group runner' do
visit group_settings_ci_cd_path(group)
click_on 'Remove Runner'
@@ -317,7 +317,7 @@ feature 'Runners' do
expect(page).not_to have_content(runner.display_name)
end
- scenario 'user edits the runner to be protected' do
+ it 'user edits the runner to be protected' do
visit group_settings_ci_cd_path(group)
first('.edit-runner > a').click
@@ -331,11 +331,11 @@ feature 'Runners' do
end
context 'when a runner has a tag' do
- background do
+ before do
runner.update(tag_list: ['tag'])
end
- scenario 'user edits runner not to run untagged jobs' do
+ it 'user edits runner not to run untagged jobs' do
visit group_settings_ci_cd_path(group)
first('.edit-runner > a').click
diff --git a/spec/features/snippets/explore_spec.rb b/spec/features/snippets/explore_spec.rb
index 835fd90adc8..c08f25875f8 100644
--- a/spec/features/snippets/explore_spec.rb
+++ b/spec/features/snippets/explore_spec.rb
@@ -1,11 +1,11 @@
require 'rails_helper'
-feature 'Explore Snippets' do
+describe 'Explore Snippets' do
let!(:public_snippet) { create(:personal_snippet, :public) }
let!(:internal_snippet) { create(:personal_snippet, :internal) }
let!(:private_snippet) { create(:personal_snippet, :private) }
- scenario 'User should see snippets that are not private' do
+ it 'User should see snippets that are not private' do
sign_in create(:user)
visit explore_snippets_path
@@ -14,7 +14,7 @@ feature 'Explore Snippets' do
expect(page).not_to have_content(private_snippet.title)
end
- scenario 'External user should see only public snippets' do
+ it 'External user should see only public snippets' do
sign_in create(:user, :external)
visit explore_snippets_path
@@ -23,7 +23,7 @@ feature 'Explore Snippets' do
expect(page).not_to have_content(private_snippet.title)
end
- scenario 'Not authenticated user should see only public snippets' do
+ it 'Not authenticated user should see only public snippets' do
visit explore_snippets_path
expect(page).to have_content(public_snippet.title)
diff --git a/spec/features/snippets/internal_snippet_spec.rb b/spec/features/snippets/internal_snippet_spec.rb
index 3a2768c424f..f6215b481dc 100644
--- a/spec/features/snippets/internal_snippet_spec.rb
+++ b/spec/features/snippets/internal_snippet_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'Internal Snippets', :js do
+describe 'Internal Snippets', :js do
let(:internal_snippet) { create(:personal_snippet, :internal) }
describe 'normal user' do
@@ -8,13 +8,13 @@ feature 'Internal Snippets', :js do
sign_in(create(:user))
end
- scenario 'sees internal snippets' do
+ it 'sees internal snippets' do
visit snippet_path(internal_snippet)
expect(page).to have_content(internal_snippet.content)
end
- scenario 'sees raw internal snippets' do
+ it 'sees raw internal snippets' do
visit raw_snippet_path(internal_snippet)
expect(page).to have_content(internal_snippet.content)
diff --git a/spec/features/snippets/public_snippets_spec.rb b/spec/features/snippets/public_snippets_spec.rb
index bdeeca7187e..71c72b98fad 100644
--- a/spec/features/snippets/public_snippets_spec.rb
+++ b/spec/features/snippets/public_snippets_spec.rb
@@ -1,7 +1,7 @@
require 'rails_helper'
-feature 'Public Snippets', :js do
- scenario 'Unauthenticated user should see public snippets' do
+describe 'Public Snippets', :js do
+ it 'Unauthenticated user should see public snippets' do
public_snippet = create(:personal_snippet, :public)
visit snippet_path(public_snippet)
@@ -10,7 +10,7 @@ feature 'Public Snippets', :js do
expect(page).to have_content(public_snippet.content)
end
- scenario 'Unauthenticated user should see raw public snippets' do
+ it 'Unauthenticated user should see raw public snippets' do
public_snippet = create(:personal_snippet, :public)
visit raw_snippet_path(public_snippet)
diff --git a/spec/features/snippets/search_snippets_spec.rb b/spec/features/snippets/search_snippets_spec.rb
index cd66a2cb20c..c137b0bcd96 100644
--- a/spec/features/snippets/search_snippets_spec.rb
+++ b/spec/features/snippets/search_snippets_spec.rb
@@ -1,7 +1,7 @@
require 'rails_helper'
-feature 'Search Snippets' do
- scenario 'User searches for snippets by title' do
+describe 'Search Snippets' do
+ it 'User searches for snippets by title' do
public_snippet = create(:personal_snippet, :public, title: 'Beginning and Middle')
private_snippet = create(:personal_snippet, :private, title: 'Middle and End')
@@ -19,7 +19,7 @@ feature 'Search Snippets' do
expect(page).to have_link(private_snippet.title)
end
- scenario 'User searches for snippet contents' do
+ it 'User searches for snippet contents' do
create(:personal_snippet,
:public,
title: 'Many lined snippet',
diff --git a/spec/features/snippets/show_spec.rb b/spec/features/snippets/show_spec.rb
index 5a48f5774ca..74b693f3eff 100644
--- a/spec/features/snippets/show_spec.rb
+++ b/spec/features/snippets/show_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Snippet', :js do
+describe 'Snippet', :js do
let(:project) { create(:project, :repository) }
let(:snippet) { create(:personal_snippet, :public, file_name: file_name, content: content) }
diff --git a/spec/features/snippets/user_creates_snippet_spec.rb b/spec/features/snippets/user_creates_snippet_spec.rb
index 941765b7578..879c46d7c4e 100644
--- a/spec/features/snippets/user_creates_snippet_spec.rb
+++ b/spec/features/snippets/user_creates_snippet_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'User creates snippet', :js do
+describe 'User creates snippet', :js do
include DropzoneHelper
let(:user) { create(:user) }
@@ -18,7 +18,7 @@ feature 'User creates snippet', :js do
end
end
- scenario 'Authenticated user creates a snippet' do
+ it 'Authenticated user creates a snippet' do
fill_form
click_button('Create snippet')
@@ -32,7 +32,7 @@ feature 'User creates snippet', :js do
expect(page).to have_content('Hello World!')
end
- scenario 'previews a snippet with file' do
+ it 'previews a snippet with file' do
fill_in 'personal_snippet_description', with: 'My Snippet'
dropzone_file Rails.root.join('spec', 'fixtures', 'banana_sample.gif')
find('.js-md-preview-button').click
@@ -48,7 +48,7 @@ feature 'User creates snippet', :js do
end
end
- scenario 'uploads a file when dragging into textarea' do
+ it 'uploads a file when dragging into textarea' do
fill_form
dropzone_file Rails.root.join('spec', 'fixtures', 'banana_sample.gif')
@@ -65,7 +65,7 @@ feature 'User creates snippet', :js do
expect(reqs.first.status_code).to eq(200)
end
- scenario 'validation fails for the first time' do
+ it 'validation fails for the first time' do
fill_in 'personal_snippet_title', with: 'My Snippet Title'
click_button('Create snippet')
@@ -90,7 +90,7 @@ feature 'User creates snippet', :js do
expect(reqs.first.status_code).to eq(200)
end
- scenario 'Authenticated user creates a snippet with + in filename' do
+ it 'Authenticated user creates a snippet with + in filename' do
fill_in 'personal_snippet_title', with: 'My Snippet Title'
page.within('.file-editor') do
find(:xpath, "//input[@id='personal_snippet_file_name']").set 'snippet+file+name'
diff --git a/spec/features/snippets/user_deletes_snippet_spec.rb b/spec/features/snippets/user_deletes_snippet_spec.rb
index ae5b883c477..7bdccacb0fa 100644
--- a/spec/features/snippets/user_deletes_snippet_spec.rb
+++ b/spec/features/snippets/user_deletes_snippet_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'User deletes snippet' do
+describe 'User deletes snippet' do
let(:user) { create(:user) }
let(:content) { 'puts "test"' }
let(:snippet) { create(:personal_snippet, :public, content: content, author: user) }
diff --git a/spec/features/snippets/user_edits_snippet_spec.rb b/spec/features/snippets/user_edits_snippet_spec.rb
index 71de6b6bd1c..77f62990158 100644
--- a/spec/features/snippets/user_edits_snippet_spec.rb
+++ b/spec/features/snippets/user_edits_snippet_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'User edits snippet', :js do
+describe 'User edits snippet', :js do
include DropzoneHelper
let(:file_name) { 'test.rb' }
diff --git a/spec/features/snippets/user_snippets_spec.rb b/spec/features/snippets/user_snippets_spec.rb
index 7bc27486787..e3065a899cc 100644
--- a/spec/features/snippets/user_snippets_spec.rb
+++ b/spec/features/snippets/user_snippets_spec.rb
@@ -1,23 +1,23 @@
require 'rails_helper'
-feature 'User Snippets' do
+describe 'User Snippets' do
let(:author) { create(:user) }
let!(:public_snippet) { create(:personal_snippet, :public, author: author, title: "This is a public snippet") }
let!(:internal_snippet) { create(:personal_snippet, :internal, author: author, title: "This is an internal snippet") }
let!(:private_snippet) { create(:personal_snippet, :private, author: author, title: "This is a private snippet") }
- background do
+ before do
sign_in author
visit dashboard_snippets_path
end
- scenario 'View all of my snippets' do
+ it 'View all of my snippets' do
expect(page).to have_content(public_snippet.title)
expect(page).to have_content(internal_snippet.title)
expect(page).to have_content(private_snippet.title)
end
- scenario 'View my public snippets' do
+ it 'View my public snippets' do
page.within('.snippet-scope-menu') do
click_link "Public"
end
@@ -27,7 +27,7 @@ feature 'User Snippets' do
expect(page).not_to have_content(private_snippet.title)
end
- scenario 'View my internal snippets' do
+ it 'View my internal snippets' do
page.within('.snippet-scope-menu') do
click_link "Internal"
end
@@ -37,7 +37,7 @@ feature 'User Snippets' do
expect(page).not_to have_content(private_snippet.title)
end
- scenario 'View my private snippets' do
+ it 'View my private snippets' do
page.within('.snippet-scope-menu') do
click_link "Private"
end
diff --git a/spec/features/tags/master_creates_tag_spec.rb b/spec/features/tags/master_creates_tag_spec.rb
index 6701f575a23..b4e8253057b 100644
--- a/spec/features/tags/master_creates_tag_spec.rb
+++ b/spec/features/tags/master_creates_tag_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Master creates tag' do
+describe 'Master creates tag' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, namespace: user.namespace) }
@@ -14,25 +14,25 @@ feature 'Master creates tag' do
visit project_tags_path(project)
end
- scenario 'with an invalid name displays an error' do
+ it 'with an invalid name displays an error' do
create_tag_in_form(tag: 'v 1.0', ref: 'master')
expect(page).to have_content 'Tag name invalid'
end
- scenario 'with an invalid reference displays an error' do
+ it 'with an invalid reference displays an error' do
create_tag_in_form(tag: 'v2.0', ref: 'foo')
expect(page).to have_content 'Target foo is invalid'
end
- scenario 'that already exists displays an error' do
+ it 'that already exists displays an error' do
create_tag_in_form(tag: 'v1.1.0', ref: 'master')
expect(page).to have_content 'Tag v1.1.0 already exists'
end
- scenario 'with multiline message displays the message in a <pre> block' do
+ it 'with multiline message displays the message in a <pre> block' do
create_tag_in_form(tag: 'v3.0', ref: 'master', message: "Awesome tag message\n\n- hello\n- world")
expect(current_path).to eq(
@@ -43,7 +43,7 @@ feature 'Master creates tag' do
end
end
- scenario 'with multiline release notes parses the release note as Markdown' do
+ it 'with multiline release notes parses the release note as Markdown' do
create_tag_in_form(tag: 'v4.0', ref: 'master', desc: "Awesome release notes\n\n- hello\n- world")
expect(current_path).to eq(
@@ -55,7 +55,7 @@ feature 'Master creates tag' do
end
end
- scenario 'opens dropdown for ref', :js do
+ it 'opens dropdown for ref', :js do
click_link 'New tag'
ref_row = find('.form-group:nth-of-type(2) .col-sm-10')
page.within ref_row do
diff --git a/spec/features/tags/master_deletes_tag_spec.rb b/spec/features/tags/master_deletes_tag_spec.rb
index 1d4df2c55a7..1443e259ed9 100644
--- a/spec/features/tags/master_deletes_tag_spec.rb
+++ b/spec/features/tags/master_deletes_tag_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Master deletes tag' do
+describe 'Master deletes tag' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, namespace: user.namespace) }
@@ -11,7 +11,7 @@ feature 'Master deletes tag' do
end
context 'from the tags list page', :js do
- scenario 'deletes the tag' do
+ it 'deletes the tag' do
expect(page).to have_content 'v1.1.0'
delete_first_tag
@@ -21,7 +21,7 @@ feature 'Master deletes tag' do
end
context 'from a specific tag page' do
- scenario 'deletes the tag' do
+ it 'deletes the tag' do
click_on 'v1.0.0'
expect(current_path).to eq(
project_tag_path(project, 'v1.0.0'))
@@ -40,7 +40,7 @@ feature 'Master deletes tag' do
.and_raise(Gitlab::Git::PreReceiveError, 'Do not delete tags')
end
- scenario 'shows the error message' do
+ it 'shows the error message' do
delete_first_tag
expect(page).to have_content('Do not delete tags')
diff --git a/spec/features/tags/master_updates_tag_spec.rb b/spec/features/tags/master_updates_tag_spec.rb
index 26f51bee887..4c0be6be96c 100644
--- a/spec/features/tags/master_updates_tag_spec.rb
+++ b/spec/features/tags/master_updates_tag_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Master updates tag' do
+describe 'Master updates tag' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, namespace: user.namespace) }
@@ -11,7 +11,7 @@ feature 'Master updates tag' do
end
context 'from the tags list page' do
- scenario 'updates the release notes' do
+ it 'updates the release notes' do
page.within(first('.content-list .controls')) do
click_link 'Edit release notes'
end
@@ -25,7 +25,7 @@ feature 'Master updates tag' do
expect(page).to have_content 'Awesome release notes'
end
- scenario 'description has emoji autocomplete', :js do
+ it 'description has emoji autocomplete', :js do
page.within(first('.content-list .controls')) do
click_link 'Edit release notes'
end
@@ -38,7 +38,7 @@ feature 'Master updates tag' do
end
context 'from a specific tag page' do
- scenario 'updates the release notes' do
+ it 'updates the release notes' do
click_on 'v1.1.0'
click_link 'Edit release notes'
fill_in 'release_description', with: 'Awesome release notes'
diff --git a/spec/features/tags/master_views_tags_spec.rb b/spec/features/tags/master_views_tags_spec.rb
index b625e7065cc..02ce0242614 100644
--- a/spec/features/tags/master_views_tags_spec.rb
+++ b/spec/features/tags/master_views_tags_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Master views tags' do
+describe 'Master views tags' do
let(:user) { create(:user) }
before do
@@ -19,7 +19,7 @@ feature 'Master views tags' do
visit project_tags_path(project)
end
- scenario 'displays a specific message' do
+ it 'displays a specific message' do
expect(page).to have_content 'Repository has no tags yet.'
end
end
@@ -32,7 +32,7 @@ feature 'Master views tags' do
visit project_tags_path(project)
end
- scenario 'avoids a N+1 query in branches index' do
+ it 'avoids a N+1 query in branches index' do
control_count = ActiveRecord::QueryRecorder.new { visit project_tags_path(project) }.count
%w(one two three four five).each { |tag| repository.add_tag(user, tag, 'master', 'foo') }
@@ -40,11 +40,11 @@ feature 'Master views tags' do
expect { visit project_tags_path(project) }.not_to exceed_query_limit(control_count)
end
- scenario 'views the tags list page' do
+ it 'views the tags list page' do
expect(page).to have_content 'v1.0.0'
end
- scenario 'views a specific tag page' do
+ it 'views a specific tag page' do
click_on 'v1.0.0'
expect(current_path).to eq(
@@ -54,7 +54,7 @@ feature 'Master views tags' do
end
describe 'links on the tag page' do
- scenario 'has a button to browse files' do
+ it 'has a button to browse files' do
click_on 'v1.0.0'
expect(current_path).to eq(
@@ -66,7 +66,7 @@ feature 'Master views tags' do
project_tree_path(project, 'v1.0.0'))
end
- scenario 'has a button to browse commits' do
+ it 'has a button to browse commits' do
click_on 'v1.0.0'
expect(current_path).to eq(
diff --git a/spec/features/task_lists_spec.rb b/spec/features/task_lists_spec.rb
index f37d8998045..64d05c57d3c 100644
--- a/spec/features/task_lists_spec.rb
+++ b/spec/features/task_lists_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Task Lists' do
+describe 'Task Lists' do
include Warden::Test::Helpers
let(:project) { create(:project, :repository) }
diff --git a/spec/features/triggers_spec.rb b/spec/features/triggers_spec.rb
index 6be2606fd0d..36dafccd186 100644
--- a/spec/features/triggers_spec.rb
+++ b/spec/features/triggers_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Triggers', :js do
+describe 'Triggers', :js do
let(:trigger_title) { 'trigger desc' }
let(:user) { create(:user) }
let(:user2) { create(:user) }
@@ -18,7 +18,7 @@ feature 'Triggers', :js do
end
describe 'create trigger workflow' do
- scenario 'prevents adding new trigger with no description' do
+ it 'prevents adding new trigger with no description' do
fill_in 'trigger_description', with: ''
click_button 'Add trigger'
@@ -26,7 +26,7 @@ feature 'Triggers', :js do
expect(page.find('form.gl-show-field-errors .gl-field-error')).to be_visible
end
- scenario 'adds new trigger with description' do
+ it 'adds new trigger with description' do
fill_in 'trigger_description', with: 'trigger desc'
click_button 'Add trigger'
@@ -40,7 +40,7 @@ feature 'Triggers', :js do
describe 'edit trigger workflow' do
let(:new_trigger_title) { 'new trigger' }
- scenario 'click on edit trigger opens edit trigger page' do
+ it 'click on edit trigger opens edit trigger page' do
create(:ci_trigger, owner: user, project: @project, description: trigger_title)
visit project_settings_ci_cd_path(@project)
@@ -49,7 +49,7 @@ feature 'Triggers', :js do
expect(page.find('#trigger_description').value).to have_content 'trigger desc'
end
- scenario 'edit trigger and save' do
+ it 'edit trigger and save' do
create(:ci_trigger, owner: user, project: @project, description: trigger_title)
visit project_settings_ci_cd_path(@project)
@@ -64,7 +64,7 @@ feature 'Triggers', :js do
expect(page.find('.triggers-list .trigger-owner')).to have_content user.name
end
- scenario 'edit "legacy" trigger and save' do
+ it 'edit "legacy" trigger and save' do
# Create new trigger without owner association, i.e. Legacy trigger
create(:ci_trigger, owner: nil, project: @project)
visit project_settings_ci_cd_path(@project)
@@ -87,12 +87,12 @@ feature 'Triggers', :js do
visit project_settings_ci_cd_path(@project)
end
- scenario 'button "Take ownership" has correct alert' do
+ it 'button "Take ownership" has correct alert' do
expected_alert = 'By taking ownership you will bind this trigger to your user account. With this the trigger will have access to all your projects as if it was you. Are you sure?'
expect(page.find('a.btn-trigger-take-ownership')['data-confirm']).to eq expected_alert
end
- scenario 'take trigger ownership' do
+ it 'take trigger ownership' do
# See if "Take ownership" on trigger works post trigger creation
page.accept_confirm do
first(:link, "Take ownership").send_keys(:return)
@@ -110,12 +110,12 @@ feature 'Triggers', :js do
visit project_settings_ci_cd_path(@project)
end
- scenario 'button "Revoke" has correct alert' do
+ it 'button "Revoke" has correct alert' do
expected_alert = 'By revoking a trigger you will break any processes making use of it. Are you sure?'
expect(page.find('a.btn-trigger-revoke')['data-confirm']).to eq expected_alert
end
- scenario 'revoke trigger' do
+ it 'revoke trigger' do
# See if "Revoke" on trigger works post trigger creation
page.accept_confirm do
find('a.btn-trigger-revoke').send_keys(:return)
@@ -127,11 +127,11 @@ feature 'Triggers', :js do
end
describe 'show triggers workflow' do
- scenario 'contains trigger description placeholder' do
+ it 'contains trigger description placeholder' do
expect(page.find('#trigger_description')['placeholder']).to eq 'Trigger description'
end
- scenario 'show "legacy" badge for legacy trigger' do
+ it 'show "legacy" badge for legacy trigger' do
create(:ci_trigger, owner: nil, project: @project)
visit project_settings_ci_cd_path(@project)
@@ -140,7 +140,7 @@ feature 'Triggers', :js do
expect(page.find('.triggers-list')).to have_selector('a[title="Edit"]')
end
- scenario 'show "invalid" badge for trigger with owner having insufficient permissions' do
+ it 'show "invalid" badge for trigger with owner having insufficient permissions' do
create(:ci_trigger, owner: guest_user, project: @project, description: trigger_title)
visit project_settings_ci_cd_path(@project)
@@ -149,7 +149,7 @@ feature 'Triggers', :js do
expect(page.find('.triggers-list')).not_to have_selector('a[title="Edit"]')
end
- scenario 'do not show "Edit" or full token for not owned trigger' do
+ it 'do not show "Edit" or full token for not owned trigger' do
# Create trigger with user different from current_user
create(:ci_trigger, owner: user2, project: @project, description: trigger_title)
visit project_settings_ci_cd_path(@project)
@@ -163,7 +163,7 @@ feature 'Triggers', :js do
expect(page.find('.triggers-list')).not_to have_selector('a[title="Edit"]')
end
- scenario 'show "Edit" and full token for owned trigger' do
+ it 'show "Edit" and full token for owned trigger' do
create(:ci_trigger, owner: user, project: @project, description: trigger_title)
visit project_settings_ci_cd_path(@project)
diff --git a/spec/features/u2f_spec.rb b/spec/features/u2f_spec.rb
index fb65b570dd6..f245c1ebbd9 100644
--- a/spec/features/u2f_spec.rb
+++ b/spec/features/u2f_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
+describe 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
def manage_two_factor_authentication
click_on 'Manage two-factor authentication'
expect(page).to have_content("Setup new U2F device")
diff --git a/spec/features/uploads/user_uploads_avatar_to_group_spec.rb b/spec/features/uploads/user_uploads_avatar_to_group_spec.rb
index c8db82a562f..a07edc42eae 100644
--- a/spec/features/uploads/user_uploads_avatar_to_group_spec.rb
+++ b/spec/features/uploads/user_uploads_avatar_to_group_spec.rb
@@ -1,7 +1,7 @@
require 'rails_helper'
-feature 'User uploads avatar to group' do
- scenario 'they see the new avatar' do
+describe 'User uploads avatar to group' do
+ it 'they see the new avatar' do
user = create(:user)
group = create(:group)
group.add_owner(user)
diff --git a/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb b/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb
index 766bb4f09cd..4db73fccfb6 100644
--- a/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb
+++ b/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'User uploads avatar to profile' do
+describe 'User uploads avatar to profile' do
let!(:user) { create(:user) }
let(:avatar_file_path) { Rails.root.join('spec', 'fixtures', 'dk.png') }
@@ -9,7 +9,7 @@ feature 'User uploads avatar to profile' do
visit profile_path
end
- scenario 'they see their new avatar on their profile' do
+ it 'they see their new avatar on their profile' do
attach_file('user_avatar', avatar_file_path, visible: false)
click_button 'Update profile settings'
@@ -21,7 +21,7 @@ feature 'User uploads avatar to profile' do
expect(user.reload.avatar.file).to exist
end
- scenario 'their new avatar is immediately visible in the header', :js do
+ it 'their new avatar is immediately visible in the header', :js do
find('.js-user-avatar-input', visible: false).set(avatar_file_path)
click_button 'Set new profile picture'
diff --git a/spec/features/uploads/user_uploads_file_to_note_spec.rb b/spec/features/uploads/user_uploads_file_to_note_spec.rb
index 972c10aaf23..24a00c86b0a 100644
--- a/spec/features/uploads/user_uploads_file_to_note_spec.rb
+++ b/spec/features/uploads/user_uploads_file_to_note_spec.rb
@@ -1,6 +1,6 @@
require 'rails_helper'
-feature 'User uploads file to note' do
+describe 'User uploads file to note' do
include DropzoneHelper
let(:user) { create(:user) }
@@ -71,7 +71,7 @@ feature 'User uploads file to note' do
expect(page).not_to have_selector('.uploading-progress-container', visible: true)
end
- scenario 'they see the attached file', :js do
+ it 'they see the attached file', :js do
dropzone_file([Rails.root.join('spec', 'fixtures', 'dk.png')])
click_button 'Comment'
wait_for_requests
diff --git a/spec/features/users/active_sessions_spec.rb b/spec/features/users/active_sessions_spec.rb
index 631d7e3bced..25349b5d036 100644
--- a/spec/features/users/active_sessions_spec.rb
+++ b/spec/features/users/active_sessions_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
-feature 'Active user sessions', :clean_gitlab_redis_shared_state do
- scenario 'Successful login adds a new active user login' do
+describe 'Active user sessions', :clean_gitlab_redis_shared_state do
+ it 'Successful login adds a new active user login' do
now = Time.zone.parse('2018-03-12 09:06')
Timecop.freeze(now) do
user = create(:user)
@@ -24,7 +24,7 @@ feature 'Active user sessions', :clean_gitlab_redis_shared_state do
end
end
- scenario 'Successful login cleans up obsolete entries' do
+ it 'Successful login cleans up obsolete entries' do
user = create(:user)
Gitlab::Redis::SharedState.with do |redis|
@@ -38,7 +38,7 @@ feature 'Active user sessions', :clean_gitlab_redis_shared_state do
end
end
- scenario 'Sessionless login does not clean up obsolete entries' do
+ it 'Sessionless login does not clean up obsolete entries' do
user = create(:user)
personal_access_token = create(:personal_access_token, user: user)
@@ -54,7 +54,7 @@ feature 'Active user sessions', :clean_gitlab_redis_shared_state do
end
end
- scenario 'Logout deletes the active user login' do
+ it 'Logout deletes the active user login' do
user = create(:user)
gitlab_sign_in(user)
expect(current_path).to eq root_path
diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb
index 24a2c89f50b..21891b9ccda 100644
--- a/spec/features/users/login_spec.rb
+++ b/spec/features/users/login_spec.rb
@@ -1,9 +1,9 @@
require 'spec_helper'
-feature 'Login' do
+describe 'Login' do
include TermsHelper
- scenario 'Successful user signin invalidates password reset token' do
+ it 'Successful user signin invalidates password reset token' do
user = create(:user)
expect(user.reset_password_token).to be_nil
diff --git a/spec/features/users/rss_spec.rb b/spec/features/users/rss_spec.rb
index c3734b5c808..9af4447056e 100644
--- a/spec/features/users/rss_spec.rb
+++ b/spec/features/users/rss_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'User RSS' do
+describe 'User RSS' do
let(:user) { create(:user) }
let(:path) { user_path(create(:user)) }