diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-30 06:08:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-30 06:08:09 +0300 |
commit | f80c3dfdfca4bd0c966cf78449dc5d8e529de4ed (patch) | |
tree | 996e4be27947bc74b6929a36aa12011cc21adbd4 /spec/features | |
parent | 091b62a1599d0450fd6b90639a7bea9459f2afdc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
15 files changed, 113 insertions, 59 deletions
diff --git a/spec/features/error_tracking/user_filters_errors_by_status_spec.rb b/spec/features/error_tracking/user_filters_errors_by_status_spec.rb index 168c4f330ca..5efcb5f8b8e 100644 --- a/spec/features/error_tracking/user_filters_errors_by_status_spec.rb +++ b/spec/features/error_tracking/user_filters_errors_by_status_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'When a user filters Sentry errors by status', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline, -feature_category: :error_tracking do + feature_category: :error_tracking do include_context 'sentry error tracking context feature' let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') } diff --git a/spec/features/error_tracking/user_searches_sentry_errors_spec.rb b/spec/features/error_tracking/user_searches_sentry_errors_spec.rb index 6026b42f7de..d4c537f1939 100644 --- a/spec/features/error_tracking/user_searches_sentry_errors_spec.rb +++ b/spec/features/error_tracking/user_searches_sentry_errors_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'When a user searches for Sentry errors', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline, -feature_category: :error_tracking do + feature_category: :error_tracking do include_context 'sentry error tracking context feature' let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') } diff --git a/spec/features/error_tracking/user_sees_error_details_spec.rb b/spec/features/error_tracking/user_sees_error_details_spec.rb index d7676d90d21..8fcf5df41c7 100644 --- a/spec/features/error_tracking/user_sees_error_details_spec.rb +++ b/spec/features/error_tracking/user_sees_error_details_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'View error details page', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline, -feature_category: :error_tracking do + feature_category: :error_tracking do include_context 'sentry error tracking context feature' context 'with current user as project owner' do diff --git a/spec/features/error_tracking/user_sees_error_index_spec.rb b/spec/features/error_tracking/user_sees_error_index_spec.rb index f83c8ffe439..e86e89ad058 100644 --- a/spec/features/error_tracking/user_sees_error_index_spec.rb +++ b/spec/features/error_tracking/user_sees_error_index_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'View error index page', :js, :use_clean_rails_memory_store_caching, :sidekiq_inline, -feature_category: :error_tracking do + feature_category: :error_tracking do include_context 'sentry error tracking context feature' let_it_be(:issues_response_body) { fixture_file('sentry/issues_sample_response.json') } diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb index de4b9964b98..67133b1856f 100644 --- a/spec/features/groups_spec.rb +++ b/spec/features/groups_spec.rb @@ -461,9 +461,11 @@ RSpec.describe 'Group', feature_category: :groups_and_projects do describe 'new subgroup / project button' do let_it_be(:group, reload: true) do - create(:group, - project_creation_level: Gitlab::Access::NO_ONE_PROJECT_ACCESS, - subgroup_creation_level: Gitlab::Access::OWNER_SUBGROUP_ACCESS) + create( + :group, + project_creation_level: Gitlab::Access::NO_ONE_PROJECT_ACCESS, + subgroup_creation_level: Gitlab::Access::OWNER_SUBGROUP_ACCESS + ) end before do diff --git a/spec/features/help_pages_spec.rb b/spec/features/help_pages_spec.rb index 905c5e25f6e..627326dde18 100644 --- a/spec/features/help_pages_spec.rb +++ b/spec/features/help_pages_spec.rb @@ -47,9 +47,11 @@ RSpec.describe 'Help Pages', feature_category: :shared do describe 'when help page is customized' do before do - stub_application_setting(help_page_hide_commercial_content: true, - help_page_text: 'My Custom Text', - help_page_support_url: 'http://example.com/help') + stub_application_setting( + help_page_hide_commercial_content: true, + help_page_text: 'My Custom Text', + help_page_support_url: 'http://example.com/help' + ) sign_in(create(:user)) visit help_path diff --git a/spec/features/ics/dashboard_issues_spec.rb b/spec/features/ics/dashboard_issues_spec.rb index 7115bd7dff7..00318f83105 100644 --- a/spec/features/ics/dashboard_issues_spec.rb +++ b/spec/features/ics/dashboard_issues_spec.rb @@ -29,9 +29,11 @@ RSpec.describe 'Dashboard Issues Calendar Feed', feature_category: :team_plannin context 'with no referer' do it 'renders calendar feed' do sign_in user - visit issues_dashboard_path(:ics, - due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, - sort: 'closest_future_date') + visit issues_dashboard_path( + :ics, + due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, + sort: 'closest_future_date' + ) expect(response_headers['Content-Type']).to have_content('text/calendar') expect(body).to have_text('BEGIN:VCALENDAR') @@ -42,9 +44,11 @@ RSpec.describe 'Dashboard Issues Calendar Feed', feature_category: :team_plannin it 'renders calendar feed as text/plain' do sign_in user page.driver.header('Referer', issues_dashboard_url(host: Settings.gitlab.base_url)) - visit issues_dashboard_path(:ics, - due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, - sort: 'closest_future_date') + visit issues_dashboard_path( + :ics, + due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, + sort: 'closest_future_date' + ) expect(response_headers['Content-Type']).to have_content('text/plain') expect(body).to have_text('BEGIN:VCALENDAR') @@ -54,10 +58,12 @@ RSpec.describe 'Dashboard Issues Calendar Feed', feature_category: :team_plannin context 'when filtered by milestone' do it 'renders calendar feed' do sign_in user - visit issues_dashboard_path(:ics, - due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, - sort: 'closest_future_date', - milestone_title: milestone.title) + visit issues_dashboard_path( + :ics, + due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, + sort: 'closest_future_date', + milestone_title: milestone.title + ) expect(response_headers['Content-Type']).to have_content('text/calendar') expect(body).to have_text('BEGIN:VCALENDAR') @@ -69,10 +75,12 @@ RSpec.describe 'Dashboard Issues Calendar Feed', feature_category: :team_plannin it 'renders calendar feed' do personal_access_token = create(:personal_access_token, user: user) - visit issues_dashboard_path(:ics, - due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, - sort: 'closest_future_date', - private_token: personal_access_token.token) + visit issues_dashboard_path( + :ics, + due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, + sort: 'closest_future_date', + private_token: personal_access_token.token + ) expect(response_headers['Content-Type']).to have_content('text/calendar') expect(body).to have_text('BEGIN:VCALENDAR') @@ -81,10 +89,12 @@ RSpec.describe 'Dashboard Issues Calendar Feed', feature_category: :team_plannin context 'when authenticated via feed token' do it 'renders calendar feed' do - visit issues_dashboard_path(:ics, - due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, - sort: 'closest_future_date', - feed_token: user.feed_token) + visit issues_dashboard_path( + :ics, + due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, + sort: 'closest_future_date', + feed_token: user.feed_token + ) expect(response_headers['Content-Type']).to have_content('text/calendar') expect(body).to have_text('BEGIN:VCALENDAR') @@ -93,15 +103,24 @@ RSpec.describe 'Dashboard Issues Calendar Feed', feature_category: :team_plannin context 'issue with due date' do let!(:issue) do - create(:issue, author: user, assignees: [assignee], project: project, title: 'test title', - description: 'test desc', due_date: Date.tomorrow) + create( + :issue, + author: user, + assignees: [assignee], + project: project, + title: 'test title', + description: 'test desc', + due_date: Date.tomorrow + ) end it 'renders issue fields' do - visit issues_dashboard_path(:ics, - due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, - sort: 'closest_future_date', - feed_token: user.feed_token) + visit issues_dashboard_path( + :ics, + due_date: Issue::DueNextMonthAndPreviousTwoWeeks.name, + sort: 'closest_future_date', + feed_token: user.feed_token + ) expect(body).to have_text("SUMMARY:test title (in #{project.full_path})") # line length for ics is 75 chars diff --git a/spec/features/ics/group_issues_spec.rb b/spec/features/ics/group_issues_spec.rb index 164f5df7cc5..ce9f5638a00 100644 --- a/spec/features/ics/group_issues_spec.rb +++ b/spec/features/ics/group_issues_spec.rb @@ -71,8 +71,15 @@ RSpec.describe 'Group Issues Calendar Feed', feature_category: :groups_and_proje context 'issue with due date' do let!(:issue) do - create(:issue, author: user, assignees: [assignee], project: project, title: 'test title', - description: 'test desc', due_date: Date.tomorrow) + create( + :issue, + author: user, + assignees: [assignee], + project: project, + title: 'test title', + description: 'test desc', + due_date: Date.tomorrow + ) end it 'renders issue fields' do diff --git a/spec/features/ics/project_issues_spec.rb b/spec/features/ics/project_issues_spec.rb index daad6f1df2f..c26147e0310 100644 --- a/spec/features/ics/project_issues_spec.rb +++ b/spec/features/ics/project_issues_spec.rb @@ -70,8 +70,15 @@ RSpec.describe 'Project Issues Calendar Feed', feature_category: :groups_and_pro context 'issue with due date' do let!(:issue) do - create(:issue, author: user, assignees: [assignee], project: project, title: 'test title', - description: 'test desc', due_date: Date.tomorrow) + create( + :issue, + author: user, + assignees: [assignee], + project: project, + title: 'test title', + description: 'test desc', + due_date: Date.tomorrow + ) end it 'renders issue fields' do diff --git a/spec/features/incidents/incident_timeline_events_spec.rb b/spec/features/incidents/incident_timeline_events_spec.rb index 8829f21cabe..bd3658ab60f 100644 --- a/spec/features/incidents/incident_timeline_events_spec.rb +++ b/spec/features/incidents/incident_timeline_events_spec.rb @@ -93,7 +93,7 @@ RSpec.describe 'Incident timeline events', :js, feature_category: :incident_mana end it_behaves_like 'for each incident details route', - 'add, edit, and delete timeline events', - tab_text: s_('Incident|Timeline'), - tab: 'timeline' + 'add, edit, and delete timeline events', + tab_text: s_('Incident|Timeline'), + tab: 'timeline' end diff --git a/spec/features/incidents/user_views_incident_spec.rb b/spec/features/incidents/user_views_incident_spec.rb index 8739c99bdd0..bbf579b09a8 100644 --- a/spec/features/incidents/user_views_incident_spec.rb +++ b/spec/features/incidents/user_views_incident_spec.rb @@ -31,10 +31,12 @@ RSpec.describe "User views incident", feature_category: :incident_management do describe 'user actions' do it 'shows the merge request and incident actions', :js, :aggregate_failures do - expected_href = new_project_issue_path(project, - issuable_template: 'incident', - issue: { issue_type: 'incident' }, - add_related_issue: incident.iid) + expected_href = new_project_issue_path( + project, + issuable_template: 'incident', + issue: { issue_type: 'incident' }, + add_related_issue: incident.iid + ) click_button 'Incident actions' diff --git a/spec/features/issuables/issuable_list_spec.rb b/spec/features/issuables/issuable_list_spec.rb index c979aff2147..7bf9620f282 100644 --- a/spec/features/issuables/issuable_list_spec.rb +++ b/spec/features/issuables/issuable_list_spec.rb @@ -99,9 +99,7 @@ RSpec.describe 'issuable list', :js, feature_category: :team_planning do if issuable_type == :issue issue = Issue.reorder(:iid).first - merge_request = create(:merge_request, - source_project: project, - source_branch: generate(:branch)) + merge_request = create(:merge_request, source_project: project, source_branch: generate(:branch)) create(:merge_requests_closing_issues, issue: issue, merge_request: merge_request) end 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 3a32bd34af8..73a920421a3 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 @@ -74,8 +74,11 @@ RSpec.describe 'Resolve an open thread in a merge request by creating an issue', before do project.add_reporter(user) sign_in user - visit new_project_issue_path(project, merge_request_to_resolve_discussions_of: merge_request.iid, - discussion_to_resolve: discussion.id) + visit new_project_issue_path( + project, + merge_request_to_resolve_discussions_of: merge_request.iid, + discussion_to_resolve: discussion.id + ) end it 'shows a notice to ask someone else to resolve the threads' do diff --git a/spec/features/issues/user_creates_branch_and_merge_request_spec.rb b/spec/features/issues/user_creates_branch_and_merge_request_spec.rb index 1050bc2456f..ecb899a7ca2 100644 --- a/spec/features/issues/user_creates_branch_and_merge_request_spec.rb +++ b/spec/features/issues/user_creates_branch_and_merge_request_spec.rb @@ -137,13 +137,25 @@ RSpec.describe 'User creates branch and merge request on issue page', :js, featu context "when there is a referenced merge request" do let!(:note) do - create(:note, :on_issue, :system, project: project, noteable: issue, - note: "mentioned in #{referenced_mr.to_reference}") + create( + :note, + :on_issue, + :system, + project: project, + noteable: issue, + note: "mentioned in #{referenced_mr.to_reference}" + ) end let(:referenced_mr) do - create(:merge_request, :simple, source_project: project, target_project: project, - description: "Fixes #{issue.to_reference}", author: user) + create( + :merge_request, + :simple, + source_project: project, + target_project: project, + description: "Fixes #{issue.to_reference}", + author: user + ) end before do diff --git a/spec/features/issues/user_filters_issues_spec.rb b/spec/features/issues/user_filters_issues_spec.rb index 9f69e94b86c..593b43698a2 100644 --- a/spec/features/issues/user_filters_issues_spec.rb +++ b/spec/features/issues/user_filters_issues_spec.rb @@ -8,11 +8,13 @@ RSpec.describe 'User filters issues', :js, feature_category: :team_planning do before do %w[foobar barbaz].each do |title| - create(:issue, - author: user, - assignees: [user], - project: project, - title: title) + create( + :issue, + author: user, + assignees: [user], + project: project, + title: title + ) end @issue = Issue.find_by(title: 'foobar') |