From 9eb2e0366f0ab055c97f4c6584b283771cefa66b Mon Sep 17 00:00:00 2001 From: SimonasB88 Date: Mon, 15 Apr 2024 11:11:09 +0300 Subject: [PATCH 1/6] temporary debug mode --- .github/workflows/E2E_On_PR.yml | 2 +- docker-compose.8.yml | 2 +- tests/seed/database/prestashop_8.sql | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/E2E_On_PR.yml b/.github/workflows/E2E_On_PR.yml index 119cf4207..b27674114 100755 --- a/.github/workflows/E2E_On_PR.yml +++ b/.github/workflows/E2E_On_PR.yml @@ -29,7 +29,7 @@ jobs: subdomain: 'demoshop8' port: '8002' yml: 'docker-compose.8.yml' - url: 'https://demoshop8.ngrok.io' + url: 'https://demoshop8debug.ngrok.io' test_spec: '**/cypress/e2e/ps8/**' TestRailID: R6470 env: diff --git a/docker-compose.8.yml b/docker-compose.8.yml index 8aef67ee9..b724e53b3 100755 --- a/docker-compose.8.yml +++ b/docker-compose.8.yml @@ -29,7 +29,7 @@ services: DB_PASSWD: $DB_PASSWD DB_NAME: prestashop DB_SERVER: mysql - PS_DOMAIN: demoshop8.ngrok.io + PS_DOMAIN: demoshop8debug.ngrok.io PS_FOLDER_INSTALL: install PS_FOLDER_ADMIN: admin1 depends_on: diff --git a/tests/seed/database/prestashop_8.sql b/tests/seed/database/prestashop_8.sql index 22e1c4b0f..d3a65cbe1 100644 --- a/tests/seed/database/prestashop_8.sql +++ b/tests/seed/database/prestashop_8.sql @@ -3267,8 +3267,8 @@ INSERT INTO `ps_configuration` (`id_configuration`, `id_shop_group`, `id_shop`, (231, NULL, NULL, 'HOMESLIDER_PAUSE', '7700', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (232, NULL, NULL, 'HOMESLIDER_LOOP', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (233, NULL, NULL, 'PS_BASE_DISTANCE_UNIT', 'm', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), -(234, NULL, NULL, 'PS_SHOP_DOMAIN', 'demoshop8.ngrok.io', '0000-00-00 00:00:00', '2024-02-05 10:58:30'), -(235, NULL, NULL, 'PS_SHOP_DOMAIN_SSL', 'demoshop8.ngrok.io', '0000-00-00 00:00:00', '2024-02-05 10:58:30'), +(234, NULL, NULL, 'PS_SHOP_DOMAIN', 'demoshop8debug.ngrok.io', '0000-00-00 00:00:00', '2024-02-05 10:58:30'), +(235, NULL, NULL, 'PS_SHOP_DOMAIN_SSL', 'demoshop8debug.ngrok.io', '0000-00-00 00:00:00', '2024-02-05 10:58:30'), (236, NULL, NULL, 'PS_SHOP_NAME', 'PrestaShop', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (237, NULL, NULL, 'PS_SHOP_EMAIL', 'demo@prestashop.com', '0000-00-00 00:00:00', '2024-02-05 10:58:31'), (238, NULL, NULL, 'PS_MAIL_METHOD', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), @@ -3707,11 +3707,11 @@ CREATE TABLE `ps_connections_source` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `ps_connections_source` (`id_connections_source`, `id_connections`, `http_referer`, `request_uri`, `keywords`, `date_add`) VALUES -(1, 2, '', 'demoshop8.ngrok.io/', '', '2024-02-05 11:01:25'), -(2, 3, '', 'demoshop8.ngrok.io/', '', '2024-02-05 11:01:31'), -(3, 5, '', 'demoshop8.ngrok.io/de/module/mollie/webhook', '', '2024-03-04 16:08:24'), -(4, 6, '', 'demoshop8.ngrok.io/de/module/mollie/webhook', '', '2024-03-04 16:10:22'), -(5, 9, '', 'demoshop8.ngrok.io/en/', '', '2024-04-08 17:54:05'); +(1, 2, '', 'demoshop8debug.ngrok.io/', '', '2024-02-05 11:01:25'), +(2, 3, '', 'demoshop8debug.ngrok.io/', '', '2024-02-05 11:01:31'), +(3, 5, '', 'demoshop8debug.ngrok.io/de/module/mollie/webhook', '', '2024-03-04 16:08:24'), +(4, 6, '', 'demoshop8debug.ngrok.io/de/module/mollie/webhook', '', '2024-03-04 16:10:22'), +(5, 9, '', 'demoshop8debug.ngrok.io/en/', '', '2024-04-08 17:54:05'); DROP TABLE IF EXISTS `ps_contact`; CREATE TABLE `ps_contact` ( @@ -15070,7 +15070,7 @@ CREATE TABLE `ps_shop_url` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `ps_shop_url` (`id_shop_url`, `id_shop`, `domain`, `domain_ssl`, `physical_uri`, `virtual_uri`, `main`, `active`) VALUES -(1, 1, 'demoshop8.ngrok.io', 'demoshop8.ngrok.io', '/', '', 1, 1); +(1, 1, 'demoshop8debug.ngrok.io', 'demoshop8debug.ngrok.io', '/', '', 1, 1); DROP TABLE IF EXISTS `ps_smarty_cache`; CREATE TABLE `ps_smarty_cache` ( From 811e017ab51d01ca8c1eb71cd174037b2b60f2f6 Mon Sep 17 00:00:00 2001 From: SimonasB88 Date: Mon, 15 Apr 2024 12:58:44 +0300 Subject: [PATCH 2/6] cypress update --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index aa87ce858..cdaa595ef 100755 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "devDependencies": { "@cypress/vue": "^6.0.0", "@frsource/cypress-plugin-visual-regression-diff": "^3.3.10", - "cypress": "^13.7.2", + "cypress": "^13.7.3", "cypress-fail-fast": "^7.0.3", "cypress-iframe": "^1.0.1", "cypress-shadow-dom": "^1.4.1", @@ -984,9 +984,9 @@ "peer": true }, "node_modules/cypress": { - "version": "13.7.2", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.7.2.tgz", - "integrity": "sha512-FF5hFI5wlRIHY8urLZjJjj/YvfCBrRpglbZCLr/cYcL9MdDe0+5usa8kTIrDHthlEc9lwihbkb5dmwqBDNS2yw==", + "version": "13.7.3", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.7.3.tgz", + "integrity": "sha512-uoecY6FTCAuIEqLUYkTrxamDBjMHTYak/1O7jtgwboHiTnS1NaMOoR08KcTrbRZFCBvYOiS4tEkQRmsV+xcrag==", "dev": true, "hasInstallScript": true, "dependencies": { diff --git a/package.json b/package.json index cc6fd5ad6..873153d1f 100755 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "devDependencies": { "@cypress/vue": "^6.0.0", "@frsource/cypress-plugin-visual-regression-diff": "^3.3.10", - "cypress": "^13.7.2", + "cypress": "^13.7.3", "cypress-fail-fast": "^7.0.3", "cypress-iframe": "^1.0.1", "cypress-shadow-dom": "^1.4.1", From f279cb54459d6437b1eaae671d793a24d955ac54 Mon Sep 17 00:00:00 2001 From: SimonasB88 Date: Mon, 15 Apr 2024 17:44:11 +0300 Subject: [PATCH 3/6] little test code refactoring --- ...mollie.ps1785.ModuleConfiguration.specs.js | 33 +------------ ...01_mollie.ps8.ModuleConfiguration.specs.js | 47 ++----------------- cypress/support/commands.js | 38 +++++++++++++++ 3 files changed, 45 insertions(+), 73 deletions(-) diff --git a/cypress/e2e/ps1785/01_mollie.ps1785.ModuleConfiguration.specs.js b/cypress/e2e/ps1785/01_mollie.ps1785.ModuleConfiguration.specs.js index 82dcb99f9..13c32c3a3 100755 --- a/cypress/e2e/ps1785/01_mollie.ps1785.ModuleConfiguration.specs.js +++ b/cypress/e2e/ps1785/01_mollie.ps1785.ModuleConfiguration.specs.js @@ -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/') @@ -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 }); }) diff --git a/cypress/e2e/ps8/01_mollie.ps8.ModuleConfiguration.specs.js b/cypress/e2e/ps8/01_mollie.ps8.ModuleConfiguration.specs.js index ed7d665e7..97238d31e 100755 --- a/cypress/e2e/ps8/01_mollie.ps8.ModuleConfiguration.specs.js +++ b/cypress/e2e/ps8/01_mollie.ps8.ModuleConfiguration.specs.js @@ -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 }); }) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index b135354a7..238acecac 100755 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -266,3 +266,41 @@ Cypress.Commands.add("PsAccountsUI", {cacheAcrossSpecs: true}, () => { cy.wrap(popupDocument).find('body') }); }) +Cypress.Commands.add("advancedSettingsValidation", () => { + 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 +}) +Cypress.Commands.add("subscriptionsUiCheck", {cacheAcrossSpecs: true}, () => { + cy.contains('Subscription creation').should('be.visible') + cy.contains('IMPORTANT points').should('be.visible') + cy.contains('IMPORTANT subscription carrier points').should('be.visible') + cy.contains('Cart rules').should('be.visible') + cy.contains('Gift wrapping').should('be.visible') + cy.contains('Recurring order creation').should('be.visible') +}) From 652933ef79f08f6635cfe908d3a3919a20557933 Mon Sep 17 00:00:00 2001 From: SimonasB88 Date: Mon, 15 Apr 2024 17:54:09 +0300 Subject: [PATCH 4/6] small code corrections --- .../03_mollie.ps1785.PaymentTestsOrdersAPI.js | 64 ++++++++--------- ...5_mollie.ps1785.PaymentTestsPaymentsAPI.js | 72 +++++++++---------- .../03_mollie.ps8.PaymentTestsOrdersAPI.js | 27 +++---- .../05_mollie.ps8.PaymentTestsPaymentsAPI.js | 10 +-- 4 files changed, 87 insertions(+), 86 deletions(-) diff --git a/cypress/e2e/ps1785/03_mollie.ps1785.PaymentTestsOrdersAPI.js b/cypress/e2e/ps1785/03_mollie.ps1785.PaymentTestsOrdersAPI.js index abdf113d6..9f28a15a3 100755 --- a/cypress/e2e/ps1785/03_mollie.ps1785.PaymentTestsOrdersAPI.js +++ b/cypress/e2e/ps1785/03_mollie.ps1785.PaymentTestsOrdersAPI.js @@ -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() }) }) diff --git a/cypress/e2e/ps1785/05_mollie.ps1785.PaymentTestsPaymentsAPI.js b/cypress/e2e/ps1785/05_mollie.ps1785.PaymentTestsPaymentsAPI.js index 2e2c7d7e0..faffc9163 100755 --- a/cypress/e2e/ps1785/05_mollie.ps1785.PaymentTestsPaymentsAPI.js +++ b/cypress/e2e/ps1785/05_mollie.ps1785.PaymentTestsPaymentsAPI.js @@ -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() @@ -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() }) }) diff --git a/cypress/e2e/ps8/03_mollie.ps8.PaymentTestsOrdersAPI.js b/cypress/e2e/ps8/03_mollie.ps8.PaymentTestsOrdersAPI.js index b3edf7ab5..529e4ba30 100755 --- a/cypress/e2e/ps8/03_mollie.ps8.PaymentTestsOrdersAPI.js +++ b/cypress/e2e/ps8/03_mollie.ps8.PaymentTestsOrdersAPI.js @@ -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() }) }) diff --git a/cypress/e2e/ps8/05_mollie.ps8.PaymentTestsPaymentsAPI.js b/cypress/e2e/ps8/05_mollie.ps8.PaymentTestsPaymentsAPI.js index e1b110ae2..d37178d39 100755 --- a/cypress/e2e/ps8/05_mollie.ps8.PaymentTestsPaymentsAPI.js +++ b/cypress/e2e/ps8/05_mollie.ps8.PaymentTestsPaymentsAPI.js @@ -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() From 8eddf119538793e623fc2ee645111bb82cbdd4b2 Mon Sep 17 00:00:00 2001 From: SimonasB88 Date: Wed, 17 Apr 2024 14:34:50 +0300 Subject: [PATCH 5/6] small commands.js additions --- cypress/support/commands.js | 274 ++++++++++++++++++------------------ 1 file changed, 137 insertions(+), 137 deletions(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 238acecac..6f976a0ba 100755 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -42,30 +42,30 @@ 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", "blik"]; + const paymentMethods = ["applepay", "ideal", "creditcard", "in3", "klarnapaylater", "klarnapaynow", "klarnasliceit", "paypal", "banktransfer", "bancontact", "eps", "giropay", "przelewy24", "kbc", "belfius", "voucher", "directdebit", "billie", "klarna", "twint", "blik"]; - // Iterate through the paymentMethods array using forEach - paymentMethods.forEach(method => { - cy.get(`[name="MOLLIE_METHOD_ENABLED_${method}"]`).select('Yes', { force: true }); - cy.get(`[name="MOLLIE_METHOD_API_${method}"]`).select('Orders API', { force: true }); - cy.get(`[name="MOLLIE_METHOD_DESCRIPTION_${method}"]`).clear({ force: true }).type('text 123 !@#$%^&*', { force: true }); - cy.get(`[name="MOLLIE_METHOD_SURCHARGE_TYPE_${method}"]`).select('3', { force: true }); - cy.get(`[name="MOLLIE_METHOD_SURCHARGE_FIXED_AMOUNT_TAX_INCL_${method}"]`).clear({ force: true }).type('4', { force: true }); - cy.get(`[name="MOLLIE_METHOD_SURCHARGE_FIXED_AMOUNT_TAX_EXCL_${method}"]`).clear({ force: true }).type('5', { force: true }); - cy.get(`[name="MOLLIE_METHOD_TAX_RULES_GROUP_ID_${method}"]`).select('1', { force: true }); - cy.get(`[name="MOLLIE_METHOD_SURCHARGE_PERCENTAGE_${method}"]`).clear({ force: true }).type('22', { force: true }); - cy.get(`[name="MOLLIE_METHOD_SURCHARGE_LIMIT_${method}"]`).clear({ force: true }).type('33', { force: true }); - }); + // Iterate through the paymentMethods array using forEach + paymentMethods.forEach(method => { + cy.get(`[name="MOLLIE_METHOD_ENABLED_${method}"]`).select('Yes', { force: true }); + cy.get(`[name="MOLLIE_METHOD_API_${method}"]`).select('Orders API', { force: true }); + cy.get(`[name="MOLLIE_METHOD_DESCRIPTION_${method}"]`).clear({ force: true }).type('text 123 !@#$%^&*', { force: true }); + cy.get(`[name="MOLLIE_METHOD_SURCHARGE_TYPE_${method}"]`).select('3', { force: true }); + cy.get(`[name="MOLLIE_METHOD_SURCHARGE_FIXED_AMOUNT_TAX_INCL_${method}"]`).clear({ force: true }).type('4', { force: true }); + cy.get(`[name="MOLLIE_METHOD_SURCHARGE_FIXED_AMOUNT_TAX_EXCL_${method}"]`).clear({ force: true }).type('5', { force: true }); + cy.get(`[name="MOLLIE_METHOD_TAX_RULES_GROUP_ID_${method}"]`).select('1', { force: true }); + cy.get(`[name="MOLLIE_METHOD_SURCHARGE_PERCENTAGE_${method}"]`).clear({ force: true }).type('22', { force: true }); + cy.get(`[name="MOLLIE_METHOD_SURCHARGE_LIMIT_${method}"]`).clear({ force: true }).type('33', { force: true }); + }); }) Cypress.Commands.add("ConfPaymentsAPI1784", () => { - const paymentMethods = ["giropay", "eps", "przelewy24", "kbc", "belfius", "bancontact", "creditcard", "ideal", "banktransfer", "paypal", "applepay", "twint", "blik"]; + 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 => { - cy.get(`[name="MOLLIE_METHOD_ENABLED_${method}"]`).select('Yes', {force: true}) - cy.get(`[name="MOLLIE_METHOD_API_${method}"]`).select('Payments API', {force: true}) - }); + // Iterate through the paymentMethods array using forEach + paymentMethods.forEach(method => { + cy.get(`[name="MOLLIE_METHOD_ENABLED_${method}"]`).select('Yes', {force: true}) + cy.get(`[name="MOLLIE_METHOD_API_${method}"]`).select('Payments API', {force: true}) + }); }) Cypress.Commands.add("navigatingToThePaymentPS8", () => { cy.visit('/de/index.php?controller=history') @@ -76,100 +76,100 @@ Cypress.Commands.add("navigatingToThePaymentPS8", () => { cy.get('#js-delivery > .continue').click() }) Cypress.Commands.add("navigatingToThePayment", () => { - cy.visit('/de/index.php?controller=history') - cy.contains('Reorder').click() - cy.contains('NL').click() - //Billing country LT, DE etc. - cy.get('.clearfix > .btn').click() - cy.get('#js-delivery > .continue').click() + cy.visit('/de/index.php?controller=history') + cy.contains('Reorder').click() + cy.contains('NL').click() + //Billing country LT, DE etc. + cy.get('.clearfix > .btn').click() + cy.get('#js-delivery > .continue').click() }) Cypress.Commands.add("OrderRefundingShippingOrdersAPI", () => { cy.visit('/admin1/index.php?controller=AdminOrders') cy.get(':nth-child(1) > .column-payment').click() cy.scrollTo('bottom') // Refunding dropdown in React - cy.get('.btn-group-action > .btn-group > .dropdown-toggle').eq(0).click() - cy.get('[role="button"]').eq(2).click() - cy.get('[class="swal-button swal-button--confirm"]').click() - cy.get('[class="alert alert-success"]').should('be.visible') - //Shipping button in React - cy.get('.btn-group > [title=""]').eq(0).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') - // Add more actions as needed + cy.get('.btn-group-action > .btn-group > .dropdown-toggle').eq(0).click() + cy.get('[role="button"]').eq(2).click() + cy.get('[class="swal-button swal-button--confirm"]').click() + cy.get('[class="alert alert-success"]').should('be.visible') + //Shipping button in React + cy.get('.btn-group > [title=""]').eq(0).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') + // Add more actions as needed }) Cypress.Commands.add("OrderShippingRefundingOrdersAPI", () => { cy.visit('/admin1/index.php?controller=AdminOrders') cy.get(':nth-child(1) > .column-payment').click() cy.scrollTo('bottom') // Shipping button in React - cy.get('.btn-group > [title=""]').eq(0).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 dropdown in React - cy.get('.btn-group-action > .btn-group > .dropdown-toggle').eq(0).click() - cy.get('[role="button"]').eq(2).click() - cy.get('[class="swal-button swal-button--confirm"]').click() - cy.get('[class="alert alert-success"]').should('be.visible') - // Add more actions as needed + cy.get('.btn-group > [title=""]').eq(0).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 dropdown in React + cy.get('.btn-group-action > .btn-group > .dropdown-toggle').eq(0).click() + cy.get('[role="button"]').eq(2).click() + cy.get('[class="swal-button swal-button--confirm"]').click() + cy.get('[class="alert alert-success"]').should('be.visible') + // Add more actions as needed }) Cypress.Commands.add("OrderRefundingPartialPaymentsAPI", () => { cy.visit('/admin1/index.php?controller=AdminOrders') cy.get(':nth-child(1) > .column-payment').click() cy.scrollTo('bottom') - cy.get('#mollie_order > :nth-child(1)').click() - cy.get('.form-inline > :nth-child(1) > .btn').should('exist') - cy.get('.input-group-btn > .btn').should('exist') - cy.get('.sc-htpNat > .panel > .card-body > :nth-child(3)').should('exist') - cy.get('.card-body > :nth-child(6)').should('exist') - cy.get('.card-body > :nth-child(9)').should('exist') - cy.get('#mollie_order > :nth-child(1) > :nth-child(1)').should('exist') - cy.get('.sc-htpNat > .panel > .card-body').should('exist') - cy.get('.sc-bxivhb > .panel > .panel-heading').should('exist') - cy.get('.sc-bxivhb > .panel > .card-body').should('exist') - //Check partial refunding on Payments API - cy.get('.form-inline > :nth-child(2) > .input-group > .form-control').type('1.51',{delay:0}) - cy.get(':nth-child(2) > .input-group > .input-group-btn > .btn').click() - cy.get('.swal-modal').should('exist') - cy.get(':nth-child(2) > .swal-button').click() - cy.get('#mollie_order > :nth-child(1) > .alert').contains('Refund was made successfully!') - cy.get('.form-inline > :nth-child(1) > .btn').click() - cy.get('.swal-modal').should('exist') - cy.get(':nth-child(2) > .swal-button').click() - cy.get('#mollie_order > :nth-child(1) > .alert').contains('Refund was made successfully!') + cy.get('#mollie_order > :nth-child(1)').click() + cy.get('.form-inline > :nth-child(1) > .btn').should('exist') + cy.get('.input-group-btn > .btn').should('exist') + cy.get('.sc-htpNat > .panel > .card-body > :nth-child(3)').should('exist') + cy.get('.card-body > :nth-child(6)').should('exist') + cy.get('.card-body > :nth-child(9)').should('exist') + cy.get('#mollie_order > :nth-child(1) > :nth-child(1)').should('exist') + cy.get('.sc-htpNat > .panel > .card-body').should('exist') + cy.get('.sc-bxivhb > .panel > .panel-heading').should('exist') + cy.get('.sc-bxivhb > .panel > .card-body').should('exist') + //Check partial refunding on Payments API + cy.get('.form-inline > :nth-child(2) > .input-group > .form-control').type('1.51',{delay:0}) + cy.get(':nth-child(2) > .input-group > .input-group-btn > .btn').click() + cy.get('.swal-modal').should('exist') + cy.get(':nth-child(2) > .swal-button').click() + cy.get('#mollie_order > :nth-child(1) > .alert').contains('Refund was made successfully!') + cy.get('.form-inline > :nth-child(1) > .btn').click() + cy.get('.swal-modal').should('exist') + cy.get(':nth-child(2) > .swal-button').click() + cy.get('#mollie_order > :nth-child(1) > .alert').contains('Refund was made successfully!') }) Cypress.Commands.add("EnablingModuleMultistore", () => { - cy.get('#subtab-AdminParentModulesSf > :nth-child(1)').click() - cy.get('#subtab-AdminModulesSf').click().wait(1000) - // enable or upgrade the module - cy.get('[data-name="Mollie"]').then(($body) => { - if ($body.text().includes('Upgrade')) { - // yup, module needs to be upgraded - cy.get('[data-name="Mollie"]').contains('Upgrade').click() - cy.get('.btn-secondary').click() - cy.get('.growl').should('have.text','succeeded.') - } else if ($body.text().includes('Enable')) { - // or just enable the module first - cy.get('[data-name="Mollie"]').contains('Enable').click() - } else { - // nop, just enter the module configuration - cy.get('[data-name="Mollie"]').contains('Configure').click() - } - }) - // back to dashboard - cy.get('#tab-AdminDashboard > .link').click({force:true}) + cy.get('#subtab-AdminParentModulesSf > :nth-child(1)').click() + cy.get('#subtab-AdminModulesSf').click().wait(1000) + // enable or upgrade the module + cy.get('[data-name="Mollie"]').then(($body) => { + if ($body.text().includes('Upgrade')) { + // yup, module needs to be upgraded + cy.get('[data-name="Mollie"]').contains('Upgrade').click() + cy.get('.btn-secondary').click() + cy.get('.growl').should('have.text','succeeded.') + } else if ($body.text().includes('Enable')) { + // or just enable the module first + cy.get('[data-name="Mollie"]').contains('Enable').click() + } else { + // nop, just enter the module configuration + cy.get('[data-name="Mollie"]').contains('Configure').click() + } + }) + // back to dashboard + cy.get('#tab-AdminDashboard > .link').click({force:true}) }) Cypress.Commands.add("OpenModuleDashboard", () => { cy.get('#subtab-AdminParentModulesSf > :nth-child(1)').click() @@ -177,56 +177,56 @@ Cypress.Commands.add("OpenModuleDashboard", () => { cy.get('[data-name="Mollie"]').contains('Configure').click() }) Cypress.Commands.add("CreditCardFillingIframe", () => { - cy.frameLoaded('[name="cardHolder-input"]') - cy.enter('[name="cardHolder-input"]').then(getBody => { - getBody().find('#cardHolder').clear({force: true}).type('TEST TEEESSSTT',{force:true}) - }) - cy.enter('[name="cardNumber-input"]').then(getBody => { - getBody().find('#cardNumber').clear({force: true}).type('5555555555554444',{force:true}) - }) - cy.enter('[name="expiryDate-input"]').then(getBody => { - getBody().find('#expiryDate').clear({force: true}).type('1226',{force:true}) - }) - cy.enter('[name="verificationCode-input"]').then(getBody => { - getBody().find('#verificationCode').clear({force: true}).type('222',{force:true}) - }) + cy.frameLoaded('[name="cardHolder-input"]') + cy.enter('[name="cardHolder-input"]').then(getBody => { + getBody().find('#cardHolder').clear({force: true}).type('TEST TEEESSSTT',{force:true}) + }) + cy.enter('[name="cardNumber-input"]').then(getBody => { + getBody().find('#cardNumber').clear({force: true}).type('5555555555554444',{force:true}) + }) + cy.enter('[name="expiryDate-input"]').then(getBody => { + getBody().find('#expiryDate').clear({force: true}).type('1226',{force:true}) + }) + cy.enter('[name="verificationCode-input"]').then(getBody => { + getBody().find('#verificationCode').clear({force: true}).type('222',{force:true}) + }) }) Cypress.Commands.add("NotSecureCreditCardFillingIframe", () => { - cy.frameLoaded('[name="cardHolder-input"]') - cy.enter('[name="cardHolder-input"]').then(getBody => { - getBody().find('#cardHolder').clear({force: true}).type('TEST TEEESSSTT',{force:true}) - }) - cy.enter('[name="cardNumber-input"]').then(getBody => { - getBody().find('#cardNumber').clear({force: true}).type('4242424242424242',{force:true}) - }) - cy.enter('[name="expiryDate-input"]').then(getBody => { - getBody().find('#expiryDate').clear({force: true}).type('1226',{force:true}) - }) - cy.enter('[name="verificationCode-input"]').then(getBody => { - getBody().find('#verificationCode').clear({force: true}).type('222',{force:true}) - }) + cy.frameLoaded('[name="cardHolder-input"]') + cy.enter('[name="cardHolder-input"]').then(getBody => { + getBody().find('#cardHolder').clear({force: true}).type('TEST TEEESSSTT',{force:true}) + }) + cy.enter('[name="cardNumber-input"]').then(getBody => { + getBody().find('#cardNumber').clear({force: true}).type('4242424242424242',{force:true}) + }) + cy.enter('[name="expiryDate-input"]').then(getBody => { + getBody().find('#expiryDate').clear({force: true}).type('1226',{force:true}) + }) + cy.enter('[name="verificationCode-input"]').then(getBody => { + getBody().find('#verificationCode').clear({force: true}).type('222',{force:true}) + }) }) Cypress.Commands.add("OpeningModuleDashboardURL", () => { - cy.visit('/admin1/index.php?controller=AdminModules&configure=mollie') - cy.get('.btn-continue').click() + cy.visit('/admin1/index.php?controller=AdminModules&configure=mollie') + cy.get('.btn-continue').click() }) Cypress.Commands.add("CachingBOFOPS1785", () => { //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('demo@demo.com',{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('demo@demo.com') - 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() - }) - } - login('MollieBOFOLoggingIn') + const login = (MollieBOFOLoggingIn) => { + cy.session(MollieBOFOLoggingIn,() => { + cy.visit('/admin1/') + cy.url().should('contain', 'https').as('Check if HTTPS exists') + cy.get('#email').type('demo@demo.com',{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('demo@demo.com') + 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() + }) + } + login('MollieBOFOLoggingIn') }) Cypress.Commands.add("CachingBOFOPS8", {cacheAcrossSpecs: true}, () => { //Caching the BO and FO session From b9fbc472d58e2d2a9d189badef34c2e49bab7cec Mon Sep 17 00:00:00 2001 From: SimonasB88 Date: Wed, 17 Apr 2024 14:43:27 +0300 Subject: [PATCH 6/6] removing debug mode --- .github/workflows/E2E_On_PR.yml | 2 +- docker-compose.8.yml | 2 +- tests/seed/database/prestashop_8.sql | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/E2E_On_PR.yml b/.github/workflows/E2E_On_PR.yml index b27674114..119cf4207 100755 --- a/.github/workflows/E2E_On_PR.yml +++ b/.github/workflows/E2E_On_PR.yml @@ -29,7 +29,7 @@ jobs: subdomain: 'demoshop8' port: '8002' yml: 'docker-compose.8.yml' - url: 'https://demoshop8debug.ngrok.io' + url: 'https://demoshop8.ngrok.io' test_spec: '**/cypress/e2e/ps8/**' TestRailID: R6470 env: diff --git a/docker-compose.8.yml b/docker-compose.8.yml index b724e53b3..8aef67ee9 100755 --- a/docker-compose.8.yml +++ b/docker-compose.8.yml @@ -29,7 +29,7 @@ services: DB_PASSWD: $DB_PASSWD DB_NAME: prestashop DB_SERVER: mysql - PS_DOMAIN: demoshop8debug.ngrok.io + PS_DOMAIN: demoshop8.ngrok.io PS_FOLDER_INSTALL: install PS_FOLDER_ADMIN: admin1 depends_on: diff --git a/tests/seed/database/prestashop_8.sql b/tests/seed/database/prestashop_8.sql index d3a65cbe1..22e1c4b0f 100644 --- a/tests/seed/database/prestashop_8.sql +++ b/tests/seed/database/prestashop_8.sql @@ -3267,8 +3267,8 @@ INSERT INTO `ps_configuration` (`id_configuration`, `id_shop_group`, `id_shop`, (231, NULL, NULL, 'HOMESLIDER_PAUSE', '7700', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (232, NULL, NULL, 'HOMESLIDER_LOOP', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (233, NULL, NULL, 'PS_BASE_DISTANCE_UNIT', 'm', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), -(234, NULL, NULL, 'PS_SHOP_DOMAIN', 'demoshop8debug.ngrok.io', '0000-00-00 00:00:00', '2024-02-05 10:58:30'), -(235, NULL, NULL, 'PS_SHOP_DOMAIN_SSL', 'demoshop8debug.ngrok.io', '0000-00-00 00:00:00', '2024-02-05 10:58:30'), +(234, NULL, NULL, 'PS_SHOP_DOMAIN', 'demoshop8.ngrok.io', '0000-00-00 00:00:00', '2024-02-05 10:58:30'), +(235, NULL, NULL, 'PS_SHOP_DOMAIN_SSL', 'demoshop8.ngrok.io', '0000-00-00 00:00:00', '2024-02-05 10:58:30'), (236, NULL, NULL, 'PS_SHOP_NAME', 'PrestaShop', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), (237, NULL, NULL, 'PS_SHOP_EMAIL', 'demo@prestashop.com', '0000-00-00 00:00:00', '2024-02-05 10:58:31'), (238, NULL, NULL, 'PS_MAIL_METHOD', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00'), @@ -3707,11 +3707,11 @@ CREATE TABLE `ps_connections_source` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `ps_connections_source` (`id_connections_source`, `id_connections`, `http_referer`, `request_uri`, `keywords`, `date_add`) VALUES -(1, 2, '', 'demoshop8debug.ngrok.io/', '', '2024-02-05 11:01:25'), -(2, 3, '', 'demoshop8debug.ngrok.io/', '', '2024-02-05 11:01:31'), -(3, 5, '', 'demoshop8debug.ngrok.io/de/module/mollie/webhook', '', '2024-03-04 16:08:24'), -(4, 6, '', 'demoshop8debug.ngrok.io/de/module/mollie/webhook', '', '2024-03-04 16:10:22'), -(5, 9, '', 'demoshop8debug.ngrok.io/en/', '', '2024-04-08 17:54:05'); +(1, 2, '', 'demoshop8.ngrok.io/', '', '2024-02-05 11:01:25'), +(2, 3, '', 'demoshop8.ngrok.io/', '', '2024-02-05 11:01:31'), +(3, 5, '', 'demoshop8.ngrok.io/de/module/mollie/webhook', '', '2024-03-04 16:08:24'), +(4, 6, '', 'demoshop8.ngrok.io/de/module/mollie/webhook', '', '2024-03-04 16:10:22'), +(5, 9, '', 'demoshop8.ngrok.io/en/', '', '2024-04-08 17:54:05'); DROP TABLE IF EXISTS `ps_contact`; CREATE TABLE `ps_contact` ( @@ -15070,7 +15070,7 @@ CREATE TABLE `ps_shop_url` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `ps_shop_url` (`id_shop_url`, `id_shop`, `domain`, `domain_ssl`, `physical_uri`, `virtual_uri`, `main`, `active`) VALUES -(1, 1, 'demoshop8debug.ngrok.io', 'demoshop8debug.ngrok.io', '/', '', 1, 1); +(1, 1, 'demoshop8.ngrok.io', 'demoshop8.ngrok.io', '/', '', 1, 1); DROP TABLE IF EXISTS `ps_smarty_cache`; CREATE TABLE `ps_smarty_cache` (