Skip to content

Commit

Permalink
code for correct pmBlock and TCP4-3160
Browse files Browse the repository at this point in the history
  • Loading branch information
PaolaPellegrini committed May 24, 2024
1 parent 635de02 commit a80a834
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
8 changes: 5 additions & 3 deletions pages/executionConnectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,16 +437,18 @@ 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);

//Step 3: Open the PMBlock Imported
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");
}
Expand Down
18 changes: 7 additions & 11 deletions pages/pmBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a80a834

Please sign in to comment.