LearningSalesForceCommerceC.../storefront-reference-architecture/test/acceptance/utilities.js
2021-12-21 10:57:31 -08:00

21 lines
532 B
JavaScript

const I = actor();
module.exports = {
locators: {
consentTrackModal: '.modal-content',
consentTrackAffirm: '.affirm.btn.btn-primary'
},
accept() {
I.waitForElement(this.locators.consentTrackModal);
within(this.locators.consentTrackModal, () => {
I.click(this.locators.consentTrackAffirm);
});
},
clickToLoadPage(elementSelector, expectedPageUrl) {
I.click(elementSelector);
I.wait(1);
I.seeCurrentUrlEquals(expectedPageUrl);
}
};