Updated the button click to support when there are multiple processes for the user

This commit is contained in:
Madhurya Liyanage 2023-04-06 20:01:24 +05:30
parent 512948eb4b
commit 15ebf16fe5
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
import { string } from 'prop-types'; import { string } from 'prop-types';
import { modifyProcessIdentifierForPathParam } from '../../src/helpers'; import { modifyProcessIdentifierForPathParam } from '../../src/helpers';
import { miscDisplayName } from './helpers'; import { miscDisplayName } from './helpers';
import 'cypress-file-upload';
// *********************************************** // ***********************************************
// This example commands.js shows you how to // This example commands.js shows you how to
@ -102,8 +103,9 @@ Cypress.Commands.add(
(expectAutoRedirectToHumanTask = false) => { (expectAutoRedirectToHumanTask = false) => {
// 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') // cy.get('#process-model-tile-manage-procurement\\/procurement\\/requisition-order-management\\/new-demand-request-procurement > div > button')
cy.get('#process-model-tile-manage-procurement\\/procurement\\/requisition-order-management\\/raise-new-demand-request > div > button')
.contains(/^Start$/) .contains(/^Start$/)
.click(); .click();
if (expectAutoRedirectToHumanTask) { if (expectAutoRedirectToHumanTask) {