From bde47a1ef14b328681e841e8f28200c9b52783a2 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 10 Feb 2021 15:46:26 +0200 Subject: [PATCH] Update pipeline route in spec The unscoped pipeline route will be deprecated. Signed-off-by: Dmitriy Zaporozhets --- .../projects/pipelines/pipeline_spec.rb | 8 +-- .../security/project/internal_access_spec.rb | 4 +- .../compliance_dashboard/mock_data.js | 2 +- .../data/mock_data_vulnerabilities.js | 10 ++-- .../linked_pipelines_mini_list_spec.js | 2 +- .../components/linked_pipelines_mock_data.js | 56 +++++++++---------- .../vue_shared/dashboards/mock_data.js | 4 +- .../projects/pipelines/pipeline_spec.rb | 16 +++--- .../projects/pipelines/pipelines_spec.rb | 6 +- 9 files changed, 54 insertions(+), 54 deletions(-) diff --git a/ee/spec/features/projects/pipelines/pipeline_spec.rb b/ee/spec/features/projects/pipelines/pipeline_spec.rb index 00dd44fec249a3..4667709b6a7850 100644 --- a/ee/spec/features/projects/pipelines/pipeline_spec.rb +++ b/ee/spec/features/projects/pipelines/pipeline_spec.rb @@ -14,7 +14,7 @@ project.add_developer(user) end - describe 'GET /:project/pipelines/:id' do + describe 'GET /:project/-/pipelines/:id' do let(:pipeline) { create(:ci_pipeline, :with_job, project: project, ref: 'master', sha: project.commit.id, user: user) } subject { visit project_pipeline_path(project, pipeline) } @@ -93,7 +93,7 @@ end end - describe 'GET /:project/pipelines/:id/security' do + describe 'GET /:project/-/pipelines/:id/security' do let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: project.commit.id) } before do @@ -129,7 +129,7 @@ end end - describe 'GET /:project/pipelines/:id/licenses' do + describe 'GET /:project/-/pipelines/:id/licenses' do let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: project.commit.id) } before do @@ -167,7 +167,7 @@ end end - describe 'GET /:project/pipelines/:id/codequality_report', :aggregate_failures do + describe 'GET /:project/-/pipelines/:id/codequality_report', :aggregate_failures do shared_examples_for 'full codequality report' do context 'when licensed' do before do diff --git a/ee/spec/features/security/project/internal_access_spec.rb b/ee/spec/features/security/project/internal_access_spec.rb index e0d4a77bb4ebfe..ad2f99025e16cb 100644 --- a/ee/spec/features/security/project/internal_access_spec.rb +++ b/ee/spec/features/security/project/internal_access_spec.rb @@ -146,13 +146,13 @@ it { is_expected.to be_denied_for(:auditor) } end - describe "GET /:project_path/pipelines" do + describe "GET /:project_path/-/pipelines" do subject { project_pipelines_path(project) } it { is_expected.to be_allowed_for(:auditor) } end - describe "GET /:project_path/pipelines/:id" do + describe "GET /:project_path/-/pipelines/:id" do let(:pipeline) { create(:ci_pipeline, project: project) } subject { project_pipeline_path(project, pipeline) } diff --git a/ee/spec/frontend/compliance_dashboard/mock_data.js b/ee/spec/frontend/compliance_dashboard/mock_data.js index 04cb8c618d8601..a1d1198686daee 100644 --- a/ee/spec/frontend/compliance_dashboard/mock_data.js +++ b/ee/spec/frontend/compliance_dashboard/mock_data.js @@ -17,7 +17,7 @@ export const mergedAt = () => { }; export const createPipelineStatus = (status) => ({ - details_path: '/h5bp/html5-boilerplate/pipelines/58', + details_path: '/h5bp/html5-boilerplate/-/pipelines/58', favicon: '', group: status, has_details: true, diff --git a/ee/spec/frontend/security_dashboard/store/modules/vulnerabilities/data/mock_data_vulnerabilities.js b/ee/spec/frontend/security_dashboard/store/modules/vulnerabilities/data/mock_data_vulnerabilities.js index 369527834fc523..6be82364bdc17a 100644 --- a/ee/spec/frontend/security_dashboard/store/modules/vulnerabilities/data/mock_data_vulnerabilities.js +++ b/ee/spec/frontend/security_dashboard/store/modules/vulnerabilities/data/mock_data_vulnerabilities.js @@ -170,7 +170,7 @@ export default [ issue_iid: null, pipeline: { id: 2, - path: '/namespace5/project5/pipelines/2', + path: '/namespace5/project5/-/pipelines/2', }, category: 'sast', feedback_type: 'dismissal', @@ -249,7 +249,7 @@ export default [ issue_iid: 1, pipeline: { id: 3, - path: '/namespace6/project6/pipelines/3', + path: '/namespace6/project6/-/pipelines/3', }, issue_url: 'http://localhost/namespace1/project1/issues/1', category: 'sast', @@ -327,7 +327,7 @@ export default [ issue_iid: null, pipeline: { id: 2, - path: '/namespace5/project5/pipelines/2', + path: '/namespace5/project5/-/pipelines/2', }, category: 'sast', feedback_type: 'dismissal', @@ -352,7 +352,7 @@ export default [ issue_iid: 1, pipeline: { id: 3, - path: '/namespace6/project6/pipelines/3', + path: '/namespace6/project6/-/pipelines/3', }, issue_url: 'http://localhost/namespace1/project1/issues/1', category: 'sast', @@ -484,7 +484,7 @@ export default [ issue_iid: null, pipeline: { id: 3, - path: '/namespace6/project6/pipelines/3', + path: '/namespace6/project6/-/pipelines/3', }, issue_url: null, category: 'sast', diff --git a/ee/spec/frontend/vue_shared/components/linked_pipelines_mini_list_spec.js b/ee/spec/frontend/vue_shared/components/linked_pipelines_mini_list_spec.js index 6726cdc6dcaa8c..576150d294cfda 100644 --- a/ee/spec/frontend/vue_shared/components/linked_pipelines_mini_list_spec.js +++ b/ee/spec/frontend/vue_shared/components/linked_pipelines_mini_list_spec.js @@ -27,7 +27,7 @@ describe('Linked pipeline mini list', () => { it('should render a linked pipeline with the correct href', () => { const linkElement = component.$el.querySelector('.linked-pipeline-mini-item'); - expect(linkElement.getAttribute('href')).toBe('/gitlab-org/gitlab-foss/pipelines/129'); + expect(linkElement.getAttribute('href')).toBe('/gitlab-org/gitlab-foss/-/pipelines/129'); }); it('should render one ci status icon', () => { diff --git a/ee/spec/frontend/vue_shared/components/linked_pipelines_mock_data.js b/ee/spec/frontend/vue_shared/components/linked_pipelines_mock_data.js index f794b8484a7cb5..117c7f2ae529fc 100644 --- a/ee/spec/frontend/vue_shared/components/linked_pipelines_mock_data.js +++ b/ee/spec/frontend/vue_shared/components/linked_pipelines_mock_data.js @@ -2,7 +2,7 @@ export default { triggered_by: { id: 129, active: true, - path: '/gitlab-org/gitlab-foss/pipelines/129', + path: '/gitlab-org/gitlab-foss/-/pipelines/129', project: { name: 'GitLabCE', }, @@ -13,7 +13,7 @@ export default { label: 'running', group: 'running', has_details: true, - details_path: '/gitlab-org/gitlab-foss/pipelines/129', + details_path: '/gitlab-org/gitlab-foss/-/pipelines/129', favicon: '/assets/ci_favicons/dev/favicon_status_running-c3ad2fc53ea6079c174e5b6c1351ff349e99ec3af5a5622fb77b0fe53ea279c1.ico', }, @@ -51,8 +51,8 @@ export default { 'http://localhost:3000/gitlab-org/gitlab-foss/commit/23433d4d8b20d7e45c103d0b6048faad38a130ab', commit_path: '/gitlab-org/gitlab-foss/commit/23433d4d8b20d7e45c103d0b6048faad38a130ab', }, - retry_path: '/gitlab-org/gitlab-foss/pipelines/129/retry', - cancel_path: '/gitlab-org/gitlab-foss/pipelines/129/cancel', + retry_path: '/gitlab-org/gitlab-foss/-/pipelines/129/retry', + cancel_path: '/gitlab-org/gitlab-foss/-/pipelines/129/cancel', created_at: '2017-05-24T14:46:20.090Z', updated_at: '2017-05-24T14:46:29.906Z', }, @@ -60,7 +60,7 @@ export default { { id: 132, active: true, - path: '/gitlab-org/gitlab-foss/pipelines/132', + path: '/gitlab-org/gitlab-foss/-/pipelines/132', project: { name: 'GitLabCE', }, @@ -71,7 +71,7 @@ export default { label: 'running', group: 'running', has_details: true, - details_path: '/gitlab-org/gitlab-foss/pipelines/132', + details_path: '/gitlab-org/gitlab-foss/-/pipelines/132', favicon: '/assets/ci_favicons/dev/favicon_status_running-c3ad2fc53ea6079c174e5b6c1351ff349e99ec3af5a5622fb77b0fe53ea279c1.ico', }, @@ -110,15 +110,15 @@ export default { 'http://localhost:3000/gitlab-org/gitlab-foss/commit/b9d58c4cecd06be74c3cc32ccfb522b31544ab2e', commit_path: '/gitlab-org/gitlab-foss/commit/b9d58c4cecd06be74c3cc32ccfb522b31544ab2e', }, - retry_path: '/gitlab-org/gitlab-foss/pipelines/132/retry', - cancel_path: '/gitlab-org/gitlab-foss/pipelines/132/cancel', + retry_path: '/gitlab-org/gitlab-foss/-/pipelines/132/retry', + cancel_path: '/gitlab-org/gitlab-foss/-/pipelines/132/cancel', created_at: '2017-05-24T14:46:24.644Z', updated_at: '2017-05-24T14:48:55.226Z', }, { id: 133, active: true, - path: '/gitlab-org/gitlab-foss/pipelines/133', + path: '/gitlab-org/gitlab-foss/-/pipelines/133', project: { name: 'GitLabCE', }, @@ -129,7 +129,7 @@ export default { label: 'running', group: 'running', has_details: true, - details_path: '/gitlab-org/gitlab-foss/pipelines/133', + details_path: '/gitlab-org/gitlab-foss/-/pipelines/133', favicon: '/assets/ci_favicons/dev/favicon_status_running-c3ad2fc53ea6079c174e5b6c1351ff349e99ec3af5a5622fb77b0fe53ea279c1.ico', }, @@ -168,15 +168,15 @@ export default { 'http://localhost:3000/gitlab-org/gitlab-foss/commit/b6bd4856a33df3d144be66c4ed1f1396009bb08b', commit_path: '/gitlab-org/gitlab-foss/commit/b6bd4856a33df3d144be66c4ed1f1396009bb08b', }, - retry_path: '/gitlab-org/gitlab-foss/pipelines/133/retry', - cancel_path: '/gitlab-org/gitlab-foss/pipelines/133/cancel', + retry_path: '/gitlab-org/gitlab-foss/-/pipelines/133/retry', + cancel_path: '/gitlab-org/gitlab-foss/-/pipelines/133/cancel', created_at: '2017-05-24T14:46:24.648Z', updated_at: '2017-05-24T14:48:59.673Z', }, { id: 130, active: true, - path: '/gitlab-org/gitlab-foss/pipelines/130', + path: '/gitlab-org/gitlab-foss/-/pipelines/130', project: { name: 'GitLabCE', }, @@ -187,7 +187,7 @@ export default { label: 'running', group: 'running', has_details: true, - details_path: '/gitlab-org/gitlab-foss/pipelines/130', + details_path: '/gitlab-org/gitlab-foss/-/pipelines/130', favicon: '/assets/ci_favicons/dev/favicon_status_running-c3ad2fc53ea6079c174e5b6c1351ff349e99ec3af5a5622fb77b0fe53ea279c1.ico', }, @@ -225,15 +225,15 @@ export default { 'http://localhost:3000/gitlab-org/gitlab-foss/commit/6d7ced4a2311eeff037c5575cca1868a6d3f586f', commit_path: '/gitlab-org/gitlab-foss/commit/6d7ced4a2311eeff037c5575cca1868a6d3f586f', }, - retry_path: '/gitlab-org/gitlab-foss/pipelines/130/retry', - cancel_path: '/gitlab-org/gitlab-foss/pipelines/130/cancel', + retry_path: '/gitlab-org/gitlab-foss/-/pipelines/130/retry', + cancel_path: '/gitlab-org/gitlab-foss/-/pipelines/130/cancel', created_at: '2017-05-24T14:46:24.630Z', updated_at: '2017-05-24T14:49:45.091Z', }, { id: 131, active: true, - path: '/gitlab-org/gitlab-foss/pipelines/132', + path: '/gitlab-org/gitlab-foss/-/pipelines/132', project: { name: 'GitLabCE', }, @@ -244,7 +244,7 @@ export default { label: 'running', group: 'running', has_details: true, - details_path: '/gitlab-org/gitlab-foss/pipelines/132', + details_path: '/gitlab-org/gitlab-foss/-/pipelines/132', favicon: '/assets/ci_favicons/dev/favicon_status_running-c3ad2fc53ea6079c174e5b6c1351ff349e99ec3af5a5622fb77b0fe53ea279c1.ico', }, @@ -283,15 +283,15 @@ export default { 'http://localhost:3000/gitlab-org/gitlab-foss/commit/b9d58c4cecd06be74c3cc32ccfb522b31544ab2e', commit_path: '/gitlab-org/gitlab-foss/commit/b9d58c4cecd06be74c3cc32ccfb522b31544ab2e', }, - retry_path: '/gitlab-org/gitlab-foss/pipelines/132/retry', - cancel_path: '/gitlab-org/gitlab-foss/pipelines/132/cancel', + retry_path: '/gitlab-org/gitlab-foss/-/pipelines/132/retry', + cancel_path: '/gitlab-org/gitlab-foss/-/pipelines/132/cancel', created_at: '2017-05-24T14:46:24.644Z', updated_at: '2017-05-24T14:48:55.226Z', }, { id: 134, active: true, - path: '/gitlab-org/gitlab-foss/pipelines/133', + path: '/gitlab-org/gitlab-foss/-/pipelines/133', project: { name: 'GitLabCE', }, @@ -302,7 +302,7 @@ export default { label: 'running', group: 'running', has_details: true, - details_path: '/gitlab-org/gitlab-foss/pipelines/133', + details_path: '/gitlab-org/gitlab-foss/-/pipelines/133', favicon: '/assets/ci_favicons/dev/favicon_status_running-c3ad2fc53ea6079c174e5b6c1351ff349e99ec3af5a5622fb77b0fe53ea279c1.ico', }, @@ -341,15 +341,15 @@ export default { 'http://localhost:3000/gitlab-org/gitlab-foss/commit/b6bd4856a33df3d144be66c4ed1f1396009bb08b', commit_path: '/gitlab-org/gitlab-foss/commit/b6bd4856a33df3d144be66c4ed1f1396009bb08b', }, - retry_path: '/gitlab-org/gitlab-foss/pipelines/133/retry', - cancel_path: '/gitlab-org/gitlab-foss/pipelines/133/cancel', + retry_path: '/gitlab-org/gitlab-foss/-/pipelines/133/retry', + cancel_path: '/gitlab-org/gitlab-foss/-/pipelines/133/cancel', created_at: '2017-05-24T14:46:24.648Z', updated_at: '2017-05-24T14:48:59.673Z', }, { id: 135, active: true, - path: '/gitlab-org/gitlab-foss/pipelines/130', + path: '/gitlab-org/gitlab-foss/-/pipelines/130', project: { name: 'GitLabCE', }, @@ -360,7 +360,7 @@ export default { label: 'running', group: 'running', has_details: true, - details_path: '/gitlab-org/gitlab-foss/pipelines/130', + details_path: '/gitlab-org/gitlab-foss/-/pipelines/130', favicon: '/assets/ci_favicons/dev/favicon_status_running-c3ad2fc53ea6079c174e5b6c1351ff349e99ec3af5a5622fb77b0fe53ea279c1.ico', }, @@ -398,8 +398,8 @@ export default { 'http://localhost:3000/gitlab-org/gitlab-foss/commit/6d7ced4a2311eeff037c5575cca1868a6d3f586f', commit_path: '/gitlab-org/gitlab-foss/commit/6d7ced4a2311eeff037c5575cca1868a6d3f586f', }, - retry_path: '/gitlab-org/gitlab-foss/pipelines/130/retry', - cancel_path: '/gitlab-org/gitlab-foss/pipelines/130/cancel', + retry_path: '/gitlab-org/gitlab-foss/-/pipelines/130/retry', + cancel_path: '/gitlab-org/gitlab-foss/-/pipelines/130/cancel', created_at: '2017-05-24T14:46:24.630Z', updated_at: '2017-05-24T14:49:45.091Z', }, diff --git a/ee/spec/frontend/vue_shared/dashboards/mock_data.js b/ee/spec/frontend/vue_shared/dashboards/mock_data.js index 66664b0ef83456..b96f469af4cd27 100644 --- a/ee/spec/frontend/vue_shared/dashboards/mock_data.js +++ b/ee/spec/frontend/vue_shared/dashboards/mock_data.js @@ -38,7 +38,7 @@ export function mockPipelineData( path: '/test', }, active: false, - path: '/test/test-project/pipelines/1', + path: '/test/test-project/-/pipelines/1', details: { status: { icon: `status_${status}`, @@ -47,7 +47,7 @@ export function mockPipelineData( group: status, tooltip: status, has_details: true, - details_path: '/test/test-project/pipelines/1', + details_path: '/test/test-project/-/pipelines/1', illustration: null, }, finished_at: finishedTimeStamp, diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index a72762e5f7b610..30c7c401338f54 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -58,7 +58,7 @@ end end - describe 'GET /:project/pipelines/:id' do + describe 'GET /:project/-/pipelines/:id' do include_context 'pipeline builds' let(:group) { create(:group) } @@ -633,7 +633,7 @@ project.update(public_builds: false) end - describe 'GET /:project/pipelines/:id' do + describe 'GET /:project/-/pipelines/:id' do include_context 'pipeline builds' let(:project) { create(:project, :repository) } @@ -678,7 +678,7 @@ downstream: downstream) end - describe 'GET /:project/pipelines/:id' do + describe 'GET /:project/-/pipelines/:id' do before do visit project_pipeline_path(project, pipeline) end @@ -727,7 +727,7 @@ end end - describe 'GET /:project/pipelines/:id/builds' do + describe 'GET /:project/-/pipelines/:id/builds' do before do visit builds_project_pipeline_path(project, pipeline) end @@ -754,7 +754,7 @@ stage_idx: 2, pipeline: pipeline, project: project, resource_group: resource_group) end - describe 'GET /:project/pipelines/:id' do + describe 'GET /:project/-/pipelines/:id' do subject { visit project_pipeline_path(project, pipeline) } it 'shows deploy job as created' do @@ -872,7 +872,7 @@ end end - describe 'GET /:project/pipelines/:id/builds' do + describe 'GET /:project/-/pipelines/:id/builds' do include_context 'pipeline builds' let(:project) { create(:project, :repository) } @@ -974,7 +974,7 @@ end end - describe 'GET /:project/pipelines/:id/failures' do + describe 'GET /:project/-/pipelines/:id/failures' do let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: '1234') } let(:pipeline_failures_page) { failures_project_pipeline_path(project, pipeline) } let!(:failed_build) { create(:ci_build, :failed, pipeline: pipeline) } @@ -1092,7 +1092,7 @@ end end - describe 'GET /:project/pipelines/:id/dag' do + describe 'GET /:project/-/pipelines/:id/dag' do include_context 'pipeline builds' let(:project) { create(:project, :repository) } diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index e0a0591fe6ba9c..cc0a528aaa32f8 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -18,7 +18,7 @@ project.update!(auto_devops_attributes: { enabled: false }) end - describe 'GET /:project/pipelines' do + describe 'GET /:project/-/pipelines' do let(:project) { create(:project, :repository) } let!(:pipeline) do @@ -617,7 +617,7 @@ end end - describe 'GET /:project/pipelines/show' do + describe 'GET /:project/-/pipelines/show' do let(:project) { create(:project, :repository) } let(:pipeline) do @@ -669,7 +669,7 @@ def create_build(stage, stage_idx, name, status) end end - describe 'POST /:project/pipelines' do + describe 'POST /:project/-/pipelines' do let(:project) { create(:project, :repository) } before do -- GitLab