diff --git a/tests/integration/pipeline.ts b/tests/integration/pipeline.ts index 2ae4c9a68..aa8434fdf 100644 --- a/tests/integration/pipeline.ts +++ b/tests/integration/pipeline.ts @@ -17,6 +17,7 @@ describe('Pipeline Editor tests', () => { beforeEach(() => { cy.deleteFile('generic-test.yaml'); // previously exported pipeline + cy.deleteFile('generic-test-custom.yaml'); // previously exported pipeline cy.deleteFile('generic-test.py'); // previously exported pipeline cy.deleteFile('*.pipeline'); // delete pipeline files used for testing @@ -37,6 +38,7 @@ describe('Pipeline Editor tests', () => { cy.deleteFile('output.txt'); // delete output files generated by tests cy.deleteFile('*.pipeline'); // delete pipeline files used for testing cy.deleteFile('generic-test.yaml'); // exported pipeline + cy.deleteFile('generic-test-custom.yaml'); // exported pipeline cy.deleteFile('generic-test.py'); // exported pipeline cy.deleteFile('invalid.txt'); @@ -569,6 +571,43 @@ describe('Pipeline Editor tests', () => { cy.readFile('build/cypress-tests/helloworld.py'); }); + it('should export pipeline with custom filename', () => { + // Install runtime configuration + cy.installRuntimeConfig({ type: 'kfp' }); + + cy.openFile('generic-test.pipeline'); + + // try to export valid pipeline + cy.findByRole('button', { name: /export pipeline/i }).click(); + + // check label for generic pipeline + cy.get('.jp-Dialog-header').contains('Export pipeline'); + + cy.findByLabelText(/runtime platform/i).select('KUBEFLOW_PIPELINES'); + + cy.findByLabelText(/runtime configuration/i) + .select('kfp_test_runtime') + .should('have.value', 'kfp_test_runtime'); + + // Validate all export options are available + cy.findByLabelText(/export pipeline as/i) + .select('KFP static configuration file (YAML formatted)') + .should('have.value', 'yaml'); + + // customize filename by appending "-custom" + cy.findByLabelText(/export filename/i).type('-custom'); + + // actual export requires minio + cy.contains('OK').click(); + + // validate job was executed successfully, this can take a while in ci + cy.findByText(/pipeline export succeeded/i, { timeout: 30000 }).should( + 'be.visible' + ); + + cy.readFile('build/cypress-tests/generic-test-custom.yaml'); + }); + it('should not leak properties when switching between nodes', () => { cy.openFile('generic-test.pipeline');