Skip to content

Commit

Permalink
Update PipelineRun details test
Browse files Browse the repository at this point in the history
  • Loading branch information
ashley-o0o committed May 3, 2024
1 parent 007a425 commit 2a4bba7
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,69 @@ describe('Pipeline topology', () => {
.findValue()
.contains('False');
});

it('Test pipeline triggered run bottom drawer output', () => {
initIntercepts();
pipelineRunDetails.visit(projectId, mockRun.run_id);

pipelineRunJobDetails.findBottomDrawer().findBottomDrawerYamlTab().click();
pipelineRunDetails.findBottomDrawer();
pipelineDetails.findYamlOutput().click();
const pipelineDashboardCodeEditor = pipelineDetails.getPipelineDashboardCodeEditor();
pipelineDashboardCodeEditor.findInput().should('not.be.empty');
});
});

describe('Pipeline run Input/Output', () => {
beforeEach(() => {
initIntercepts();
pipelineRunDetails.visit(projectId, mockRun.run_id);
});

it('Test with input/output artifacts', () => {
pipelineRunDetails.findTaskNode('create-dataset').click();
pipelineRunDetails.findRightDrawer().findRightDrawerInputOutputTab().should('be.visible');
pipelineRunDetails.findRightDrawer().findRightDrawerInputOutputTab().click();
pipelineDetails.findRunTaskRightDrawer();
pipelineDetails
.findOutputArtifacts()
.should('contain', 'Output artifacts')
.should('contain', 'iris_dataset');

pipelineRunDetails.findTaskNode('normalize-dataset').click();
pipelineRunDetails.findRightDrawer().findRightDrawerInputOutputTab().should('be.visible');
pipelineDetails.findRunTaskRightDrawer();
pipelineDetails
.findInputArtifacts()
.should('contain', 'Input artifacts')
.should('contain', 'input_iris_dataset');
});
});

describe('Pipeline run Details', () => {
beforeEach(() => {
initIntercepts();
pipelineRunDetails.visit(projectId, mockRun.run_id);
});

it('Test with the details', () => {
pipelineRunDetails.findTaskNode('create-dataset').click();
pipelineRunDetails.findRightDrawer().findRightDrawerDetailsTab().should('be.visible');
pipelineRunDetails.findRightDrawer().findRightDrawerDetailsTab().click();
pipelineRunDetails
.findRightDrawer()
.findRightDrawerDetailItem('Task ID')
.findValue()
.should('contain', 'task.create-dataset');

pipelineRunDetails.findTaskNode('normalize-dataset').click();
pipelineRunDetails.findRightDrawer().findRightDrawerDetailsTab().should('be.visible');
pipelineRunDetails
.findRightDrawer()
.findRightDrawerDetailItem('Task ID')
.findValue()
.should('contain', 'task.normalize-dataset');
});
});

describe('Pipeline run volume mounts', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class PipelineRunRightDrawer extends Contextual<HTMLDivElement> {
}

findRightDrawerDetailItem(key: string) {
return new DetailsItem(() => this.find().findByTestId(`detail-item-${key}`).parent());
return new DetailsItem(() => this.find().findByTestId(`detail-item-${key}`));
}
}

Expand Down Expand Up @@ -120,6 +120,10 @@ class PipelineDetails extends PipelinesTopology {
return cy.findByTestId('pipeline-yaml-tab');
}

findYamlOutput() {
return cy.findByTestId('pipeline-dashboard-code-editor');
}

getPipelineDashboardCodeEditor() {
return new DashboardCodeEditor(() => cy.findByTestId('pipeline-dashboard-code-editor'));
}
Expand All @@ -140,6 +144,14 @@ class PipelineDetails extends PipelinesTopology {
return cy.findByTestId('pipeline-run-drawer-right-content');
}

findInputArtifacts() {
return cy.findByTestId('Input-artifacts');
}

findOutputArtifacts() {
return cy.findByTestId('Output-artifacts');
}

findLogsSuccessAlert() {
return cy.findByTestId('logs-success-alert');
}
Expand Down

0 comments on commit 2a4bba7

Please sign in to comment.