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 Alma payment adding #920

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions cypress/e2e/ps1785/03_mollie.ps1785.PaymentTestsOrdersAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,4 +365,22 @@ it('TWINT Checkouting [Orders API]', () => {
it('TWINT Order Shipping, Refunding [Orders API]', () => {
cy.OrderShippingRefundingOrdersAPI()
})
it('C3006826: Alma Checkouting [Orders API]', () => {
cy.visit('/en/order-history')
cy.contains('Reorder').click()
cy.contains('DE').click({force:true})
//Billing country LT, DE etc.
cy.get('.clearfix > .btn').click()
cy.get('#js-delivery > .continue').click()
//Payment method choosing
cy.contains('Alma').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('C3006827: Alma Order Shipping, Refunding [Orders API]', () => {
cy.OrderShippingRefundingOrdersAPI()
})
})
13 changes: 13 additions & 0 deletions cypress/e2e/ps1785/05_mollie.ps1785.PaymentTestsPaymentsAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,17 @@ it('TWINT Checkouting [Payments API]', () => {
it('TWINT Order Shipping, Refunding [Payments API]', () => {
cy.OrderRefundingPartialPaymentsAPI()
})
it('C3006827: Alma Checkouting [Payments API]', () => {
cy.navigatingToThePaymentPS8()
//Payment method choosing
cy.contains('Alma').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('C3006826: Alma BO Refunding, Partial Refunding [Payments API]', () => {
cy.OrderRefundingPartialPaymentsAPI()
})
})
4 changes: 2 additions & 2 deletions cypress/e2e/ps8/01_mollie.ps8.ModuleConfiguration.specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ it('C339305: Connecting test API successsfully', () => {
.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.wait(15000) // Waiting for validation to process until the end
// cy.iframe('[id^="uid_"]').find('button').click() // Cloudsync validation
// cy.wait(15000) // Waiting for validation to process until the end
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
18 changes: 18 additions & 0 deletions cypress/e2e/ps8/03_mollie.ps8.PaymentTestsOrdersAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,22 @@ it('C3006613: Bancomat Checkouting [Orders API]', () => {
it('C3006614: Bancomat Order Shipping, Refunding [Orders API]', () => {
cy.OrderShippingRefundingOrdersAPI()
})
it('C3006826: Alma Checkouting [Orders API]', () => {
cy.visit('/en/order-history')
cy.contains('Reorder').click()
cy.contains('DE').click({force:true})
//Billing country LT, DE etc.
cy.get('.clearfix > .btn').click()
cy.get('#js-delivery > .continue').click()
//Payment method choosing
cy.contains('Alma').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('C3006827: Alma Order Shipping, Refunding [Orders API]', () => {
cy.OrderShippingRefundingOrdersAPI()
})
})
13 changes: 13 additions & 0 deletions cypress/e2e/ps8/05_mollie.ps8.PaymentTestsPaymentsAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,17 @@ it('C3006615: Bancomat Checkouting [Payments API]', () => {
it('C3006616: Bancomat BO Refunding, Partial Refunding [Payments API]', () => {
cy.OrderRefundingPartialPaymentsAPI()
})
it('C3006826: Alma Checkouting [Payments API]', () => {
cy.navigatingToThePaymentPS8()
//Payment method choosing
cy.contains('Alma').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('C3006827: Alma BO Refunding, Partial Refunding [Payments API]', () => {
cy.OrderRefundingPartialPaymentsAPI()
})
})
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", "bancontact", "eps", "przelewy24", "kbc", "belfius", "voucher", "directdebit", "billie", "klarna", "twint", "blik", "bancomatpay"];
const paymentMethods = ["applepay", "ideal", "creditcard", "in3", "klarnapaylater", "klarnapaynow", "klarnasliceit", "paypal", "banktransfer", "bancontact", "eps", "przelewy24", "kbc", "belfius", "voucher", "directdebit", "billie", "klarna", "twint", "blik", "bancomatpay", "alma"];

// 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 = ["eps", "przelewy24", "kbc", "belfius", "bancontact", "creditcard", "ideal", "banktransfer", "paypal", "applepay", "twint", "blik", "bancomatpay"];
const paymentMethods = ["eps", "przelewy24", "kbc", "belfius", "bancontact", "creditcard", "ideal", "banktransfer", "paypal", "applepay", "twint", "blik", "bancomatpay", "alma"];

// Iterate through the paymentMethods array using forEach
paymentMethods.forEach(method => {
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 @@ -22,7 +22,7 @@
"devDependencies": {
"@cypress/vue": "^6.0.0",
"@frsource/cypress-plugin-visual-regression-diff": "^3.3.10",
"cypress": "^13.8.1",
"cypress": "^13.9.0",
"cypress-fail-fast": "^7.0.3",
"cypress-iframe": "^1.0.1",
"cypress-shadow-dom": "^1.4.1",
Expand Down
Loading