Skip to content

Commit 7f9ef75

Browse files
authored
createRunDeletePipelineCustomPipMirror e2e test quarantine (#6045)
1 parent ca8a5c1 commit 7f9ef75

1 file changed

Lines changed: 93 additions & 89 deletions

File tree

packages/cypress/cypress/tests/e2e/pipelines/createRunDeletePipelineCustomPipMirror.cy.ts

Lines changed: 93 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -20,106 +20,110 @@ const testPipelineIrisName = 'test-iris-pipeline';
2020
const testRunName = 'test-pipelines-run';
2121
const awsBucket = 'BUCKET_2' as const;
2222

23-
describe('An admin user can import and run a pipeline', { testIsolation: false }, () => {
24-
retryableBefore(() => {
25-
provisionProjectForPipelines(projectName, dspaSecretName, awsBucket);
26-
//Create Pipelines ConfigMap With Custom Pip Index Url And Trusted Host
27-
createOpenShiftConfigMap('ds-pipeline-custom-env-vars', projectName, {
28-
// The following lines should be snake case
29-
/* eslint-disable-next-line camelcase */
30-
pip_index_url: Cypress.env('PIP_INDEX_URL'),
31-
/* eslint-disable-next-line camelcase */
32-
pip_trusted_host: Cypress.env('PIP_TRUSTED_HOST'),
23+
describe(
24+
'[Product Bug: RHOAIENG-46257] An admin user can import and run a pipeline',
25+
{ testIsolation: false },
26+
() => {
27+
retryableBefore(() => {
28+
provisionProjectForPipelines(projectName, dspaSecretName, awsBucket);
29+
//Create Pipelines ConfigMap With Custom Pip Index Url And Trusted Host
30+
createOpenShiftConfigMap('ds-pipeline-custom-env-vars', projectName, {
31+
// The following lines should be snake case
32+
/* eslint-disable-next-line camelcase */
33+
pip_index_url: Cypress.env('PIP_INDEX_URL'),
34+
/* eslint-disable-next-line camelcase */
35+
pip_trusted_host: Cypress.env('PIP_TRUSTED_HOST'),
36+
});
3337
});
34-
});
3538

36-
after(() => {
37-
// Delete provisioned Project
38-
deleteOpenShiftProject(projectName, { wait: false, ignoreNotFound: true });
39-
});
39+
after(() => {
40+
// Delete provisioned Project
41+
deleteOpenShiftProject(projectName, { wait: false, ignoreNotFound: true });
42+
});
4043

41-
it(
42-
'Verify User Can Create, Run and Delete A Pipeline From DS Project Details Page Using Custom Pip Mirror',
43-
{ tags: ['@Smoke', '@SmokeSet1', '@ODS-2206', '@Pipelines', '@Dashboard'] },
44-
() => {
45-
cy.step(`Navigate to Pipelines ${projectName}`);
46-
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);
47-
projectListPage.navigate();
48-
projectListPage.filterProjectByName(projectName);
49-
projectListPage.findProjectLink(projectName).click();
44+
it(
45+
'Verify User Can Create, Run and Delete A Pipeline From DS Project Details Page Using Custom Pip Mirror',
46+
{ tags: ['@Smoke', '@SmokeSet1', '@ODS-2206', '@Pipelines', '@Dashboard', '@Bug'] },
47+
() => {
48+
cy.step(`Navigate to Pipelines ${projectName}`);
49+
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);
50+
projectListPage.navigate();
51+
projectListPage.filterProjectByName(projectName);
52+
projectListPage.findProjectLink(projectName).click();
5053

51-
cy.step('Import a pipeline from a yaml local file');
52-
// Increasing the timeout to ~5mins so the DSPA can be loaded
53-
projectDetails.findImportPipelineButton(300000).click();
54-
// Fill the Import Pipeline modal
55-
pipelineImportModal.findPipelineNameInput().type(testPipelineIrisName);
56-
pipelineImportModal.findUploadPipelineRadio().click();
57-
pipelineImportModal.uploadPipelineYaml(getIrisPipelinePath());
58-
pipelineImportModal.submit();
54+
cy.step('Import a pipeline from a yaml local file');
55+
// Increasing the timeout to ~5mins so the DSPA can be loaded
56+
projectDetails.findImportPipelineButton(300000).click();
57+
// Fill the Import Pipeline modal
58+
pipelineImportModal.findPipelineNameInput().type(testPipelineIrisName);
59+
pipelineImportModal.findUploadPipelineRadio().click();
60+
pipelineImportModal.uploadPipelineYaml(getIrisPipelinePath());
61+
pipelineImportModal.submit();
5962

60-
// Verify that we are at the details page of the pipeline by checking the title
61-
// It can take a little longer than expected to load
62-
pipelineDetails.findPageTitle(60000).should('have.text', testPipelineIrisName);
63+
// Verify that we are at the details page of the pipeline by checking the title
64+
// It can take a little longer than expected to load
65+
pipelineDetails.findPageTitle(60000).should('have.text', testPipelineIrisName);
6366

64-
// Get the pipeline ID and version ID from the URL
65-
cy.url().then((currentUrl) => {
66-
const regex = /\/develop-train\/pipelines\/definitions\/[^/]+\/([^/]+)\/([^/]+)\/view/;
67-
const match = currentUrl.match(regex);
67+
// Get the pipeline ID and version ID from the URL
68+
cy.url().then((currentUrl) => {
69+
const regex = /\/develop-train\/pipelines\/definitions\/[^/]+\/([^/]+)\/([^/]+)\/view/;
70+
const match = currentUrl.match(regex);
6871

69-
if (match) {
70-
const [, pipelineId, versionId] = match;
71-
cy.log(`Pipeline ID: ${pipelineId}`);
72-
cy.log(`Version ID: ${versionId}`);
72+
if (match) {
73+
const [, pipelineId, versionId] = match;
74+
cy.log(`Pipeline ID: ${pipelineId}`);
75+
cy.log(`Version ID: ${versionId}`);
7376

74-
cy.step(`Create a ${testPipelineIrisName} pipeline run from the Runs view`);
75-
pipelineRunsGlobal.navigate();
76-
pipelineRunsGlobal.selectProjectByName(projectName);
77-
pipelineRunsGlobal.findCreateRunButton().click();
77+
cy.step(`Create a ${testPipelineIrisName} pipeline run from the Runs view`);
78+
pipelineRunsGlobal.navigate();
79+
pipelineRunsGlobal.selectProjectByName(projectName);
80+
pipelineRunsGlobal.findCreateRunButton().click();
7881

79-
cy.step('Run the pipeline from the Runs view');
80-
createRunPage.experimentSelect.findToggleButton().click();
81-
createRunPage.selectExperimentByName('Default');
82-
createRunPage.fillName(testRunName);
83-
createRunPage.fillDescription('Run Description');
84-
createRunPage.pipelineSelect.openAndSelectItem(testPipelineIrisName);
85-
createRunPage.pipelineVersionSelect.openAndSelectItem(testPipelineIrisName);
86-
createRunPage.findSubmitButton().click();
82+
cy.step('Run the pipeline from the Runs view');
83+
createRunPage.experimentSelect.findToggleButton().click();
84+
createRunPage.selectExperimentByName('Default');
85+
createRunPage.fillName(testRunName);
86+
createRunPage.fillDescription('Run Description');
87+
createRunPage.pipelineSelect.openAndSelectItem(testPipelineIrisName);
88+
createRunPage.pipelineVersionSelect.openAndSelectItem(testPipelineIrisName);
89+
createRunPage.findSubmitButton().click();
8790

88-
cy.step('Expect the run to Succeed');
89-
pipelineRunDetails.expectStatusLabelToBe('Succeeded', 240000);
91+
cy.step('Expect the run to Succeed');
92+
pipelineRunDetails.expectStatusLabelToBe('Succeeded', 240000);
9093

91-
cy.step('Delete the pipeline version');
92-
pipelinesGlobal.navigate();
93-
// pipelineRunsGlobal.selectProjectByName(projectName);
94-
const pipelineRowWithVersion = pipelinesTable.getRowById(pipelineId);
95-
pipelineRowWithVersion.findExpandButton().click();
96-
pipelineRowWithVersion
97-
.getPipelineVersionRowById(versionId)
98-
.findKebabAction('Delete pipeline version')
99-
.click();
100-
pipelineDeleteModal.findInput().fill(testPipelineIrisName);
101-
pipelineDeleteModal.findSubmitButton().click();
102-
// The line below it's not working due to a bug
103-
// pipelineDeleteModal.shouldBeOpen(false);
104-
cy.get('[role=dialog]').should('not.exist');
94+
cy.step('Delete the pipeline version');
95+
pipelinesGlobal.navigate();
96+
// pipelineRunsGlobal.selectProjectByName(projectName);
97+
const pipelineRowWithVersion = pipelinesTable.getRowById(pipelineId);
98+
pipelineRowWithVersion.findExpandButton().click();
99+
pipelineRowWithVersion
100+
.getPipelineVersionRowById(versionId)
101+
.findKebabAction('Delete pipeline version')
102+
.click();
103+
pipelineDeleteModal.findInput().fill(testPipelineIrisName);
104+
pipelineDeleteModal.findSubmitButton().click();
105+
// The line below it's not working due to a bug
106+
// pipelineDeleteModal.shouldBeOpen(false);
107+
cy.get('[role=dialog]').should('not.exist');
105108

106-
cy.step('Verify that the pipeline version no longer exist');
107-
const pipelineRowWithVersionDeleted = pipelinesTable.getRowById(pipelineId);
108-
pipelineRowWithVersionDeleted.findExpandButton().click();
109-
pipelineRowWithVersionDeleted.shouldNotHavePipelineVersion();
109+
cy.step('Verify that the pipeline version no longer exist');
110+
const pipelineRowWithVersionDeleted = pipelinesTable.getRowById(pipelineId);
111+
pipelineRowWithVersionDeleted.findExpandButton().click();
112+
pipelineRowWithVersionDeleted.shouldNotHavePipelineVersion();
110113

111-
cy.step('Delete the pipeline');
112-
const pipelineRow = pipelinesTable.getRowById(pipelineId);
113-
pipelineRow.findKebabAction('Delete pipeline').click();
114-
pipelineDeleteModal.findInput().fill(testPipelineIrisName);
115-
pipelineDeleteModal.findSubmitButton().click();
114+
cy.step('Delete the pipeline');
115+
const pipelineRow = pipelinesTable.getRowById(pipelineId);
116+
pipelineRow.findKebabAction('Delete pipeline').click();
117+
pipelineDeleteModal.findInput().fill(testPipelineIrisName);
118+
pipelineDeleteModal.findSubmitButton().click();
116119

117-
cy.step('Verify that the pipeline no longer exist');
118-
pipelinesTable.shouldBeEmpty();
119-
} else {
120-
throw new Error('Pipeline ID and Version ID could not be extracted from the URL.');
121-
}
122-
});
123-
},
124-
);
125-
});
120+
cy.step('Verify that the pipeline no longer exist');
121+
pipelinesTable.shouldBeEmpty();
122+
} else {
123+
throw new Error('Pipeline ID and Version ID could not be extracted from the URL.');
124+
}
125+
});
126+
},
127+
);
128+
},
129+
);

0 commit comments

Comments
 (0)