From 7df88e627c4ae9ae34e1d458e03a439d8a2fa27a Mon Sep 17 00:00:00 2001 From: burnettk Date: Sun, 20 Nov 2022 21:28:23 -0500 Subject: [PATCH] fix cypress tests --- .../cypress/e2e/process_groups.cy.js | 7 ++++--- .../cypress/e2e/process_models.cy.js | 21 +++++++++---------- .../src/routes/ProcessModelShow.tsx | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/spiffworkflow-frontend/cypress/e2e/process_groups.cy.js b/spiffworkflow-frontend/cypress/e2e/process_groups.cy.js index 629b18c67..450d26899 100644 --- a/spiffworkflow-frontend/cypress/e2e/process_groups.cy.js +++ b/spiffworkflow-frontend/cypress/e2e/process_groups.cy.js @@ -37,7 +37,8 @@ describe('process-groups', () => { cy.contains(groupId).should('not.exist'); }); - it('can paginate items', () => { - cy.basicPaginationTest(); - }); + // process groups no longer has pagination post-tiles + // it('can paginate items', () => { + // cy.basicPaginationTest(); + // }); }); diff --git a/spiffworkflow-frontend/cypress/e2e/process_models.cy.js b/spiffworkflow-frontend/cypress/e2e/process_models.cy.js index 705f6011c..7b9741355 100644 --- a/spiffworkflow-frontend/cypress/e2e/process_models.cy.js +++ b/spiffworkflow-frontend/cypress/e2e/process_models.cy.js @@ -29,7 +29,10 @@ describe('process-models', () => { newModelDisplayName ); - cy.contains('Delete').click(); + // go back to process model show by clicking on the breadcrumb + cy.contains(modelId).click(); + + cy.getBySel('delete-process-model-button').click(); cy.contains('Are you sure'); cy.getBySel('modal-confirmation-dialog').find('.cds--btn--danger').click(); cy.url().should('include', `process-groups/${groupId}`); @@ -54,7 +57,6 @@ describe('process-models', () => { cy.contains(modelId).click(); cy.url().should('include', `process-models/${groupId}:${modelId}`); cy.contains(`Process Model: ${modelDisplayName}`); - cy.getBySel('files-accordion').click(); cy.contains(`${bpmnFileName}.bpmn`).should('not.exist'); cy.contains(`${dmnFileName}.dmn`).should('not.exist'); cy.contains(`${jsonFileName}.json`).should('not.exist'); @@ -73,7 +75,7 @@ describe('process-models', () => { cy.contains(`Process Model File: ${bpmnFileName}`); cy.contains(modelId).click(); cy.contains(`Process Model: ${modelDisplayName}`); - cy.getBySel('files-accordion').click(); + // cy.getBySel('files-accordion').click(); cy.contains(`${bpmnFileName}.bpmn`).should('exist'); // add new dmn file @@ -87,7 +89,7 @@ describe('process-models', () => { cy.contains(`Process Model File: ${dmnFileName}`); cy.contains(modelId).click(); cy.contains(`Process Model: ${modelDisplayName}`); - cy.getBySel('files-accordion').click(); + // cy.getBySel('files-accordion').click(); cy.contains(`${dmnFileName}.dmn`).should('exist'); // add new json file @@ -103,11 +105,10 @@ describe('process-models', () => { cy.wait(500); cy.contains(modelId).click(); cy.contains(`Process Model: ${modelDisplayName}`); - cy.getBySel('files-accordion').click(); + // cy.getBySel('files-accordion').click(); cy.contains(`${jsonFileName}.json`).should('exist'); - cy.contains('Edit process model').click(); - cy.contains('Delete').click(); + cy.getBySel('delete-process-model-button').click(); cy.contains('Are you sure'); cy.getBySel('modal-confirmation-dialog').find('.cds--btn--danger').click(); cy.url().should('include', `process-groups/${groupId}`); @@ -131,7 +132,6 @@ describe('process-models', () => { cy.url().should('include', `process-models/${groupId}:${modelId}`); cy.contains(`Process Model: ${modelDisplayName}`); - cy.getBySel('files-accordion').click(); cy.getBySel('upload-file-button').click(); cy.contains('Add file').selectFile( 'cypress/fixtures/test_bpmn_file_upload.bpmn' @@ -142,7 +142,7 @@ describe('process-models', () => { .click(); cy.runPrimaryBpmnFile(); - cy.getBySel('process-instance-list-link').click(); + // cy.getBySel('process-instance-list-link').click(); cy.getBySel('process-instance-show-link').click(); cy.getBySel('process-instance-delete').click(); cy.contains('Are you sure'); @@ -151,8 +151,7 @@ describe('process-models', () => { // in breadcrumb cy.contains(modelId).click(); - cy.contains('Edit process model').click(); - cy.contains('Delete').click(); + cy.getBySel('delete-process-model-button').click(); cy.contains('Are you sure'); cy.getBySel('modal-confirmation-dialog').find('.cds--btn--danger').click(); cy.url().should('include', `process-groups/${groupId}`); diff --git a/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx b/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx index d154075ab..57766aedb 100644 --- a/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessModelShow.tsx @@ -535,6 +535,7 @@ export default function ProcessModelShow() {