diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-22 15:12:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-22 15:12:54 +0300 |
commit | 581c9c958dd3c7c28370f234fcb3c13c60453888 (patch) | |
tree | f12fda4b1628e142b66a7c0213a747b0d0baf4d7 /spec/features | |
parent | 535401c6360fbb9ff67aa72e6f9f0046f19d98ca (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
19 files changed, 71 insertions, 53 deletions
diff --git a/spec/features/dashboard/datetime_on_tooltips_spec.rb b/spec/features/dashboard/datetime_on_tooltips_spec.rb index bf9f6895d24..48a6976f263 100644 --- a/spec/features/dashboard/datetime_on_tooltips_spec.rb +++ b/spec/features/dashboard/datetime_on_tooltips_spec.rb @@ -15,7 +15,7 @@ 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) + updated_at: created_date, created_at: created_date) sign_in user visit user_activity_path(user) diff --git a/spec/features/dashboard/todos/todos_sorting_spec.rb b/spec/features/dashboard/todos/todos_sorting_spec.rb index d593031590e..a0fa53b761b 100644 --- a/spec/features/dashboard/todos/todos_sorting_spec.rb +++ b/spec/features/dashboard/todos/todos_sorting_spec.rb @@ -28,7 +28,7 @@ RSpec.describe 'Dashboard > User sorts todos' do create(:todo, user: user, project: project, target: issue_3, created_at: 3.hours.ago, updated_at: 2.minutes.ago) create(:todo, user: user, project: project, target: issue_1, created_at: 2.hours.ago, updated_at: 2.hours.ago) create(:todo, user: user, project: project, target: merge_request_1, created_at: 1.hour.ago, - updated_at: 1.hour.ago) + updated_at: 1.hour.ago) merge_request_1.labels << label_1 issue_3.labels << label_1 diff --git a/spec/features/jira_oauth_provider_authorize_spec.rb b/spec/features/jira_oauth_provider_authorize_spec.rb index a216d2d44b2..eb26440aff9 100644 --- a/spec/features/jira_oauth_provider_authorize_spec.rb +++ b/spec/features/jira_oauth_provider_authorize_spec.rb @@ -10,10 +10,10 @@ RSpec.describe 'JIRA OAuth Provider' do sign_in(user) visit oauth_jira_dvcs_authorize_path(client_id: application.uid, - redirect_uri: oauth_jira_dvcs_callback_url, - response_type: 'code', - state: 'my_state', - scope: 'read_user') + redirect_uri: oauth_jira_dvcs_callback_url, + response_type: 'code', + state: 'my_state', + scope: 'read_user') end it_behaves_like 'Secure OAuth Authorizations' diff --git a/spec/features/merge_request/user_sees_deployment_widget_spec.rb b/spec/features/merge_request/user_sees_deployment_widget_spec.rb index c02149eed87..63ac7862b06 100644 --- a/spec/features/merge_request/user_sees_deployment_widget_spec.rb +++ b/spec/features/merge_request/user_sees_deployment_widget_spec.rb @@ -111,7 +111,7 @@ RSpec.describe 'Merge request > User sees deployment widget', :js do context 'with stop action' do let(:manual) do create(:ci_build, :manual, pipeline: pipeline, - name: 'close_app', environment: environment.name) + name: 'close_app', environment: environment.name) end before do diff --git a/spec/features/profiles/active_sessions_spec.rb b/spec/features/profiles/active_sessions_spec.rb index 24c9225532b..d0819bb5363 100644 --- a/spec/features/profiles/active_sessions_spec.rb +++ b/spec/features/profiles/active_sessions_spec.rb @@ -59,7 +59,7 @@ RSpec.describe 'Profile > Active Sessions', :clean_gitlab_redis_shared_state do expect(page).to( have_selector('ul.list-group li.list-group-item', text: 'Signed in on', - count: 2)) + count: 2)) expect(page).to have_content( '127.0.0.1 ' \ diff --git a/spec/features/projects/badges/coverage_spec.rb b/spec/features/projects/badges/coverage_spec.rb index 5c1bc1ad239..7555e567c37 100644 --- a/spec/features/projects/badges/coverage_spec.rb +++ b/spec/features/projects/badges/coverage_spec.rb @@ -191,7 +191,7 @@ RSpec.describe 'test coverage badge' do def show_test_coverage_badge(job: nil, min_good: nil, min_acceptable: nil, min_medium: nil) visit coverage_project_badges_path(project, ref: :master, job: job, min_good: min_good, - min_acceptable: min_acceptable, min_medium: min_medium, format: :svg) + min_acceptable: min_acceptable, min_medium: min_medium, format: :svg) end def expect_coverage_badge(coverage) diff --git a/spec/features/projects/environments/environment_spec.rb b/spec/features/projects/environments/environment_spec.rb index a53e8beb555..be4b21dfff4 100644 --- a/spec/features/projects/environments/environment_spec.rb +++ b/spec/features/projects/environments/environment_spec.rb @@ -264,9 +264,7 @@ RSpec.describe 'Environment' do let(:build) { create(:ci_build, :success, pipeline: pipeline, environment: environment.name) } let(:action) do - create(:ci_build, :manual, pipeline: pipeline, - name: 'close_app', - environment: environment.name) + create(:ci_build, :manual, pipeline: pipeline, name: 'close_app', environment: environment.name) end let(:deployment) do @@ -278,8 +276,7 @@ RSpec.describe 'Environment' do context 'when user has ability to stop environment' do let(:permissions) do - create(:protected_branch, :developers_can_merge, - name: action.ref, project: project) + create(:protected_branch, :developers_can_merge, name: action.ref, project: project) end it 'allows to stop environment', :js do diff --git a/spec/features/projects/feature_flags/user_sees_feature_flag_list_spec.rb b/spec/features/projects/feature_flags/user_sees_feature_flag_list_spec.rb index 221f07a2f75..c05707d2921 100644 --- a/spec/features/projects/feature_flags/user_sees_feature_flag_list_spec.rb +++ b/spec/features/projects/feature_flags/user_sees_feature_flag_list_spec.rb @@ -30,8 +30,7 @@ RSpec.describe 'User sees feature flag list', :js do create(:operations_scope, strategy: strat, environment_scope: 'production') end end - create(:operations_feature_flag, :new_version_flag, project: project, - name: 'my_flag', active: false) + create(:operations_feature_flag, :new_version_flag, project: project, name: 'my_flag', active: false) end it 'shows the user the first flag' do diff --git a/spec/features/projects/feature_flags/user_updates_feature_flag_spec.rb b/spec/features/projects/feature_flags/user_updates_feature_flag_spec.rb index 71c9d89fbde..eb9ac078662 100644 --- a/spec/features/projects/feature_flags/user_updates_feature_flag_spec.rb +++ b/spec/features/projects/feature_flags/user_updates_feature_flag_spec.rb @@ -18,13 +18,12 @@ RSpec.describe 'User updates feature flag', :js do context 'with a new version feature flag' do let!(:feature_flag) do - create_flag(project, 'test_flag', false, version: Operations::FeatureFlag.versions['new_version_flag'], - description: 'For testing') + create_flag(project, 'test_flag', false, + version: Operations::FeatureFlag.versions['new_version_flag'], description: 'For testing') end let!(:strategy) do - create(:operations_strategy, feature_flag: feature_flag, - name: 'default', parameters: {}) + create(:operations_strategy, feature_flag: feature_flag, name: 'default', parameters: {}) end let!(:scope) do diff --git a/spec/features/projects/jobs/user_browses_jobs_spec.rb b/spec/features/projects/jobs/user_browses_jobs_spec.rb index 289ab8cffa5..995f4a1e3d2 100644 --- a/spec/features/projects/jobs/user_browses_jobs_spec.rb +++ b/spec/features/projects/jobs/user_browses_jobs_spec.rb @@ -58,8 +58,7 @@ RSpec.describe 'User browses jobs' do context 'when a job can be canceled' do let!(:job) do - create(:ci_build, pipeline: pipeline, - stage: 'test') + create(:ci_build, pipeline: pipeline, stage: 'test') end before do @@ -81,7 +80,7 @@ RSpec.describe 'User browses jobs' do context 'when a job can be retried' do let!(:job) do create(:ci_build, pipeline: pipeline, - stage: 'test') + stage: 'test') end before do @@ -190,7 +189,7 @@ RSpec.describe 'User browses jobs' do context 'column links' do let!(:job) do create(:ci_build, pipeline: pipeline, - stage: 'test') + stage: 'test') end before do diff --git a/spec/features/projects/milestones/milestones_sorting_spec.rb b/spec/features/projects/milestones/milestones_sorting_spec.rb index 2ad820e4a06..c47350fb663 100644 --- a/spec/features/projects/milestones/milestones_sorting_spec.rb +++ b/spec/features/projects/milestones/milestones_sorting_spec.rb @@ -8,7 +8,7 @@ RSpec.describe 'Milestones sorting', :js do let(:milestones_for_sort_by) do { 'Due later' => %w[b c a], - 'Name, ascending' => %w[a b c], + 'Name, ascending' => %w[a b c], 'Name, descending' => %w[c b a], 'Start later' => %w[a c b], 'Start soon' => %w[b c a], diff --git a/spec/features/projects/new_project_spec.rb b/spec/features/projects/new_project_spec.rb index f45025d079a..7cf05242a23 100644 --- a/spec/features/projects/new_project_spec.rb +++ b/spec/features/projects/new_project_spec.rb @@ -424,9 +424,10 @@ RSpec.describe 'New project', :js do it 'keeps "Import project" tab open after form validation error' do collision_project = create(:project, name: 'test-name-collision', namespace: user.namespace) - stub_request(:get, "http://foo/bar/info/refs?service=git-upload-pack").to_return({ status: 200, - body: '001e# service=git-upload-pack', - headers: { 'Content-Type': 'application/x-git-upload-pack-advertisement' } }) + stub_request(:get, "http://foo/bar/info/refs?service=git-upload-pack").to_return( + { status: 200, + body: '001e# service=git-upload-pack', + headers: { 'Content-Type': 'application/x-git-upload-pack-advertisement' } }) fill_in 'project_import_url', with: 'http://foo/bar' fill_in 'project_name', with: collision_project.name @@ -465,9 +466,10 @@ RSpec.describe 'New project', :js do end it 'initiates import when valid repo url is provided' do - stub_request(:get, "http://foo/bar/info/refs?service=git-upload-pack").to_return({ status: 200, - body: '001e# service=git-upload-pack', - headers: { 'Content-Type': 'application/x-git-upload-pack-advertisement' } }) + stub_request(:get, "http://foo/bar/info/refs?service=git-upload-pack").to_return( + { status: 200, + body: '001e# service=git-upload-pack', + headers: { 'Content-Type': 'application/x-git-upload-pack-advertisement' } }) fill_in 'project_import_url', with: 'http://foo/bar' diff --git a/spec/features/projects/pipelines/legacy_pipeline_spec.rb b/spec/features/projects/pipelines/legacy_pipeline_spec.rb index 14f60dfe061..f1d16f95a8c 100644 --- a/spec/features/projects/pipelines/legacy_pipeline_spec.rb +++ b/spec/features/projects/pipelines/legacy_pipeline_spec.rb @@ -769,13 +769,17 @@ RSpec.describe 'Pipeline', :js do let(:resource_group) { create(:ci_resource_group, project: project) } let!(:test_job) do - create(:ci_build, :pending, stage: 'test', name: 'test', - stage_idx: 1, pipeline: pipeline, project: project) + create(:ci_build, :pending, stage: 'test', name: 'test', stage_idx: 1, pipeline: pipeline, project: project) end let!(:deploy_job) do - create(:ci_build, :created, stage: 'deploy', name: 'deploy', - stage_idx: 2, pipeline: pipeline, project: project, resource_group: resource_group) + create(:ci_build, :created, + stage: 'deploy', + name: 'deploy', + stage_idx: 2, + pipeline: pipeline, + project: project, + resource_group: resource_group) end describe 'GET /:project/-/pipelines/:id' do @@ -873,8 +877,14 @@ RSpec.describe 'Pipeline', :js do context 'when deploy job is a bridge to trigger a downstream pipeline' do let!(:deploy_job) do - create(:ci_bridge, :created, stage: 'deploy', name: 'deploy', - stage_idx: 2, pipeline: pipeline, project: project, resource_group: resource_group) + create(:ci_bridge, :created, + stage: 'deploy', + name: 'deploy', + stage_idx: 2, + pipeline: pipeline, + project: project, + resource_group: resource_group + ) end it 'shows deploy job as waiting for resource' do @@ -895,8 +905,14 @@ RSpec.describe 'Pipeline', :js do context 'when deploy job is a bridge to trigger a downstream pipeline' do let!(:deploy_job) do - create(:ci_bridge, :created, stage: 'deploy', name: 'deploy', - stage_idx: 2, pipeline: pipeline, project: project, resource_group: resource_group) + create(:ci_bridge, :created, + stage: 'deploy', + name: 'deploy', + stage_idx: 2, + pipeline: pipeline, + project: project, + resource_group: resource_group + ) end it 'shows deploy job as waiting for resource' do diff --git a/spec/features/projects/pipelines/legacy_pipelines_spec.rb b/spec/features/projects/pipelines/legacy_pipelines_spec.rb index eb8f2de3aba..c903fe60fdb 100644 --- a/spec/features/projects/pipelines/legacy_pipelines_spec.rb +++ b/spec/features/projects/pipelines/legacy_pipelines_spec.rb @@ -546,8 +546,8 @@ RSpec.describe 'Pipelines', :js do context 'for a failed pipeline' do let!(:build) do create(:ci_build, :failed, pipeline: pipeline, - stage: 'build', - name: 'build') + stage: 'build', + name: 'build') end it 'displays the failure reason' do diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index cfdd851cb80..937e807b5f1 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -895,12 +895,12 @@ RSpec.describe 'Pipeline', :js do let!(:test_job) do create(:ci_build, :pending, stage: 'test', name: 'test', - stage_idx: 1, pipeline: pipeline, project: project) + stage_idx: 1, pipeline: pipeline, project: project) end let!(:deploy_job) do create(:ci_build, :created, stage: 'deploy', name: 'deploy', - stage_idx: 2, pipeline: pipeline, project: project, resource_group: resource_group) + stage_idx: 2, pipeline: pipeline, project: project, resource_group: resource_group) end describe 'GET /:project/-/pipelines/:id' do @@ -998,8 +998,14 @@ RSpec.describe 'Pipeline', :js do context 'when deploy job is a bridge to trigger a downstream pipeline' do let!(:deploy_job) do - create(:ci_bridge, :created, stage: 'deploy', name: 'deploy', - stage_idx: 2, pipeline: pipeline, project: project, resource_group: resource_group) + create(:ci_bridge, :created, + stage: 'deploy', + name: 'deploy', + stage_idx: 2, + pipeline: pipeline, + project: project, + resource_group: resource_group + ) end it 'shows deploy job as waiting for resource' do diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index bf521971ae0..d4f58813534 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -536,8 +536,8 @@ RSpec.describe 'Pipelines', :js do context 'for a failed pipeline' do let!(:build) do create(:ci_build, :failed, pipeline: pipeline, - stage: 'build', - name: 'build') + stage: 'build', + name: 'build') end it 'displays the failure reason' do diff --git a/spec/features/snippets/user_creates_snippet_spec.rb b/spec/features/snippets/user_creates_snippet_spec.rb index 628468a2abe..fd95516090a 100644 --- a/spec/features/snippets/user_creates_snippet_spec.rb +++ b/spec/features/snippets/user_creates_snippet_spec.rb @@ -80,7 +80,7 @@ RSpec.describe 'User creates snippet', :js do context 'when snippets default visibility level is restricted' do before do stub_application_setting(restricted_visibility_levels: [Gitlab::VisibilityLevel::PRIVATE], - default_snippet_visibility: Gitlab::VisibilityLevel::PRIVATE) + default_snippet_visibility: Gitlab::VisibilityLevel::PRIVATE) end it 'creates a snippet using the lowest available visibility level as default' do diff --git a/spec/features/users/email_verification_on_login_spec.rb b/spec/features/users/email_verification_on_login_spec.rb index 55954d121e1..1bfc59c3e73 100644 --- a/spec/features/users/email_verification_on_login_spec.rb +++ b/spec/features/users/email_verification_on_login_spec.rb @@ -349,9 +349,9 @@ RSpec.describe 'Email Verification On Login', :clean_gitlab_redis_rate_limiting expect(Gitlab::AppLogger).to have_received(:info) .exactly(times).times .with(message || hash_including(message: 'Email Verification', - event: event, - username: user.username, - ip: '127.0.0.1', - reason: reason)) + event: event, + username: user.username, + ip: '127.0.0.1', + reason: reason)) end end diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb index b875dbe1340..4c294063a4e 100644 --- a/spec/features/users/login_spec.rb +++ b/spec/features/users/login_spec.rb @@ -862,7 +862,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do context 'when the user already enabled 2FA' do before do user.update!(otp_required_for_login: true, - otp_secret: User.generate_otp_secret(32)) + otp_secret: User.generate_otp_secret(32)) end it 'asks the user to accept the terms' do |