fixed some cypress tests w/ burnettk
This commit is contained in:
parent
d5808045e2
commit
b1f9bbc475
|
@ -101,7 +101,7 @@ Cypress.Commands.add('createModel', (groupId, modelId, modelDisplayName) => {
|
||||||
// Intended to be run from the process model show page
|
// Intended to be run from the process model show page
|
||||||
Cypress.Commands.add(
|
Cypress.Commands.add(
|
||||||
'runPrimaryBpmnFile',
|
'runPrimaryBpmnFile',
|
||||||
(expectAutoRedirectToHumanTask = false) => {
|
(expectAutoRedirectToHumanTask = false, returnToProcessModelShow = true) => {
|
||||||
// cy.getBySel('start-process-instance').click();
|
// cy.getBySel('start-process-instance').click();
|
||||||
// click on button with text Start
|
// click on button with text Start
|
||||||
cy.get('button')
|
cy.get('button')
|
||||||
|
@ -112,11 +112,12 @@ Cypress.Commands.add(
|
||||||
cy.url().should('include', `/tasks/`);
|
cy.url().should('include', `/tasks/`);
|
||||||
cy.contains('Task: ', { timeout: 30000 });
|
cy.contains('Task: ', { timeout: 30000 });
|
||||||
} else {
|
} else {
|
||||||
cy.contains(/Process Instance.*[kK]icked [oO]ff/);
|
cy.url().should('include', `/interstitial`);
|
||||||
cy.reload(true);
|
cy.contains('Status: Completed');
|
||||||
cy.contains('Process Model:').should('exist');
|
if (returnToProcessModelShow) {
|
||||||
cy.contains(/Process Instance.*[kK]icked [oO]ff/).should('not.exist');
|
cy.getBySel('process-model-breadcrumb-link').click();
|
||||||
cy.getBySel('process-model-show-permissions-loaded').should('exist');
|
cy.getBySel('process-model-show-permissions-loaded').should('exist');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -71,14 +71,20 @@ export default function ProcessBreadcrumb({ hotCrumbs }: OwnProps) {
|
||||||
|
|
||||||
if (crumb.linkLastItem) {
|
if (crumb.linkLastItem) {
|
||||||
let apiBase = '/admin/process-groups';
|
let apiBase = '/admin/process-groups';
|
||||||
|
let dataQaTag = '';
|
||||||
if (crumb.entityType.startsWith('process-model')) {
|
if (crumb.entityType.startsWith('process-model')) {
|
||||||
apiBase = '/admin/process-models';
|
apiBase = '/admin/process-models';
|
||||||
|
dataQaTag = 'process-model-breadcrumb-link';
|
||||||
}
|
}
|
||||||
const fullUrl = `${apiBase}/${modifyProcessIdentifierForPathParam(
|
const fullUrl = `${apiBase}/${modifyProcessIdentifierForPathParam(
|
||||||
processEntity.id
|
processEntity.id
|
||||||
)}`;
|
)}`;
|
||||||
breadcrumbs.push(
|
breadcrumbs.push(
|
||||||
<BreadcrumbItem key={processEntity.id} href={fullUrl}>
|
<BreadcrumbItem
|
||||||
|
key={processEntity.id}
|
||||||
|
href={fullUrl}
|
||||||
|
data-qa={dataQaTag}
|
||||||
|
>
|
||||||
{processEntity.display_name}
|
{processEntity.display_name}
|
||||||
</BreadcrumbItem>
|
</BreadcrumbItem>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue