diff --git a/spiffworkflow-frontend/cypress/support/commands.js b/spiffworkflow-frontend/cypress/support/commands.js index 6f3c9157f..5531d7bd4 100644 --- a/spiffworkflow-frontend/cypress/support/commands.js +++ b/spiffworkflow-frontend/cypress/support/commands.js @@ -101,7 +101,7 @@ Cypress.Commands.add('createModel', (groupId, modelId, modelDisplayName) => { // Intended to be run from the process model show page Cypress.Commands.add( 'runPrimaryBpmnFile', - (expectAutoRedirectToHumanTask = false) => { + (expectAutoRedirectToHumanTask = false, returnToProcessModelShow = true) => { // cy.getBySel('start-process-instance').click(); // click on button with text Start cy.get('button') @@ -112,11 +112,12 @@ Cypress.Commands.add( cy.url().should('include', `/tasks/`); cy.contains('Task: ', { timeout: 30000 }); } else { - cy.contains(/Process Instance.*[kK]icked [oO]ff/); - cy.reload(true); - cy.contains('Process Model:').should('exist'); - cy.contains(/Process Instance.*[kK]icked [oO]ff/).should('not.exist'); - cy.getBySel('process-model-show-permissions-loaded').should('exist'); + cy.url().should('include', `/interstitial`); + cy.contains('Status: Completed'); + if (returnToProcessModelShow) { + cy.getBySel('process-model-breadcrumb-link').click(); + cy.getBySel('process-model-show-permissions-loaded').should('exist'); + } } } ); diff --git a/spiffworkflow-frontend/src/components/ProcessBreadcrumb.tsx b/spiffworkflow-frontend/src/components/ProcessBreadcrumb.tsx index c9200ea64..15135985c 100644 --- a/spiffworkflow-frontend/src/components/ProcessBreadcrumb.tsx +++ b/spiffworkflow-frontend/src/components/ProcessBreadcrumb.tsx @@ -71,14 +71,20 @@ export default function ProcessBreadcrumb({ hotCrumbs }: OwnProps) { if (crumb.linkLastItem) { let apiBase = '/admin/process-groups'; + let dataQaTag = ''; if (crumb.entityType.startsWith('process-model')) { apiBase = '/admin/process-models'; + dataQaTag = 'process-model-breadcrumb-link'; } const fullUrl = `${apiBase}/${modifyProcessIdentifierForPathParam( processEntity.id )}`; breadcrumbs.push( - + {processEntity.display_name} );