@processmaker/cypress-utils
Advanced tools
Comparing version 1.0.18 to 1.0.19
{ | ||
"name": "@processmaker/cypress-utils", | ||
"version": "1.0.18", | ||
"version": "1.0.19", | ||
"description": "ProcessMaker Cypress Testing Utilities", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,3 +18,3 @@ import { NavigationHelper } from "#helpers/navigationHelper"; | ||
this.clickOnPlusBtn(); | ||
this.clickOnConfirmBtn({ force: true }); | ||
this.clickOnConfirmEnableBtn({ force: true }); | ||
} | ||
@@ -29,9 +29,16 @@ }) | ||
clickOnConfirmBtn() { | ||
clickOnConfirmEnableBtn() { | ||
cy.iframe(selectors.iframeA).find('[class="modal-content"]').should('be.visible'); | ||
cy.iframe(selectors.iframeA).find(selectors.confirmBtn).should('be.visible'); | ||
cy.wait(2000) | ||
cy.iframe(selectors.iframeA).find(selectors.confirmBtn).click({ force: true, delay: 1000 }); | ||
cy.wait(2000); | ||
cy.iframe(selectors.iframeA).find(selectors.confirmEnableBtn).should('be.visible'); | ||
cy.iframe(selectors.iframeA).find(selectors.confirmEnableBtn).click({ force: true, delay: 1000 }); | ||
} | ||
clickOnConfirmDeleteBtn() { | ||
cy.iframe(selectors.iframeA).find('[class="modal-content"]').should('be.visible'); | ||
cy.wait(2000); | ||
cy.iframe(selectors.iframeA).find(selectors.confirmDeleteBtn).should('be.visible'); | ||
cy.iframe(selectors.iframeA).find(selectors.confirmDeleteBtn).click({ force: true, delay: 1000 }); | ||
} | ||
replaceAlternativeAWithDataOfAlternativeB(iframeOption) { | ||
@@ -63,5 +70,14 @@ this.clickOnAlternativeA(iframeOption); | ||
cy.iframe(selectors.iframeA).find(selectors.deleteAltB_Btn).first().click(); | ||
this.clickOnConfirmBtn(); | ||
this.clickOnConfirmDeleteBtn(); | ||
} | ||
deleteAlternativeB_ifExist() { | ||
cy.iframe(selectors.iframeA).find(selectors.menuAB).invoke('text').then($text => { | ||
cy.log($text) | ||
if ($text.includes('Alternative B')) { | ||
this.deleteAlternativeB(); | ||
} | ||
}) | ||
} | ||
//Publish New Version | ||
@@ -68,0 +84,0 @@ publishNewVersion(option, iframeOption, alternative, version, description) { |
@@ -11,5 +11,5 @@ export default { | ||
deleteAltB_Btn: '[id="tab-B-remove"]', | ||
confirmBtn: 'button[data-test="ab-enable-alternative-ok"]', | ||
confirmEnableBtn: 'button[data-test="ab-enable-alternative-ok"]', | ||
confirmDeleteBtn: 'button[data-test="ab-delete-alternative-ok"]', | ||
//Replace alternative | ||
@@ -16,0 +16,0 @@ replaceAlternativeBtn: '[data-test="tab-replace"]', |
1763531
31316