Skip to content

Commit

Permalink
Merge pull request #914 from mollie/e2e-improvements-april
Browse files Browse the repository at this point in the history
E2E improvements - April
  • Loading branch information
SimonasB88 authored Apr 17, 2024
2 parents 243afb2 + b9fbc47 commit e71a0ba
Show file tree
Hide file tree
Showing 9 changed files with 274 additions and 301 deletions.
33 changes: 2 additions & 31 deletions cypress/e2e/ps1785/01_mollie.ps1785.ModuleConfiguration.specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,9 @@ it('C339339: 03 Checking the Advanced Settings tab, verifying the Front-end comp
cy.visit('/admin1/')
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_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')
cy.get('[name="MOLLIE_MAIL_WHEN_PAID"]').should('exist')
cy.get('[name="MOLLIE_MAIL_WHEN_COMPLETED"]').should('exist')
cy.get('[name="MOLLIE_STATUS_COMPLETED"]').should('exist')
cy.get('[name="MOLLIE_MAIL_WHEN_CANCELED"]').should('exist')
cy.get('[name="MOLLIE_STATUS_CANCELED"]').should('exist')
cy.get('[name="MOLLIE_MAIL_WHEN_EXPIRED"]').should('exist')
cy.get('[name="MOLLIE_STATUS_EXPIRED"]').should('exist')
cy.get('[name="MOLLIE_MAIL_WHEN_REFUNDED"]').should('exist')
cy.get('[name="MOLLIE_STATUS_REFUNDED"]').should('exist')
cy.get('[name="MOLLIE_STATUS_OPEN"]').should('exist')
cy.get('[name="MOLLIE_MAIL_WHEN_SHIPPING"]').should('exist')
cy.get('[name="MOLLIE_STATUS_SHIPPING"]').should('exist')
cy.get('[name="MOLLIE_STATUS_PARTIAL_REFUND"]').should('exist')
cy.get('[name="MOLLIE_IMAGES"]').should('exist')
cy.get('[name="MOLLIE_CSS"]').should('exist')
cy.get('[id="MOLLIE_TRACKING_URLS__container"]').should('exist')
cy.get('[id="MOLLIE_AS_MAIN_info"]').should('exist')
cy.get('[id="MOLLIE_AS_STATUSES_info"]').should('exist')
cy.get('[name="MOLLIE_DISPLAY_ERRORS"]').should('exist')
cy.get('[name="MOLLIE_DEBUG_LOG"]').should('exist')
cy.advancedSettingsValidation()
cy.reload()
cy.matchImage(); // let's make a snapshot for visual regression testing later, if UI matches
//cy.window() will check if there are no Errors in console
});
it('C688472: Checking the Subscriptions tab, and console errors', () => {
cy.visit('/admin1/')
Expand All @@ -84,10 +58,7 @@ it('C688473: Checking the Subscriptions FAQ, and console errors', () => {
cy.visit('/admin1/')
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')
cy.get(':nth-child(4) > .col-lg-12 > .card').should('be.visible')
cy.get(':nth-child(5) > .col-lg-12 > .card').should('be.visible')
cy.subscriptionsUiCheck()
cy.matchImage(); // let's make a snapshot for visual regression testing later, if UI matches
});
})
64 changes: 32 additions & 32 deletions cypress/e2e/ps1785/03_mollie.ps1785.PaymentTestsOrdersAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,43 +338,43 @@ it('C1860461: Pay with Klarna UK Order Shipping, Refunding [Orders API]', () =>
})
// 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')
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()
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')
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()
cy.OrderShippingRefundingOrdersAPI()
})
})
72 changes: 36 additions & 36 deletions cypress/e2e/ps1785/05_mollie.ps1785.PaymentTestsPaymentsAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ describe('PS1785 Tests Suite [Payments API]', {
},
}, () => {
beforeEach(() => {
cy.viewport(1920,1080)
cy.CachingBOFOPS1785()
cy.viewport(1920,1080)
cy.CachingBOFOPS1785()
})
it('C339378: 43 Check if Bancontact QR payment dropdown exists [Payments API]', () => {
cy.visit('/admin1/')
cy.OpeningModuleDashboardURL()
cy.get('[name="MOLLIE_BANCONTACT_QR_CODE_ENABLED"]').should('exist')
cy.visit('/admin1/')
cy.OpeningModuleDashboardURL()
cy.get('[name="MOLLIE_BANCONTACT_QR_CODE_ENABLED"]').should('exist')
})
it('C339379: 44 Bancontact Checkouting [Payments API]', () => {
cy.navigatingToThePayment()
Expand Down Expand Up @@ -253,42 +253,42 @@ it('C339402: 67 Bank Transfer BO Refunding, Partial Refunding [Payments API]', (
});
// 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')
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()
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')
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()
cy.OrderRefundingPartialPaymentsAPI()
})
})
47 changes: 5 additions & 42 deletions cypress/e2e/ps8/01_mollie.ps8.ModuleConfiguration.specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,59 +41,22 @@ it('C339338: Enabling Mollie carriers in Prestashop successfully', () => {
cy.get('[id="form-carrier-restrictions-save-button"]').click()
})
it('C339339: 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.get('.mi-mollie').click({fore:true})
cy.get('#subtab-AdminMollieModule').click()
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_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')
cy.get('[name="MOLLIE_MAIL_WHEN_PAID"]').should('exist')
cy.get('[name="MOLLIE_MAIL_WHEN_COMPLETED"]').should('exist')
cy.get('[name="MOLLIE_STATUS_COMPLETED"]').should('exist')
cy.get('[name="MOLLIE_MAIL_WHEN_CANCELED"]').should('exist')
cy.get('[name="MOLLIE_STATUS_CANCELED"]').should('exist')
cy.get('[name="MOLLIE_MAIL_WHEN_EXPIRED"]').should('exist')
cy.get('[name="MOLLIE_STATUS_EXPIRED"]').should('exist')
cy.get('[name="MOLLIE_MAIL_WHEN_REFUNDED"]').should('exist')
cy.get('[name="MOLLIE_STATUS_REFUNDED"]').should('exist')
cy.get('[name="MOLLIE_STATUS_OPEN"]').should('exist')
cy.get('[name="MOLLIE_MAIL_WHEN_SHIPPING"]').should('exist')
cy.get('[name="MOLLIE_STATUS_SHIPPING"]').should('exist')
cy.get('[name="MOLLIE_STATUS_PARTIAL_REFUND"]').should('exist')
cy.get('[name="MOLLIE_IMAGES"]').should('exist')
cy.get('[name="MOLLIE_CSS"]').should('exist')
cy.get('[id="MOLLIE_TRACKING_URLS__container"]').should('exist')
cy.get('[id="MOLLIE_AS_MAIN_info"]').should('exist')
cy.get('[id="MOLLIE_AS_STATUSES_info"]').should('exist')
cy.get('[name="MOLLIE_DISPLAY_ERRORS"]').should('exist')
cy.get('[name="MOLLIE_DEBUG_LOG"]').should('exist')
cy.get('#module_form_submit_btn').click({force:true}) //checking the saving
cy.get('[class="alert alert-success"]').should('be.visible') //checking if saving returns green alert
cy.advancedSettingsValidation()
cy.reload()
cy.matchImage(); // let's make a snapshot for visual regression testing later, if UI matches
//cy.window() will check if there are no Errors in console
});
it('C688472: Checking the Subscriptions tab, and console errors', () => {
cy.visit('/admin1/')
cy.get('.mi-mollie').click({fore:true})
cy.get('#subtab-AdminMollieModule').click()
cy.OpeningModuleDashboardURL()
cy.get('#subtab-AdminMollieSubscriptionOrders').click()
cy.get('[id="invertus_mollie_subscription_grid_panel"]').should('be.visible')
cy.selectSubscriptionsCarriersCheck() // checking the Subscriptions carriers select and saving
});
it('C688473: Checking the Subscriptions FAQ, and console errors', () => {
cy.visit('/admin1/')
cy.get('.mi-mollie').click({fore:true})
cy.get('#subtab-AdminMollieModule').click()
cy.OpeningModuleDashboardURL()
cy.get('#subtab-AdminMollieSubscriptionFAQ').click()
cy.get(':nth-child(3) > .col-lg-12 > .card').should('be.visible')
cy.get(':nth-child(4) > .col-lg-12 > .card').should('be.visible')
cy.get(':nth-child(5) > .col-lg-12 > .card').should('be.visible')
cy.get(':nth-child(6) > .col-lg-12 > .card').should('be.visible')
cy.subscriptionsUiCheck()
cy.matchImage(); // let's make a snapshot for visual regression testing later, if UI matches
});
})
27 changes: 14 additions & 13 deletions cypress/e2e/ps8/03_mollie.ps8.PaymentTestsOrdersAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,20 +308,21 @@ it('C1765086: Billie Order Shipping, Refunding [Orders API]', () => {
cy.OrderShippingRefundingOrdersAPI()
})
it('C1860460: Pay with Klarna UK Checkouting [Orders API]', () => {
cy.visit('/en/order-history')
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('Pay with Klarna').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')
cy.visit('/en/order-history')
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('Pay with Klarna').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('C1860461: Pay with Klarna UK Order Shipping, Refunding [Orders API]', () => {
cy.OrderShippingRefundingOrdersAPI()
})
})
10 changes: 5 additions & 5 deletions cypress/e2e/ps8/05_mollie.ps8.PaymentTestsPaymentsAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ describe('PS8 Tests Suite [Payments API]', {
},
}, () => {
beforeEach(() => {
cy.viewport(1920,1080)
cy.CachingBOFOPS8()
cy.viewport(1920,1080)
cy.CachingBOFOPS8()
})
it('C339378: 43 Check if Bancontact QR payment dropdown exists [Payments API]', () => {
cy.visit('/admin1/')
cy.OpeningModuleDashboardURL()
cy.get('[name="MOLLIE_BANCONTACT_QR_CODE_ENABLED"]').should('exist')
cy.visit('/admin1/')
cy.OpeningModuleDashboardURL()
cy.get('[name="MOLLIE_BANCONTACT_QR_CODE_ENABLED"]').should('exist')
})
it('C339379: 44 Bancontact Checkouting [Payments API]', () => {
cy.navigatingToThePaymentPS8()
Expand Down
Loading

0 comments on commit e71a0ba

Please sign in to comment.