-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #801 from mollie/e2efix-6.x.x
E2E fix 6.x.x
- Loading branch information
Showing
22 changed files
with
4,902 additions
and
9,889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ cypress/screenshots | |
vendor | ||
node_modules | ||
composer.lock | ||
ngrok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,25 +31,21 @@ function prepareCookie() | |
|
||
}); | ||
} | ||
//Caching the BO and FO session | ||
const login = (MollieBOFOLoggingIn) => { | ||
cy.session(MollieBOFOLoggingIn,() => { | ||
cy.visit('/admin1/') | ||
cy.url().should('contain', 'https').as('Check if HTTPS exists') | ||
cy.get('#email').type('[email protected]',{delay: 0, log: false}) | ||
cy.get('#passwd').type('demodemo',{delay: 0, log: false}) | ||
cy.get('#submit_login').click().wait(1000).as('Connection successsful') | ||
//switching the multistore PS1784 | ||
cy.get('#header_shop > .dropdown').click() | ||
cy.get('.open > .dropdown-menu').find('[class="shop"]').eq(1).find('[href]').eq(0).click() | ||
cy.visit('/SHOP2/index.php?controller=my-account') | ||
cy.get('#login-form [name="email"]').eq(0).type('[email protected]') | ||
cy.get('#login-form [name="password"]').eq(0).type('demodemo') | ||
cy.get('#login-form [type="submit"]').eq(0).click({force:true}) | ||
cy.get('#history-link > .link-item').click() | ||
}) | ||
} | ||
|
||
//Caching the BO and FO session | ||
const login = (MollieBOFOLoggingIn) => { | ||
cy.session(MollieBOFOLoggingIn,() => { | ||
cy.visit('/admin1/') | ||
cy.url().should('contain', 'https').as('Check if HTTPS exists') | ||
cy.get('#email').type('[email protected]',{delay: 0, log: false}) | ||
cy.get('#passwd').type('demodemo',{delay: 0, log: false}) | ||
cy.get('#submit_login').click().wait(1000).as('Connection successsful') | ||
cy.visit('/en/my-account') | ||
cy.get('#login-form [name="email"]').eq(0).type('[email protected]') | ||
cy.get('#login-form [name="password"]').eq(0).type('demodemo') | ||
cy.get('#login-form [type="submit"]').eq(0).click({force:true}) | ||
cy.get('#history-link > .link-item').click() | ||
}) | ||
} | ||
//Checking the console for errors | ||
let windowConsoleError; | ||
Cypress.on('window:before:load', (win) => { | ||
|
@@ -70,7 +66,7 @@ describe('PS1784 Module initial configuration setup', () => { | |
}) | ||
it('C339305: 01 Connecting test API successsfully', () => { | ||
cy.visit('/admin1/') | ||
cy.OpenModuleDashboard() | ||
cy.OpeningModuleDashboardURL() | ||
cy.get('#MOLLIE_ACCOUNT_SWITCH_on').click({force:true}) | ||
cy.get('#MOLLIE_API_KEY_TEST').type((Cypress.env('MOLLIE_TEST_API_KEY')),{delay: 0, log: false}) | ||
cy.get('#module_form_submit_btn').click() | ||
|
@@ -83,11 +79,11 @@ it('C339338: 02 Enabling Mollie carriers in Prestashop successfully', () => { | |
}) | ||
it('C339339: 03 Checking the Advanced Settings tab, verifying the Front-end components, Saving the form, checking if there are no Errors in Console', () => { | ||
cy.visit('/admin1/') | ||
cy.OpenModuleDashboard() | ||
cy.OpeningModuleDashboardURL() | ||
cy.get('[href="#advanced_settings"]').click({force:true}) | ||
cy.get('[id="MOLLIE_PAYMENTSCREEN_LOCALE"]').should('be.visible') | ||
cy.get('[id="MOLLIE_SEND_ORDER_CONFIRMATION"]').should('be.visible') | ||
cy.get('[id="MOLLIE_KLARNA_INVOICE_ON"]').should('be.visible') | ||
cy.get('[id="MOLLIE_AUTHORIZABLE_PAYMENT_INVOICE_ON_STATUS"]').should('be.visible') | ||
cy.get('[class="help-block"]').should('be.visible') | ||
cy.get('[id="MOLLIE_STATUS_AWAITING"]').should('be.visible') | ||
cy.get('[id="MOLLIE_STATUS_PAID"]').should('be.visible') | ||
|
@@ -117,13 +113,13 @@ it('C339339: 03 Checking the Advanced Settings tab, verifying the Front-end comp | |
}); | ||
it('C688472 Checking the Subscriptions tab, and console errors', () => { | ||
cy.visit('/admin1/') | ||
cy.OpenModuleDashboard() | ||
cy.OpeningModuleDashboardURL() | ||
cy.get('#subtab-AdminMollieSubscriptionOrders').click() | ||
cy.get('[id="invertus_mollie_subscription_grid_panel"]').should('be.visible') | ||
}); | ||
it('C688473 Checking the Subscriptions FAQ, and console errors', () => { | ||
cy.visit('/admin1/') | ||
cy.OpenModuleDashboard() | ||
cy.OpeningModuleDashboardURL() | ||
cy.get('#subtab-AdminMollieSubscriptionFAQ').click() | ||
cy.get(':nth-child(2) > .col-lg-12 > .card').should('be.visible') | ||
cy.get(':nth-child(3) > .col-lg-12 > .card').should('be.visible') | ||
|
37 changes: 37 additions & 0 deletions
37
cypress/e2e/ps1784/02_mollie.ps1784.EnablingPaymentsOrdersAPI.specs.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/// <reference types="Cypress" /> | ||
//Caching the BO and FO session | ||
const login = (MollieBOFOLoggingIn) => { | ||
cy.session(MollieBOFOLoggingIn,() => { | ||
cy.visit('/admin1/') | ||
cy.url().should('contain', 'https').as('Check if HTTPS exists') | ||
cy.get('#email').type('[email protected]',{delay: 0, log: false}) | ||
cy.get('#passwd').type('demodemo',{delay: 0, log: false}) | ||
cy.get('#submit_login').click().wait(1000).as('Connection successsful') | ||
}) | ||
} | ||
//Checking the console for errors | ||
let windowConsoleError; | ||
Cypress.on('window:before:load', (win) => { | ||
windowConsoleError = cy.spy(win.console, 'error'); | ||
}) | ||
let failEarly = false; | ||
afterEach(() => { | ||
expect(windowConsoleError).to.not.be.called; | ||
if (failEarly) throw new Error("Failing Early due to an API or other module configuration problem. If running on CI, please check Cypress VIDEOS/SCREENSHOTS in the Artifacts for more details.") | ||
}) | ||
afterEach(function() { | ||
if (this.currentTest.state === "failed") failEarly = true | ||
}); | ||
describe('PS1784 Enabling Payments', () => { | ||
beforeEach(() => { | ||
cy.viewport(1920,1080) | ||
login('MollieBOFOLoggingIn') | ||
}) | ||
it('C339341: 04 Enabling All payments in Module BO [Orders API]', () => { | ||
cy.visit('/admin1/') | ||
cy.OpeningModuleDashboardURL() | ||
cy.ConfOrdersAPI1784() | ||
cy.get('[type="submit"]').first().click({force:true}) | ||
cy.get('[class="alert alert-success"]').should('be.visible') | ||
}) | ||
}) |
Oops, something went wrong.