diff options
Diffstat (limited to 'spec/features')
20 files changed, 27 insertions, 27 deletions
diff --git a/spec/features/boards/board_filters_spec.rb b/spec/features/boards/board_filters_spec.rb index 2e4dc4a29fc..1184aea1114 100644 --- a/spec/features/boards/board_filters_spec.rb +++ b/spec/features/boards/board_filters_spec.rb @@ -7,8 +7,8 @@ RSpec.describe 'Issue board filters', :js do let_it_be(:user) { create(:user) } let_it_be(:board) { create(:board, project: project) } let_it_be(:project_label) { create(:label, project: project, title: 'Label') } - let_it_be(:milestone_1) { create(:milestone, project: project, due_date: 3.days.from_now ) } - let_it_be(:milestone_2) { create(:milestone, project: project, due_date: Date.tomorrow ) } + let_it_be(:milestone_1) { create(:milestone, project: project, due_date: 3.days.from_now) } + let_it_be(:milestone_2) { create(:milestone, project: project, due_date: Date.tomorrow) } let_it_be(:release) { create(:release, tag: 'v1.0', project: project, milestones: [milestone_1]) } let_it_be(:release_2) { create(:release, tag: 'v2.0', project: project, milestones: [milestone_2]) } let_it_be(:issue_1) { create(:issue, project: project, milestone: milestone_1, author: user) } diff --git a/spec/features/boards/user_visits_board_spec.rb b/spec/features/boards/user_visits_board_spec.rb index 7fe32557d6a..5587d9560a2 100644 --- a/spec/features/boards/user_visits_board_spec.rb +++ b/spec/features/boards/user_visits_board_spec.rb @@ -21,7 +21,7 @@ RSpec.describe 'User visits issue boards', :js do let_it_be(:label1) { create(:group_label, group: group, name: label_name1) } let_it_be(:label2) { create(:group_label, group: group, name: label_name2) } - let_it_be(:assignee) { create_default(:group_member, :maintainer, user: create(:user, username: assignee_username), group: group ).user } + let_it_be(:assignee) { create_default(:group_member, :maintainer, user: create(:user, username: assignee_username), group: group).user } let_it_be(:milestone) { create_default(:milestone, project: project, start_date: Date.today - 1, due_date: 7.days.from_now) } before_all do diff --git a/spec/features/dashboard/datetime_on_tooltips_spec.rb b/spec/features/dashboard/datetime_on_tooltips_spec.rb index 875ae41c55d..de8858fa8fa 100644 --- a/spec/features/dashboard/datetime_on_tooltips_spec.rb +++ b/spec/features/dashboard/datetime_on_tooltips_spec.rb @@ -14,8 +14,8 @@ RSpec.describe 'Tooltips on .timeago dates', :js do context 'on the activity tab' do before do - Event.create!( project: project, author_id: user.id, action: :joined, - updated_at: created_date, created_at: created_date) + Event.create!(project: project, author_id: user.id, action: :joined, + updated_at: created_date, created_at: created_date) sign_in user visit user_activity_path(user) diff --git a/spec/features/graphql_known_operations_spec.rb b/spec/features/graphql_known_operations_spec.rb index ef406f12902..80214307be3 100644 --- a/spec/features/graphql_known_operations_spec.rb +++ b/spec/features/graphql_known_operations_spec.rb @@ -24,6 +24,6 @@ RSpec.describe 'Graphql known operations', :js do expect(known_operations).to include("searchProjects") expect(known_operations.length).to be > 20 - expect(known_operations).to all( match(%r{^[a-z]+}i) ) + expect(known_operations).to all(match(%r{^[a-z]+}i)) end end diff --git a/spec/features/groups/activity_spec.rb b/spec/features/groups/activity_spec.rb index 6ca69e76d33..5bac80959b1 100644 --- a/spec/features/groups/activity_spec.rb +++ b/spec/features/groups/activity_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'Group activity page' do - let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user } + 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/board_sidebar_spec.rb b/spec/features/groups/board_sidebar_spec.rb index 69a6788e438..aa42b29b3ac 100644 --- a/spec/features/groups/board_sidebar_spec.rb +++ b/spec/features/groups/board_sidebar_spec.rb @@ -6,7 +6,7 @@ RSpec.describe 'Group Issue Boards', :js do include BoardHelpers let(:group) { create(:group) } - let(:user) { create(:group_member, user: create(:user), group: group ).user } + let(:user) { create(:group_member, user: create(:user), group: group).user } let!(:project_1) { create(:project, :public, group: group) } let!(:project_2) { create(:project, :public, group: group) } let!(:project_1_label) { create(:label, project: project_1, name: 'Development 1') } diff --git a/spec/features/groups/empty_states_spec.rb b/spec/features/groups/empty_states_spec.rb index 84882fc674e..f1a8f97461a 100644 --- a/spec/features/groups/empty_states_spec.rb +++ b/spec/features/groups/empty_states_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' RSpec.describe 'Group empty states' do let(:group) { create(:group) } - let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user } + let(:user) { create(:group_member, :developer, user: create(:user), group: group).user } before do sign_in(user) diff --git a/spec/features/groups/issues_spec.rb b/spec/features/groups/issues_spec.rb index a3fc6a620e7..d4e88505118 100644 --- a/spec/features/groups/issues_spec.rb +++ b/spec/features/groups/issues_spec.rb @@ -69,7 +69,7 @@ RSpec.describe 'Group issues page' do context 'issues list', :js do let(:subgroup) { create(:group, parent: group) } let(:subgroup_project) { create(:project, :public, group: subgroup) } - let(:user_in_group) { create(:group_member, :maintainer, user: create(:user), group: group ).user } + let(:user_in_group) { create(:group_member, :maintainer, user: create(:user), group: group).user } let!(:issue) { create(:issue, project: project, title: 'root group issue') } let!(:subgroup_issue) { create(:issue, project: subgroup_project, title: 'subgroup issue') } @@ -111,7 +111,7 @@ RSpec.describe 'Group issues page' do context 'projects with issues disabled' do describe 'issue dropdown' do - let(:user_in_group) { create(:group_member, :maintainer, user: create(:user), group: group ).user } + let(:user_in_group) { create(:group_member, :maintainer, user: create(:user), group: group).user } before do [project, project_with_issues_disabled].each { |project| project.add_maintainer(user_in_group) } @@ -129,7 +129,7 @@ RSpec.describe 'Group issues page' do end context 'manual ordering', :js do - let(:user_in_group) { create(:group_member, :maintainer, user: create(:user), group: group ).user } + let(:user_in_group) { create(:group_member, :maintainer, user: create(:user), group: group).user } let!(:issue1) { create(:issue, project: project, title: 'Issue #1', relative_position: 1) } let!(:issue2) { create(:issue, project: project, title: 'Issue #2', relative_position: 2) } @@ -199,7 +199,7 @@ RSpec.describe 'Group issues page' do end context 'issues pagination', :js do - let(:user_in_group) { create(:group_member, :maintainer, user: create(:user), group: group ).user } + let(:user_in_group) { create(:group_member, :maintainer, user: create(:user), group: group).user } let!(:issues) do (1..25).to_a.map { |index| create(:issue, project: project, title: "Issue #{index}") } diff --git a/spec/features/groups/milestone_spec.rb b/spec/features/groups/milestone_spec.rb index 42eaa8358a1..92a40459737 100644 --- a/spec/features/groups/milestone_spec.rb +++ b/spec/features/groups/milestone_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe 'Group milestones' do let_it_be(:group) { create(:group) } let_it_be(:project) { create(:project_empty_repo, group: group) } - let_it_be(:user) { create(:group_member, :maintainer, user: create(:user), group: group ).user } + let_it_be(:user) { create(:group_member, :maintainer, user: create(:user), group: group).user } around do |example| freeze_time { example.run } diff --git a/spec/features/groups/milestones_sorting_spec.rb b/spec/features/groups/milestones_sorting_spec.rb index 125bf9ce3a7..6f3fc72775f 100644 --- a/spec/features/groups/milestones_sorting_spec.rb +++ b/spec/features/groups/milestones_sorting_spec.rb @@ -11,7 +11,7 @@ RSpec.describe 'Milestones sorting', :js do let!(:project_milestone2) { create(:milestone, project: project, title: 'v2.0', due_date: 5.days.from_now) } let!(:other_project_milestone2) { create(:milestone, project: other_project, title: 'v2.0', due_date: 5.days.from_now) } let!(:group_milestone) { create(:milestone, group: group, title: 'v3.0', due_date: 7.days.from_now) } - let(:user) { create(:group_member, :maintainer, user: create(:user), group: group ).user } + let(:user) { create(:group_member, :maintainer, user: create(:user), group: group).user } before do sign_in(user) diff --git a/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb b/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb index 0dd87ac3e24..59b5923b2a1 100644 --- a/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb +++ b/spec/features/merge_request/user_edits_assignees_sidebar_spec.rb @@ -88,7 +88,7 @@ RSpec.describe 'Merge request > User edits assignees sidebar', :js do end context 'when GraphQL assignees widget feature flag is enabled' do - let(:sidebar_assignee_dropdown_item) { sidebar_assignee_block.find(".dropdown-item", text: assignee.username ) } + let(:sidebar_assignee_dropdown_item) { sidebar_assignee_block.find(".dropdown-item", text: assignee.username) } let(:sidebar_assignee_dropdown_tooltip) { sidebar_assignee_dropdown_item['title'] } context 'when user is an owner' do diff --git a/spec/features/profiles/two_factor_auths_spec.rb b/spec/features/profiles/two_factor_auths_spec.rb index b4355f2d669..decc2904b6e 100644 --- a/spec/features/profiles/two_factor_auths_spec.rb +++ b/spec/features/profiles/two_factor_auths_spec.rb @@ -13,7 +13,7 @@ RSpec.describe 'Two factor auths' do end context 'when user has two-factor authentication disabled' do - let_it_be(:user) { create(:user ) } + let_it_be(:user) { create(:user) } it 'requires the current password to set up two factor authentication', :js do visit profile_two_factor_auth_path diff --git a/spec/features/projects/branches/user_views_branches_spec.rb b/spec/features/projects/branches/user_views_branches_spec.rb index b6b6dcb5cf1..3f0614532f1 100644 --- a/spec/features/projects/branches/user_views_branches_spec.rb +++ b/spec/features/projects/branches/user_views_branches_spec.rb @@ -21,7 +21,7 @@ RSpec.describe "User views branches", :js do it "shows branches" do expect(page).to have_content("Branches").and have_content("master") - expect(page.all(".graph-side")).to all( have_content(/\d+/) ) + expect(page.all(".graph-side")).to all(have_content(/\d+/)) end it "displays a disabled button with a tooltip for the default branch that cannot be deleted", :js do diff --git a/spec/features/projects/fork_spec.rb b/spec/features/projects/fork_spec.rb index 24943e7dd0f..9ceadb63178 100644 --- a/spec/features/projects/fork_spec.rb +++ b/spec/features/projects/fork_spec.rb @@ -134,7 +134,7 @@ RSpec.describe 'Project fork' do context 'fork form', :js do let(:group) { create(:group) } let(:group2) { create(:group) } - let(:user) { create(:group_member, :maintainer, user: create(:user), group: group ).user } + let(:user) { create(:group_member, :maintainer, user: create(:user), group: group).user } def submit_form(group_obj = group) find('[data-testid="select_namespace_dropdown"]').click @@ -180,7 +180,7 @@ RSpec.describe 'Project fork' do context 'with cache_home_panel feature flag' do before do - create(:group_member, :maintainer, user: user, group: group2 ) + create(:group_member, :maintainer, user: user, group: group2) end context 'when caching is enabled' do diff --git a/spec/features/projects/issues/viewing_issues_with_external_authorization_enabled_spec.rb b/spec/features/projects/issues/viewing_issues_with_external_authorization_enabled_spec.rb index b423543dc33..4415f1f009f 100644 --- a/spec/features/projects/issues/viewing_issues_with_external_authorization_enabled_spec.rb +++ b/spec/features/projects/issues/viewing_issues_with_external_authorization_enabled_spec.rb @@ -41,7 +41,7 @@ RSpec.describe 'viewing an issue with cross project references' do let(:issue) do create(:issue, project: project, - description: description_referencing_other_issue ) + description: description_referencing_other_issue) end let(:confidential_issue) do diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb index 84c75752bc1..96a8168e708 100644 --- a/spec/features/projects/jobs_spec.rb +++ b/spec/features/projects/jobs_spec.rb @@ -463,7 +463,7 @@ RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state do context 'when variables are stored in trigger_request' do before do - trigger_request.update_attribute(:variables, { 'TRIGGER_KEY_1' => 'TRIGGER_VALUE_1' } ) + trigger_request.update_attribute(:variables, { 'TRIGGER_KEY_1' => 'TRIGGER_VALUE_1' }) visit project_job_path(project, job) end @@ -508,7 +508,7 @@ RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state do context 'when variables are stored in trigger_request' do before do - trigger_request.update_attribute(:variables, { 'TRIGGER_KEY_1' => 'TRIGGER_VALUE_1' } ) + trigger_request.update_attribute(:variables, { 'TRIGGER_KEY_1' => 'TRIGGER_VALUE_1' }) visit project_job_path(project, job) end diff --git a/spec/features/projects/pipeline_schedules_spec.rb b/spec/features/projects/pipeline_schedules_spec.rb index 4ed0a11da38..3252b5eaa95 100644 --- a/spec/features/projects/pipeline_schedules_spec.rb +++ b/spec/features/projects/pipeline_schedules_spec.rb @@ -6,7 +6,7 @@ RSpec.describe 'Pipeline Schedules', :js do include Spec::Support::Helpers::ModalHelpers let!(:project) { create(:project, :repository) } - let!(:pipeline_schedule) { create(:ci_pipeline_schedule, :nightly, project: project ) } + let!(:pipeline_schedule) { create(:ci_pipeline_schedule, :nightly, project: project) } let!(:pipeline) { create(:ci_pipeline, pipeline_schedule: pipeline_schedule) } let(:scope) { nil } let!(:user) { create(:user) } diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index 0b43e13996f..9a99f16b669 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -363,7 +363,7 @@ RSpec.describe 'Pipeline', :js do project: downstream_project, ref: 'master', sha: downstream_project.commit.id, - child_of: pipeline ) + child_of: pipeline) end let!(:build) { create(:ci_build, status, pipeline: downstream_pipeline, user: user) } diff --git a/spec/features/projects/releases/user_views_edit_release_spec.rb b/spec/features/projects/releases/user_views_edit_release_spec.rb index 6551b254643..78b9798941a 100644 --- a/spec/features/projects/releases/user_views_edit_release_spec.rb +++ b/spec/features/projects/releases/user_views_edit_release_spec.rb @@ -6,7 +6,7 @@ RSpec.describe 'User edits Release', :js do let_it_be(:project) { create(:project, :repository) } let_it_be(:user) { create(:user) } - let(:release) { create(:release, :with_milestones, milestones_count: 1, project: project, name: 'The first release', tag: "v1.1.0" ) } + let(:release) { create(:release, :with_milestones, milestones_count: 1, project: project, name: 'The first release', tag: "v1.1.0") } let(:release_link) { create(:release_link, release: release) } before do diff --git a/spec/features/projects/releases/user_views_releases_spec.rb b/spec/features/projects/releases/user_views_releases_spec.rb index a7348b62fc0..10418e8072d 100644 --- a/spec/features/projects/releases/user_views_releases_spec.rb +++ b/spec/features/projects/releases/user_views_releases_spec.rb @@ -15,7 +15,7 @@ RSpec.describe 'User views releases', :js do let_it_be(:guest) { create(:user) } let_it_be(:internal_link) { create(:release_link, release: release_v1, name: 'An internal link', url: "#{project.web_url}/-/jobs/1/artifacts/download", filepath: nil) } - let_it_be(:internal_link_with_redirect) { create(:release_link, release: release_v1, name: 'An internal link with a redirect', url: "#{project.web_url}/-/jobs/2/artifacts/download", filepath: '/binaries/linux-amd64' ) } + let_it_be(:internal_link_with_redirect) { create(:release_link, release: release_v1, name: 'An internal link with a redirect', url: "#{project.web_url}/-/jobs/2/artifacts/download", filepath: '/binaries/linux-amd64') } let_it_be(:external_link) { create(:release_link, release: release_v1, name: 'An external link', url: "https://example.com/an/external/link", filepath: nil) } before do |