Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E updates march-april #891

Closed
wants to merge 13 commits into from
2 changes: 1 addition & 1 deletion .docker/Dockerfile.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM prestashop/prestashop:8.1.3-apache
FROM prestashop/prestashop:8.1.5-apache

RUN cd /usr/local/etc/php/conf.d/ && \
echo 'memory_limit = 4096M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/E2E_On_PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
subdomain: 'demoshop1785'
port: '8002'
yml: 'docker-compose.1785.yml'
url: 'https://demoshop1785.ngrok.io'
url: 'https://demoshop1785debug.ngrok.io'
test_spec: '**/cypress/e2e/ps1785/**'
TestRailID: R4954
- prestashop: 'PS8'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ describe('PS1785 Module initial configuration setup', () => {
it('C339305: 01 Connecting test API successsfully', () => {
cy.visit('/admin1/')
cy.OpeningModuleDashboardURL()
cy.get('body')
.invoke('text').should('contain','Mollie')
.then((text) => {
cy.log(text) // Showing and asserting the text that loaded, to ensure the BO is loaded, not crashed with PHP fatals etc.
})
cy.iframe('[id^="uid_"]').find('button').click() // Cloudsync validation
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()
Expand Down
43 changes: 42 additions & 1 deletion cypress/e2e/ps1785/03_mollie.ps1785.PaymentTestsOrdersAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,48 @@ it('C1860460: Pay with Klarna UK Checkouting [Orders API]', () => {
cy.get('[class="button form__button"]').click()
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
});
it('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]', () => {
cy.OrderShippingRefundingOrdersAPI()
})
// TODO - some reported possible bugs in the workflow, but still continuing on completing the tests...
it.only('Blik Checkouting [Orders API]', () => {
cy.visit('/en/order-history')
// switching the currency
cy.pause()
cy.contains('Reorder').click()
cy.contains('UK').click({force:true})
//Billing country LT, DE etc.
cy.get('.clearfix > .btn').click()
cy.get('#js-delivery > .continue').click()
//Payment method choosing
cy.contains('Blik').click({force:true})
cy.get('.condition-label > .js-terms').click({force:true})
cy.contains('Place order').click()
cy.get('[value="authorized"]').click()
cy.get('[class="button form__button"]').click()
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
});
it.only('Blik Order Shipping, Refunding [Orders API]', () => {
cy.OrderShippingRefundingOrdersAPI()
})
it('TWINT Checkouting [Orders API]', () => {
cy.visit('/en/order-history')
// switching the currency
cy.pause()
cy.contains('Reorder').click()
cy.contains('UK').click({force:true})
//Billing country LT, DE etc.
cy.get('.clearfix > .btn').click()
cy.get('#js-delivery > .continue').click()
//Payment method choosing
cy.contains('TWINT').click({force:true})
cy.get('.condition-label > .js-terms').click({force:true})
cy.contains('Place order').click()
cy.get('[value="authorized"]').click()
cy.get('[class="button form__button"]').click()
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
});
it('TWINT Order Shipping, Refunding [Orders API]', () => {
cy.OrderShippingRefundingOrdersAPI()
})
})
40 changes: 40 additions & 0 deletions cypress/e2e/ps1785/05_mollie.ps1785.PaymentTestsPaymentsAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,44 @@ it.skip('C1860462: Pay with Klarna UK Checkouting [Payments API]', () => { // TO
it.skip('C1860463: Pay with Klarna UK Order BO Refunding, Partial Refunding [Payments API]', () => { // TODO - temporary skip, issue, Orders API is available to Order
cy.OrderRefundingPartialPaymentsAPI()
})
// TODO - some reported possible bugs in the workflow, but still continuing on completing the tests...
it.only('Blik Checkouting [Payments API]', () => {
cy.visit('/en/order-history')
// switching the currency
cy.pause()
cy.contains('UK').click({force:true})
//Billing country LT, DE etc.
cy.get('.clearfix > .btn').click()
cy.get('#js-delivery > .continue').click()
//Payment method choosing
cy.contains('Blik').click({force:true})
cy.get('.condition-label > .js-terms').click({force:true})
cy.contains('Place order').click()
cy.get('[value="authorized"]').click()
cy.get('[class="button form__button"]').click()
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
});
it.only('Blik Order Shipping, Refunding [Payments API]', () => {
cy.OrderRefundingPartialPaymentsAPI()
})
it('TWINT Checkouting [Payments API]', () => {
cy.visit('/en/order-history')
// switching the currency
cy.pause()
cy.contains('Reorder').click()
cy.contains('UK').click({force:true})
//Billing country LT, DE etc.
cy.get('.clearfix > .btn').click()
cy.get('#js-delivery > .continue').click()
//Payment method choosing
cy.contains('TWINT').click({force:true})
cy.get('.condition-label > .js-terms').click({force:true})
cy.contains('Place order').click()
cy.get('[value="authorized"]').click()
cy.get('[class="button form__button"]').click()
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
});
it('TWINT Order Shipping, Refunding [Payments API]', () => {
cy.OrderRefundingPartialPaymentsAPI()
})
})
6 changes: 6 additions & 0 deletions cypress/e2e/ps8/01_mollie.ps8.ModuleConfiguration.specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ it('C339305: Connecting test API successsfully', () => {
cy.visit('/admin1/')
cy.get('.mi-mollie').click({fore:true})
cy.get('#subtab-AdminMollieModule').click()
cy.get('body')
.invoke('text').should('contain','Mollie')
.then((text) => {
cy.log(text) // Showing and asserting the text that loaded, to ensure the BO is loaded, not crashed with PHP fatals etc.
})
cy.iframe('[id^="uid_"]').find('button').click() // Cloudsync validation
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()
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import 'cypress-iframe';
// Cypress.Commands.add("login", (email, password) => { ... })
Cypress.Commands.add("ConfOrdersAPI1784", () => {

const paymentMethods = ["applepay", "ideal", "creditcard", "in3", "klarnapaylater", "klarnapaynow", "klarnasliceit", "paypal", "banktransfer", "giftcard", "bancontact", "eps", "giropay", "przelewy24", "kbc", "belfius", "voucher", "directdebit", "billie", "klarna", "twint"];
const paymentMethods = ["applepay", "ideal", "creditcard", "in3", "klarnapaylater", "klarnapaynow", "klarnasliceit", "paypal", "banktransfer", "giftcard", "bancontact", "eps", "giropay", "przelewy24", "kbc", "belfius", "voucher", "directdebit", "billie", "klarna", "twint", "blik"];

// Iterate through the paymentMethods array using forEach
paymentMethods.forEach(method => {
Expand All @@ -59,7 +59,7 @@ Cypress.Commands.add("ConfOrdersAPI1784", () => {
})
Cypress.Commands.add("ConfPaymentsAPI1784", () => {

const paymentMethods = ["giropay", "eps", "przelewy24", "kbc", "belfius", "bancontact", "creditcard", "ideal", "banktransfer", "paypal", "applepay"];
const paymentMethods = ["giropay", "eps", "przelewy24", "kbc", "belfius", "bancontact", "creditcard", "ideal", "banktransfer", "paypal", "applepay", "twint", "blik"];

// Iterate through the paymentMethods array using forEach
paymentMethods.forEach(method => {
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.1785.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
DB_PASSWD: $DB_PASSWD
DB_NAME: prestashop
DB_SERVER: mysql
PS_DOMAIN: demoshop1785.ngrok.io
PS_DOMAIN: demoshop1785debug.ngrok.io
PS_FOLDER_INSTALL: install
PS_FOLDER_ADMIN: admin1
depends_on:
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"homepage": "https://github.com/mollie/PrestaShop#readme",
"devDependencies": {
"@frsource/cypress-plugin-visual-regression-diff": "^3.3.10",
"cypress": "^13.6.6",
"cypress": "^13.7.1",
"cypress-fail-fast": "^7.0.3",
"cypress-iframe": "^1.0.1",
"cypress-terminal-report": "^5.3.3",
Expand Down
Loading
Loading