Skip to content
Merged
Show file tree
Hide file tree
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
25 changes: 25 additions & 0 deletions tests/integration/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,31 @@ describe('Pipeline Editor tests', () => {
cy.findByRole('button', { name: /cancel/i }).click();
});

//error dialog tests
it('saving runtime config with missing required fields should error', () => {
cy.createRuntimeConfig({ type: 'invalid' });
cy.get('.jp-Dialog-header').contains('Error making request');

// Dismiss dialog
cy.findByRole('button', { name: /ok/i }).click();
});

it('exporting generic pipeline with invalid runtime config should produce request error', () => {
cy.createPipeline();
cy.savePipeline();

cy.installRuntimeConfig();

cy.findByRole('button', { name: /export pipeline/i }).click();

cy.contains('OK').click();

cy.get('.jp-Dialog-header').contains('Error making request');

// Dismiss dialog
cy.findByRole('button', { name: /ok/i }).click();
});

it('generic pipeline should display expected export options', () => {
cy.createPipeline();
cy.savePipeline();
Expand Down
14 changes: 10 additions & 4 deletions tests/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,24 @@ Cypress.Commands.add('createRuntimeConfig', ({ type } = {}): void => {
);
}

cy.findByLabelText(/^cloud object storage endpoint/i).type(
cy.findByLabelText('Cloud Object Storage Endpoint*').type(
'http://0.0.0.0:9000'
);
cy.findByLabelText(/object storage username/i).type('minioadmin');
cy.findByLabelText(/object storage password/i).type('minioadmin');

if (type !== 'invalid') {
cy.findByLabelText(/object storage username/i).type('minioadmin');
cy.findByLabelText(/object storage password/i).type('minioadmin');
}

cy.findByLabelText(/object storage bucket/i).type('test-bucket');

// save it
cy.findByRole('button', { name: /save/i }).click();

// reset runtimes widget
cy.findByRole('tab', { name: /runtimes/i }).click();
if (type !== 'invalid') {
cy.findByRole('tab', { name: /runtimes/i }).click();
}
});

Cypress.Commands.add('createExampleComponentCatalog', ({ type } = {}): void => {
Expand Down
4 changes: 3 additions & 1 deletion tests/support/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ declare namespace Cypress {
installRuntimeConfig(options?: {
type?: 'kfp' | 'airflow';
}): Chainable<void>;
createRuntimeConfig(options?: { type: 'kfp' | 'airflow' }): Chainable<void>;
createRuntimeConfig(options?: {
type: 'kfp' | 'airflow' | 'invalid';
}): Chainable<void>;
createExampleComponentCatalog(options?: {
type: 'kfp' | 'airflow';
}): Chainable<void>;
Expand Down