Skip to content

Commit

Permalink
updated Methods and selectors to AB Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
WendyFPM committed May 1, 2024
1 parent 774e591 commit be3e466
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions pages/abTesting.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const process = new Process();
export class ABTesting {
//AB alternatives
enableAlternativeB() {
cy.wait(1000)
this.waitUntilElementIsVisible('selector', '[data-test="processmaker-modeler-start-event-main"]');
cy.iframe(selectors.iframeA).find(selectors.menuAB).invoke('text').then($text => {
cy.log($text)
if ($text.includes('Alternative B')) {
Expand All @@ -21,13 +21,15 @@ export class ABTesting {
}

clickOnPlusBtn() {
this.waitUntilElementIsVisible('selector', selectors.plusTab);
cy.iframe(selectors.iframeA).find(selectors.plusTab).should('be.visible');
cy.iframe(selectors.iframeA).find(selectors.plusTab).click({ force: true });
cy.iframe(selectors.iframeA).find(selectors.plusTab).click({ force: true, delay: 1000 });
}

clickOnConfirmBtn() {
cy.iframe(selectors.iframeA).find(selectors.confirmBtn).click({ force: true });
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 });
}

replaceAlternativeAWithDataOfAlternativeB(iframeOption) {
Expand Down
2 changes: 1 addition & 1 deletion selectors/abTesting.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
alternativeB_Tab: '[data-test="tab-B"]',
plusTab: '[data-test="tab-plus"]',
deleteAltB_Btn: '[id="tab-B-remove"]',
confirmBtn: '[class="btn m-0 btn-secondary"]',
confirmBtn: 'button[data-test="ab-enable-alternative-ok"]',


//Replace alternative
Expand Down

0 comments on commit be3e466

Please sign in to comment.