Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new integration test for testing custom export filename #3052

Merged
merged 3 commits into from
Dec 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions tests/integration/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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');

Expand Down Expand Up @@ -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');

Expand Down