-
Notifications
You must be signed in to change notification settings - Fork 45
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 #881 from mollie/develop-e2e-improvements
`develop` e2e improvements (testing the build)
- Loading branch information
Showing
22 changed files
with
2,883 additions
and
545 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,19 +1,5 @@ | ||
/// <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') | ||
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) => { | ||
|
@@ -30,7 +16,7 @@ afterEach(function() { | |
describe('PS1785 Module initial configuration setup', () => { | ||
beforeEach(() => { | ||
cy.viewport(1920,1080) | ||
login('MollieBOFOLoggingIn') | ||
cy.CachingBOFOPS1785() | ||
}) | ||
it('C339305: 01 Connecting test API successsfully', () => { | ||
cy.visit('/admin1/') | ||
|
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 |
---|---|---|
@@ -1,14 +1,5 @@ | ||
/// <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) => { | ||
|
@@ -25,7 +16,7 @@ afterEach(function() { | |
describe('PS1785 Enabling Payments', () => { | ||
beforeEach(() => { | ||
cy.viewport(1920,1080) | ||
login('MollieBOFOLoggingIn') | ||
cy.CachingBOFOPS1785() | ||
}) | ||
it('C339341: 04 Enabling All payments in Module BO [Orders API]', () => { | ||
cy.visit('/admin1/') | ||
|
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 |
---|---|---|
@@ -1,19 +1,5 @@ | ||
/// <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') | ||
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) => { | ||
|
@@ -28,8 +14,8 @@ describe('PS1785 Tests Suite [Orders API]', { | |
}, | ||
}, () => { | ||
beforeEach(() => { | ||
login('MollieBOFOLoggingIn') | ||
cy.viewport(1920,1080) | ||
cy.CachingBOFOPS1785() | ||
}) | ||
it.skip('C339342: 05 Vouchers Checkouting [Orders API]', () => { //possible bug | ||
cy.navigatingToThePayment() | ||
|
@@ -216,31 +202,6 @@ it('C339361: 24 Paypal Checkouting [Orders API]', () => { | |
it('C339362: 25 Paypal Order Shipping, Refunding [Orders API]', () => { | ||
cy.OrderRefundingShippingOrdersAPI() | ||
}) | ||
it('C339363: 26 SOFORT Checkouting [Orders API]', () => { | ||
cy.navigatingToThePayment() | ||
//Payment method choosing | ||
cy.contains('SOFORT').click({force:true}) | ||
cy.get('.condition-label > .js-terms').click({force:true}) | ||
cy.contains('Place order').click() | ||
cy.get('[value="paid"]').click() | ||
cy.get('[class="button form__button"]').click() | ||
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible') | ||
}); | ||
it('C339364: 27 SOFORT Order Shipping, Refunding [Orders API]', () => { | ||
cy.visit('/admin1/index.php?controller=AdminOrders') | ||
cy.get(':nth-child(1) > .column-payment').click() | ||
//Shipping button in React | ||
cy.get('.btn-group > .btn-primary').click() | ||
cy.get('[class="swal-button swal-button--confirm"]').click() | ||
cy.get('.swal-modal').should('exist') | ||
cy.get('#input-carrier').clear({force: true}).type('FedEx',{delay:0}) | ||
cy.get('#input-code').clear({force: true}).type('123456',{delay:0}) | ||
cy.get('#input-url').clear({force: true}).type('https://www.invertus.eu',{delay:0}) | ||
cy.get(':nth-child(2) > .swal-button').click() | ||
cy.get('#mollie_order > :nth-child(1) > .alert').contains('Shipment was made successfully!') | ||
cy.get('[class="alert alert-success"]').should('be.visible') | ||
//Refunding not possible because "We haven't received the payment on our bank accounts yet" message from Mollie Dashboard | ||
}) | ||
it('C339365: 28 Przelewy24 Checkouting [Orders API]', () => { | ||
cy.navigatingToThePayment() | ||
//Payment method choosing | ||
|
@@ -357,7 +318,7 @@ it('C1765085: Billie Checkouting [Orders API]', () => { | |
it('C1765086: Billie Order Shipping, Refunding [Orders API]', () => { | ||
cy.OrderShippingRefundingOrdersAPI() | ||
}) | ||
it.skip('C1860460: Pay with Klarna UK Checkouting [Orders API]', () => { // currently not supported for PS, skipping temporary | ||
it('C1860460: Pay with Klarna UK Checkouting [Orders API]', () => { | ||
cy.visit('/en/order-history') | ||
cy.contains('Reorder').click() | ||
cy.contains('UK').click({force:true}) | ||
|
@@ -372,7 +333,7 @@ it.skip('C1860460: Pay with Klarna UK Checkouting [Orders API]', () => { // curr | |
cy.get('[class="button form__button"]').click() | ||
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible') | ||
}); | ||
it.skip('C1860461: Pay with Klarna UK Order Shipping, Refunding [Orders API]', () => { // currently not supported for PS, skipping temporary | ||
it('C1860461: Pay with Klarna UK Order Shipping, Refunding [Orders API]', () => { // currently not supported for PS, skipping temporary | ||
cy.OrderShippingRefundingOrdersAPI() | ||
}) | ||
}) |
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 |
---|---|---|
@@ -1,14 +1,5 @@ | ||
/// <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) => { | ||
|
@@ -25,7 +16,7 @@ afterEach(function() { | |
describe('PS1785 Enabling Payments', () => { | ||
beforeEach(() => { | ||
cy.viewport(1920,1080) | ||
login('MollieBOFOLoggingIn') | ||
cy.CachingBOFOPS1785() | ||
}) | ||
it('C339377: 42 [SWITCH TO PAYMENTS API] Enabling All payments in Module BO [Payments API]', () => { | ||
cy.visit('/admin1/') | ||
|
Oops, something went wrong.