fixed cypress tests

This commit is contained in:
jasquat 2023-01-16 12:24:02 -05:00
parent e2bedfd941
commit 201dbebf28
3 changed files with 13 additions and 17 deletions

View File

@ -165,7 +165,6 @@ describe('process-models', () => {
.click();
cy.runPrimaryBpmnFile();
// 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');

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
<bpmn:process id="Process_bd2e724" isExecutable="true">
<bpmn:process id="Process_Model_Cypress_Test_Process" isExecutable="true">
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_07vd2ar</bpmn:outgoing>
</bpmn:startEvent>

View File

@ -97,7 +97,7 @@ Cypress.Commands.add(
cy.reload(true);
cy.contains('Process Model:').should('exist');
cy.contains(/Process Instance.*[kK]icked [oO]ff/).should('not.exist');
cy.contains('[data-qa=process-model-show-permissions-loaded]', 'true');
cy.getBySel('process-model-show-permissions-loaded').should('exist');
}
}
);
@ -152,17 +152,14 @@ Cypress.Commands.add('assertNoItemInPaginatedResults', () => {
cy.contains(/\b00 of 0 items/);
});
Cypress.Commands.add(
'deleteProcessModelAndConfirm',
(buttonId, groupId) => {
cy.getBySel(buttonId).click();
cy.contains('Are you sure');
cy.getBySel('delete-process-model-button-modal-confirmation-dialog')
.find('.cds--btn--danger')
.click();
cy.url().should(
'include',
`process-groups/${modifyProcessIdentifierForPathParam(groupId)}`
);
}
);
Cypress.Commands.add('deleteProcessModelAndConfirm', (buttonId, groupId) => {
cy.getBySel(buttonId).click();
cy.contains('Are you sure');
cy.getBySel('delete-process-model-button-modal-confirmation-dialog')
.find('.cds--btn--danger')
.click();
cy.url().should(
'include',
`process-groups/${modifyProcessIdentifierForPathParam(groupId)}`
);
});