Skip to content

Commit

Permalink
Merge pull request #34 from ProcessMaker/updMethodsAndSelectorsABtesting
Browse files Browse the repository at this point in the history
methods and selectors ABtesting
  • Loading branch information
WendyFPM authored May 3, 2024
2 parents 0bd1ce3 + 50d64b8 commit eec5fb4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions pages/abTesting.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export class ABTesting {

deleteAlternativeB_ifExist() {
cy.iframe(selectors.iframeA).find(selectors.menuAB).invoke('text').then($text => {
cy.log($text)
if ($text.includes('Alternative B')) {
this.deleteAlternativeB();
}
Expand Down Expand Up @@ -109,11 +108,13 @@ export class ABTesting {
cy.iframe(iframeSelector).find('[class="modal-dialog modal-lg modal-dialog-centered"]').should('be.visible');
}

saveLaunchPadModal() {
cy.iframe(selectors.iframeA).find(selectors.modalLaunchpad).should('be.visible');
cy.iframe(selectors.iframeA).find(selectors.labelLaunchpad).should('contain', 'Launchpad Settings')
cy.iframe(selectors.iframeA).find(selectors.saveBtnInLaunchpadSettingModal).should('be.visible');
cy.iframe(selectors.iframeA).find(selectors.saveBtnInLaunchpadSettingModal).click({ force: true });
saveLaunchPadModal(iframeOption = 'a') {
let iframeSelector = iframeOption === 'a' ? selectors.iframeA : selectors.iframeB
cy.iframe(iframeSelector).find(selectors.modalLaunchpad).should('be.visible');
cy.iframe(iframeSelector).find(selectors.labelLaunchpad).should('contain', 'Launchpad Settings')
cy.iframe(iframeSelector).find(selectors.saveBtnInLaunchpadSettingModal).should('be.visible');
cy.wait(3000);
cy.iframe(iframeSelector).find(selectors.saveBtnInLaunchpadSettingModal).click({ force: true });
}

selectAlternativeA(iframeOption = 'a') {
Expand Down
4 changes: 2 additions & 2 deletions selectors/abTesting.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {

//AB alternatives
menuAB: '[id="myTab"]',
alternativeA_Tab: '[id="tab-A"]',
alternativeA_Tab: '[data-test="tab-A"]',
alternativeB_Tab: '[data-test="tab-B"]',
plusTab: '[data-test="tab-plus"]',
deleteAltB_Btn: '[id="tab-B-remove"]',
Expand All @@ -25,7 +25,7 @@ export default {
saveAndPublish: '[data-test="btn-save-publish"]',
version: 'input[name="version"]',
description: '[name="description"]',
saveBtnInLaunchpadSettingModal: '[class="btn btn-secondary"]',
saveBtnInLaunchpadSettingModal: '[data-test="launchpad-modal-btn-ok"]',
modalLaunchpad: '[id="launchpadSettingsModal___BV_modal_content_"]',
labelLaunchpad: '[id="launchpadSettingsModal___BV_modal_title_"]',
closeModalPublish: '[aria-label="Close"]',
Expand Down

0 comments on commit eec5fb4

Please sign in to comment.