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 improvements - April #914

Merged
merged 6 commits into from
Apr 17, 2024
Merged
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
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
Loading