diff --git a/pages/executionConnectors.js b/pages/executionConnectors.js index 847a7fe..7d1a456 100644 --- a/pages/executionConnectors.js +++ b/pages/executionConnectors.js @@ -437,9 +437,10 @@ export class ExecutionConnectors { let pmblockPath = "pmblocks/tcp4-3160_pmblock_with_manual_task.json"; //Step 1: Import PM Block - pmBlock.importPMBlock(pmblockName, pmblockPath); - cy.get(selectorsPB.savePMBlock).click(); - + pmBlock.importPMBlock(pmblockPath); + cy.wait(2000); + cy.get('.btn-primary > span').click(); + //Step 2: CLick on PM Block navHelper.navigateToPmBlock(pmblockName); @@ -447,6 +448,7 @@ export class ExecutionConnectors { pmBlock.searchPmblockAndSelectOptions(pmblockName, "edit"); //Step 4: verify fortm task in Pm Block + process.openAlternativeModeler(); cy.get('[data-type="processmaker.components.nodes.task.Shape"]').eq(0).contains("ManualTask1").should("be.visible"); cy.get('[data-type="processmaker.components.nodes.task.Shape"]').eq(1).contains("ManualTask2").should("be.visible"); } diff --git a/pages/pmBlock.js b/pages/pmBlock.js index 3b41736..9458eaa 100644 --- a/pages/pmBlock.js +++ b/pages/pmBlock.js @@ -183,22 +183,18 @@ export class PMBlock { cy.xpath(optionXpath).first().click(); } - importPMBlock(pmblockName, pmblockPath) { + importPMBlock(pmblockPath) { cy.xpath(selectors.importButtonPMBlocks).first().click(); - cy.xpath(selectors.tittleImportPMBlocks) - .first() - .should("have.text", "Import PM Block") - .should("be.visible"); + cy.xpath(selectors.tittleImportPMBlocks).first().should("have.text", "Import PM Block").should("be.visible"); cy.xpath(selectors.inputToFileUploadPMBlocks).attachFile(pmblockPath); - cy.xpath(selectors.importBtnPMBlocks) - .parent() - .should("have.attr", "disabled", "disabled"); - cy.xpath(selectors.importBtnPMBlocks) - .parent() - .should("not.have.attr", "disabled", "disabled"); + cy.xpath(selectors.importBtnPMBlocks).parent().should("not.have.attr", "disabled", "disabled"); cy.xpath(selectors.importBtnPMBlocks).click(); cy.get(selectors.loadingPMBlockSpinner).should("not.exist"); } + clickOnImportButton() { + cy.get(selectors.importProcessBtn).click(); + cy.get(selectors.browseBtn).should("be.visible"); + } VerifyPresenceOfPMBlockAndImportPMBlock(pmblockName, pmblockPath) {