From c99006e3f7fbc4db522785c7e6ce014b1da2a0b1 Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Mon, 25 Mar 2024 17:34:27 +0300 Subject: [PATCH 01/15] Fixing issue with missing store id. --- .../order-management/dynamic-order-creation.json | 1 + package.json | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json b/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json index 04fabb77..5e2d9c9c 100644 --- a/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json +++ b/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json @@ -93,6 +93,7 @@ "arguments": [ { "customer": "#customer", + "store": [{ "idStore": "#store.id_store", "name": "#store.name" }], "items": [ { "sku": "#product.sku", diff --git a/package.json b/package.json index 70691268..a6af1757 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,11 @@ "prettier:check": "prettier . --check", "prettier:write": "prettier . --write", "cy:open": "cypress open", - "cy:run": "cypress run --headless --browser electron", - "cy:yves": "cypress run --spec cypress/e2e/yves/* --headless --browser electron", - "cy:backoffice": "cypress run --spec cypress/e2e/backoffice/* --headless --browser electron", - "cy:mp": "cypress run --spec cypress/e2e/mp/* --headless --browser electron", - "cy:feature:comments": "cypress run --env grepTags=@comments --headless --browser electron" + "cy:run": "cypress run --headless --browser chrome", + "cy:yves": "cypress run --spec cypress/e2e/yves/* --headless --browser chrome", + "cy:backoffice": "cypress run --spec cypress/e2e/backoffice/* --headless --browser chrome", + "cy:mp": "cypress run --spec cypress/e2e/mp/* --headless --browser chrome", + "cy:feature:comments": "cypress run --env grepTags=@comments --headless --browser chrome" }, "engines": { "node": ">=18.0.0", From 7d6b5205e81ca122ea4f2ba36bbfd5578e991feb Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Mon, 25 Mar 2024 17:49:43 +0300 Subject: [PATCH 02/15] Set concrete version of cypress container. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 17227a14..c7cf4328 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Start the final image -FROM cypress/browsers:latest +FROM cypress/browsers:node-20.11.1-chrome-123.0.6312.58-1-ff-124.0-edge-122.0.2365.92-1 # Set and create the working directory ENV CYPRESS_TESTS_WORK_DIR /opt/cypress-tests From 0c5cf1d0fc4fde3c5376fd9a2fe3864a9e2b560a Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Mon, 25 Mar 2024 18:03:18 +0300 Subject: [PATCH 03/15] Add fallback. --- .../mp/marketplace-agent-assist/agent-impersonation.cy.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts b/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts index bfffbdd4..86328c6c 100644 --- a/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts +++ b/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts @@ -66,7 +66,13 @@ describe('agent impersonation', { tags: ['@marketplace-agent-assist'] }, (): voi // Ensure that agent finished assistant session and don't have access to MP dashboard mpDashboardPage.visit({ failOnStatusCode: false }); - cy.get('body').contains('Access Denied.'); + cy.get('body').contains('Access Denied.').then(($el) => { + if ($el.length === 0) { + cy.get('body').contains('FAIL WHALE').should('exist'); + } else { + cy.get('body').contains('Access Denied.').should('exist'); + } + }); }); it('agent should be able to fully logout from all sessions', (): void => { From ee66eb615709b453abdbddeba46aa0013237af10 Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Mon, 25 Mar 2024 18:53:26 +0300 Subject: [PATCH 04/15] Fixed issues with missing store id. --- .../b2b/yves/comments/dynamic-cart-comments.json | 3 ++- .../order-management/dynamic-order-creation.json | 4 ++-- .../return-management/dynamic-return-creation.json | 3 ++- .../suite/yves/checkout/dynamic-basic-checkout.json | 6 +++++- .../suite/yves/comments/dynamic-cart-comments.json | 3 ++- package.json | 10 +++++----- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/cypress/fixtures/b2b/yves/comments/dynamic-cart-comments.json b/cypress/fixtures/b2b/yves/comments/dynamic-cart-comments.json index 80bced72..8ec1481a 100644 --- a/cypress/fixtures/b2b/yves/comments/dynamic-cart-comments.json +++ b/cypress/fixtures/b2b/yves/comments/dynamic-cart-comments.json @@ -26,7 +26,7 @@ "type": "transfer", "name": "StoreTransfer", "key": "store", - "arguments": { "id_store": 1 } + "arguments": { "id_store": 1, "name": "DE" } }, { "type": "helper", @@ -109,6 +109,7 @@ "key": "quote", "arguments": [ { + "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { diff --git a/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json b/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json index 5e2d9c9c..a242350b 100644 --- a/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json +++ b/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json @@ -8,7 +8,7 @@ "type": "transfer", "name": "StoreTransfer", "key": "store", - "arguments": { "id_store": 1 } + "arguments": { "id_store": 1, "name": "DE" } }, { "type": "transfer", @@ -92,8 +92,8 @@ "key": "quote", "arguments": [ { + "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", - "store": [{ "idStore": "#store.id_store", "name": "#store.name" }], "items": [ { "sku": "#product.sku", diff --git a/cypress/fixtures/suite/backoffice/return-management/dynamic-return-creation.json b/cypress/fixtures/suite/backoffice/return-management/dynamic-return-creation.json index b92bf7ca..37d6a4aa 100644 --- a/cypress/fixtures/suite/backoffice/return-management/dynamic-return-creation.json +++ b/cypress/fixtures/suite/backoffice/return-management/dynamic-return-creation.json @@ -19,7 +19,7 @@ "type": "transfer", "name": "StoreTransfer", "key": "store", - "arguments": { "id_store": 1 } + "arguments": { "id_store": 1, "name": "DE" } }, { "type": "transfer", @@ -100,6 +100,7 @@ "key": "quote1", "arguments": [ { + "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { diff --git a/cypress/fixtures/suite/yves/checkout/dynamic-basic-checkout.json b/cypress/fixtures/suite/yves/checkout/dynamic-basic-checkout.json index cb9eed78..9dd7ac0d 100644 --- a/cypress/fixtures/suite/yves/checkout/dynamic-basic-checkout.json +++ b/cypress/fixtures/suite/yves/checkout/dynamic-basic-checkout.json @@ -8,7 +8,7 @@ "type": "transfer", "name": "StoreTransfer", "key": "store", - "arguments": { "id_store": 1 } + "arguments": { "id_store": 1, "name": "DE" } }, { "type": "transfer", @@ -127,6 +127,7 @@ "key": "quote1", "arguments": [ { + "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { @@ -153,6 +154,7 @@ "key": "quote2", "arguments": [ { + "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { @@ -179,6 +181,7 @@ "key": "quote3", "arguments": [ { + "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { @@ -205,6 +208,7 @@ "key": "quote4", "arguments": [ { + "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { diff --git a/cypress/fixtures/suite/yves/comments/dynamic-cart-comments.json b/cypress/fixtures/suite/yves/comments/dynamic-cart-comments.json index 80bced72..8ec1481a 100644 --- a/cypress/fixtures/suite/yves/comments/dynamic-cart-comments.json +++ b/cypress/fixtures/suite/yves/comments/dynamic-cart-comments.json @@ -26,7 +26,7 @@ "type": "transfer", "name": "StoreTransfer", "key": "store", - "arguments": { "id_store": 1 } + "arguments": { "id_store": 1, "name": "DE" } }, { "type": "helper", @@ -109,6 +109,7 @@ "key": "quote", "arguments": [ { + "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { diff --git a/package.json b/package.json index a6af1757..70691268 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,11 @@ "prettier:check": "prettier . --check", "prettier:write": "prettier . --write", "cy:open": "cypress open", - "cy:run": "cypress run --headless --browser chrome", - "cy:yves": "cypress run --spec cypress/e2e/yves/* --headless --browser chrome", - "cy:backoffice": "cypress run --spec cypress/e2e/backoffice/* --headless --browser chrome", - "cy:mp": "cypress run --spec cypress/e2e/mp/* --headless --browser chrome", - "cy:feature:comments": "cypress run --env grepTags=@comments --headless --browser chrome" + "cy:run": "cypress run --headless --browser electron", + "cy:yves": "cypress run --spec cypress/e2e/yves/* --headless --browser electron", + "cy:backoffice": "cypress run --spec cypress/e2e/backoffice/* --headless --browser electron", + "cy:mp": "cypress run --spec cypress/e2e/mp/* --headless --browser electron", + "cy:feature:comments": "cypress run --env grepTags=@comments --headless --browser electron" }, "engines": { "node": ">=18.0.0", From 24f5e703e3ee9212a1ae6234d4946af8c451f8ed Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Mon, 25 Mar 2024 18:57:51 +0300 Subject: [PATCH 05/15] Adjusted docker version. --- Dockerfile | 2 +- package.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7cf4328..4e86fa8d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Start the final image -FROM cypress/browsers:node-20.11.1-chrome-123.0.6312.58-1-ff-124.0-edge-122.0.2365.92-1 +FROM cypress/browsers:node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1 # Set and create the working directory ENV CYPRESS_TESTS_WORK_DIR /opt/cypress-tests diff --git a/package.json b/package.json index 70691268..a6af1757 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,11 @@ "prettier:check": "prettier . --check", "prettier:write": "prettier . --write", "cy:open": "cypress open", - "cy:run": "cypress run --headless --browser electron", - "cy:yves": "cypress run --spec cypress/e2e/yves/* --headless --browser electron", - "cy:backoffice": "cypress run --spec cypress/e2e/backoffice/* --headless --browser electron", - "cy:mp": "cypress run --spec cypress/e2e/mp/* --headless --browser electron", - "cy:feature:comments": "cypress run --env grepTags=@comments --headless --browser electron" + "cy:run": "cypress run --headless --browser chrome", + "cy:yves": "cypress run --spec cypress/e2e/yves/* --headless --browser chrome", + "cy:backoffice": "cypress run --spec cypress/e2e/backoffice/* --headless --browser chrome", + "cy:mp": "cypress run --spec cypress/e2e/mp/* --headless --browser chrome", + "cy:feature:comments": "cypress run --env grepTags=@comments --headless --browser chrome" }, "engines": { "node": ">=18.0.0", From 0c411c34f2fc33470d72de9ed2832f8bd2bc8f4c Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Tue, 26 Mar 2024 13:53:39 +0300 Subject: [PATCH 06/15] Adjusted assertion. --- .../agent-impersonation.cy.ts | 11 +++-------- .../pages/mp/dashboard/dashboard-page.ts | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts b/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts index 86328c6c..34eb1dac 100644 --- a/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts +++ b/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts @@ -54,7 +54,7 @@ describe('agent impersonation', { tags: ['@marketplace-agent-assist'] }, (): voi cy.get('body').find('a:contains("Log out Agent")').should('exist'); }); - it('agent should be able to finish impersonation', (): void => { + it.only('agent should be able to finish impersonation', (): void => { impersonateScenario.execute( dynamicFixtures.merchantAgentUser.username, staticFixtures.defaultPassword, @@ -65,14 +65,9 @@ describe('agent impersonation', { tags: ['@marketplace-agent-assist'] }, (): voi mpAgentDashboardPage.assertPageLocation(); // Ensure that agent finished assistant session and don't have access to MP dashboard + const alias = mpDashboardPage.interceptRequest(); mpDashboardPage.visit({ failOnStatusCode: false }); - cy.get('body').contains('Access Denied.').then(($el) => { - if ($el.length === 0) { - cy.get('body').contains('FAIL WHALE').should('exist'); - } else { - cy.get('body').contains('Access Denied.').should('exist'); - } - }); + mpDashboardPage.assert500StatusCode({ alias: alias }); }); it('agent should be able to fully logout from all sessions', (): void => { diff --git a/cypress/support/pages/mp/dashboard/dashboard-page.ts b/cypress/support/pages/mp/dashboard/dashboard-page.ts index bb158461..e9bc0432 100644 --- a/cypress/support/pages/mp/dashboard/dashboard-page.ts +++ b/cypress/support/pages/mp/dashboard/dashboard-page.ts @@ -15,4 +15,23 @@ export class DashboardPage extends MpPage { this.repository.getUserProfileMenu().click(); this.repository.getLogoutButton().click(); }; + + interceptRequest = (): string => { + const alias = 'dashboardPageRequest'; + cy.intercept({ url: this.PAGE_URL }).as(alias); + + return alias; + }; + + assert500StatusCode = (params: Assert500StatusCodeParams): void => { + cy.wait(`@${params.alias}`).then((interception) => { + if (interception.response) { + expect(interception.response.statusCode).to.equal(500); + } + }); + }; +} + +interface Assert500StatusCodeParams { + alias: string; } From 2bf59ab789e0ada0d2b0d2ef48f94debc4a94b9f Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Tue, 26 Mar 2024 14:14:03 +0300 Subject: [PATCH 07/15] Small adjustments. --- .../e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts b/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts index 34eb1dac..c6a5f86e 100644 --- a/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts +++ b/cypress/e2e/mp/marketplace-agent-assist/agent-impersonation.cy.ts @@ -54,7 +54,7 @@ describe('agent impersonation', { tags: ['@marketplace-agent-assist'] }, (): voi cy.get('body').find('a:contains("Log out Agent")').should('exist'); }); - it.only('agent should be able to finish impersonation', (): void => { + it('agent should be able to finish impersonation', (): void => { impersonateScenario.execute( dynamicFixtures.merchantAgentUser.username, staticFixtures.defaultPassword, From 2a9f5028acd545fa937b2eda325900064e9d4b6f Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Tue, 26 Mar 2024 15:01:01 +0300 Subject: [PATCH 08/15] Small adjustments. --- cypress/support/pages/mp/sales/sales-orders-repository.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/support/pages/mp/sales/sales-orders-repository.ts b/cypress/support/pages/mp/sales/sales-orders-repository.ts index a1b7d66d..d2ad3a0c 100644 --- a/cypress/support/pages/mp/sales/sales-orders-repository.ts +++ b/cypress/support/pages/mp/sales/sales-orders-repository.ts @@ -4,7 +4,7 @@ import { injectable } from 'inversify'; @injectable() @autoWired export class SalesOrdersRepository { - getFirstTableRow = (): Cypress.Chainable => cy.get('tbody > :nth-child(1)'); + getFirstTableRow = (): Cypress.Chainable => cy.get('tbody > :nth-child(1):visible'); getSearchSelector = (): string => '.spy-table-search-feature input[type="text"]'; getDrawer = (): Cypress.Chainable => cy.get('.spy-drawer-wrapper'); } From 23ccfa62092505544c4588690f55d2aa3b371f14 Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Tue, 26 Mar 2024 15:19:24 +0300 Subject: [PATCH 09/15] Test --- cypress.config.ts | 10 +++++----- .../agent-merchant-portal.cy.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress.config.ts b/cypress.config.ts index 36de38c6..6495e2cc 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -33,11 +33,11 @@ export default defineConfig({ return existsSync(filename); }, }); - }, - retries: { - runMode: 2, - openMode: 0, - }, + } + // retries: { + // runMode: 2, + // openMode: 0, + // }, }, viewportWidth: parseInt(process.env.VIEWPORT_WIDGTH ?? '1000', 10), viewportHeight: parseInt(process.env.VIEWPORT_HEIGHT ?? '660', 10), diff --git a/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts b/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts index a3863ac5..918572e1 100644 --- a/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts +++ b/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts @@ -30,7 +30,7 @@ describe('agent merchant portal', { tags: ['@marketplace-agent-assist'] }, (): v ({ dynamicFixtures, staticFixtures } = Cypress.env()); }); - it('agent should be able to change order status during impersonation', (): void => { + it.only('agent should be able to change order status during impersonation', (): void => { customerLoginScenario.execute({ email: dynamicFixtures.customer.email, password: staticFixtures.defaultPassword }); cartPage.visit(); From eea3f01812f3ebd2d56329a3093abd0fdb1e0be6 Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Tue, 26 Mar 2024 15:58:09 +0300 Subject: [PATCH 10/15] Test --- cypress/support/pages/mp/sales/sales-orders-page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/support/pages/mp/sales/sales-orders-page.ts b/cypress/support/pages/mp/sales/sales-orders-page.ts index 65000cbf..a710e52b 100644 --- a/cypress/support/pages/mp/sales/sales-orders-page.ts +++ b/cypress/support/pages/mp/sales/sales-orders-page.ts @@ -24,7 +24,7 @@ export class SalesOrdersPage extends MpPage { }; cancelOrder = (query: string): void => { - this.findOrder(query).click(); + this.findOrder(query).scrollIntoView().click(); this.repository.getDrawer().find('button:contains("Cancel")').click(); }; } From db2fdca3404e24ac8f145aea9830dc6b44c968cf Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Tue, 26 Mar 2024 16:34:53 +0300 Subject: [PATCH 11/15] Test --- .../mp/marketplace-agent-assist/agent-merchant-portal.cy.ts | 4 ++-- cypress/support/pages/mp/sales/sales-orders-page.ts | 2 +- cypress/support/pages/mp/sales/sales-orders-repository.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts b/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts index 918572e1..667e0854 100644 --- a/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts +++ b/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts @@ -81,7 +81,7 @@ describe('agent merchant portal', { tags: ['@marketplace-agent-assist'] }, (): v ); productsPage.visit(); - productsPage.findProduct(dynamicFixtures.productConcreteForMerchant.abstract_sku).click(); + productsPage.findProduct(dynamicFixtures.productConcreteForMerchant.abstract_sku).click({ force: true }); productsPage.getDrawer().find('button:contains("Save")').click(); cy.get('body').contains('The Product is saved.'); @@ -95,7 +95,7 @@ describe('agent merchant portal', { tags: ['@marketplace-agent-assist'] }, (): v ); offersPage.visit(); - offersPage.findOffer(dynamicFixtures.productOffer.product_offer_reference).click(); + offersPage.findOffer(dynamicFixtures.productOffer.product_offer_reference).click({ force: true }); offersPage.getDrawer().find('button:contains("Save")').click(); cy.get('body').contains('The Offer is saved.'); diff --git a/cypress/support/pages/mp/sales/sales-orders-page.ts b/cypress/support/pages/mp/sales/sales-orders-page.ts index a710e52b..6c7794b9 100644 --- a/cypress/support/pages/mp/sales/sales-orders-page.ts +++ b/cypress/support/pages/mp/sales/sales-orders-page.ts @@ -24,7 +24,7 @@ export class SalesOrdersPage extends MpPage { }; cancelOrder = (query: string): void => { - this.findOrder(query).scrollIntoView().click(); + this.findOrder(query).click({ force: true }); this.repository.getDrawer().find('button:contains("Cancel")').click(); }; } diff --git a/cypress/support/pages/mp/sales/sales-orders-repository.ts b/cypress/support/pages/mp/sales/sales-orders-repository.ts index d2ad3a0c..a1b7d66d 100644 --- a/cypress/support/pages/mp/sales/sales-orders-repository.ts +++ b/cypress/support/pages/mp/sales/sales-orders-repository.ts @@ -4,7 +4,7 @@ import { injectable } from 'inversify'; @injectable() @autoWired export class SalesOrdersRepository { - getFirstTableRow = (): Cypress.Chainable => cy.get('tbody > :nth-child(1):visible'); + getFirstTableRow = (): Cypress.Chainable => cy.get('tbody > :nth-child(1)'); getSearchSelector = (): string => '.spy-table-search-feature input[type="text"]'; getDrawer = (): Cypress.Chainable => cy.get('.spy-drawer-wrapper'); } From 377db44f965114886c51499e91ab3c51aaf063c0 Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Tue, 26 Mar 2024 16:49:37 +0300 Subject: [PATCH 12/15] Reverted changes. --- .../e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts b/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts index 667e0854..56825eba 100644 --- a/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts +++ b/cypress/e2e/mp/marketplace-agent-assist/agent-merchant-portal.cy.ts @@ -30,7 +30,7 @@ describe('agent merchant portal', { tags: ['@marketplace-agent-assist'] }, (): v ({ dynamicFixtures, staticFixtures } = Cypress.env()); }); - it.only('agent should be able to change order status during impersonation', (): void => { + it('agent should be able to change order status during impersonation', (): void => { customerLoginScenario.execute({ email: dynamicFixtures.customer.email, password: staticFixtures.defaultPassword }); cartPage.visit(); From 727c450414eac55f95bc815c62127d646c416f31 Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Tue, 26 Mar 2024 16:53:20 +0300 Subject: [PATCH 13/15] Reverted changes. --- cypress.config.ts | 10 +++++----- .../b2b/yves/comments/dynamic-cart-comments.json | 3 +-- .../order-management/dynamic-order-creation.json | 4 ++-- .../return-management/dynamic-return-creation.json | 3 +-- .../suite/yves/checkout/dynamic-basic-checkout.json | 6 +----- .../suite/yves/comments/dynamic-cart-comments.json | 3 +-- 6 files changed, 11 insertions(+), 18 deletions(-) diff --git a/cypress.config.ts b/cypress.config.ts index 6495e2cc..36de38c6 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -33,11 +33,11 @@ export default defineConfig({ return existsSync(filename); }, }); - } - // retries: { - // runMode: 2, - // openMode: 0, - // }, + }, + retries: { + runMode: 2, + openMode: 0, + }, }, viewportWidth: parseInt(process.env.VIEWPORT_WIDGTH ?? '1000', 10), viewportHeight: parseInt(process.env.VIEWPORT_HEIGHT ?? '660', 10), diff --git a/cypress/fixtures/b2b/yves/comments/dynamic-cart-comments.json b/cypress/fixtures/b2b/yves/comments/dynamic-cart-comments.json index 8ec1481a..80bced72 100644 --- a/cypress/fixtures/b2b/yves/comments/dynamic-cart-comments.json +++ b/cypress/fixtures/b2b/yves/comments/dynamic-cart-comments.json @@ -26,7 +26,7 @@ "type": "transfer", "name": "StoreTransfer", "key": "store", - "arguments": { "id_store": 1, "name": "DE" } + "arguments": { "id_store": 1 } }, { "type": "helper", @@ -109,7 +109,6 @@ "key": "quote", "arguments": [ { - "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { diff --git a/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json b/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json index a242350b..5e2d9c9c 100644 --- a/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json +++ b/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json @@ -8,7 +8,7 @@ "type": "transfer", "name": "StoreTransfer", "key": "store", - "arguments": { "id_store": 1, "name": "DE" } + "arguments": { "id_store": 1 } }, { "type": "transfer", @@ -92,8 +92,8 @@ "key": "quote", "arguments": [ { - "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", + "store": [{ "idStore": "#store.id_store", "name": "#store.name" }], "items": [ { "sku": "#product.sku", diff --git a/cypress/fixtures/suite/backoffice/return-management/dynamic-return-creation.json b/cypress/fixtures/suite/backoffice/return-management/dynamic-return-creation.json index 37d6a4aa..b92bf7ca 100644 --- a/cypress/fixtures/suite/backoffice/return-management/dynamic-return-creation.json +++ b/cypress/fixtures/suite/backoffice/return-management/dynamic-return-creation.json @@ -19,7 +19,7 @@ "type": "transfer", "name": "StoreTransfer", "key": "store", - "arguments": { "id_store": 1, "name": "DE" } + "arguments": { "id_store": 1 } }, { "type": "transfer", @@ -100,7 +100,6 @@ "key": "quote1", "arguments": [ { - "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { diff --git a/cypress/fixtures/suite/yves/checkout/dynamic-basic-checkout.json b/cypress/fixtures/suite/yves/checkout/dynamic-basic-checkout.json index 9dd7ac0d..cb9eed78 100644 --- a/cypress/fixtures/suite/yves/checkout/dynamic-basic-checkout.json +++ b/cypress/fixtures/suite/yves/checkout/dynamic-basic-checkout.json @@ -8,7 +8,7 @@ "type": "transfer", "name": "StoreTransfer", "key": "store", - "arguments": { "id_store": 1, "name": "DE" } + "arguments": { "id_store": 1 } }, { "type": "transfer", @@ -127,7 +127,6 @@ "key": "quote1", "arguments": [ { - "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { @@ -154,7 +153,6 @@ "key": "quote2", "arguments": [ { - "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { @@ -181,7 +179,6 @@ "key": "quote3", "arguments": [ { - "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { @@ -208,7 +205,6 @@ "key": "quote4", "arguments": [ { - "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { diff --git a/cypress/fixtures/suite/yves/comments/dynamic-cart-comments.json b/cypress/fixtures/suite/yves/comments/dynamic-cart-comments.json index 8ec1481a..80bced72 100644 --- a/cypress/fixtures/suite/yves/comments/dynamic-cart-comments.json +++ b/cypress/fixtures/suite/yves/comments/dynamic-cart-comments.json @@ -26,7 +26,7 @@ "type": "transfer", "name": "StoreTransfer", "key": "store", - "arguments": { "id_store": 1, "name": "DE" } + "arguments": { "id_store": 1 } }, { "type": "helper", @@ -109,7 +109,6 @@ "key": "quote", "arguments": [ { - "store": { "idStore": "#store.id_store", "name": "#store.name" }, "customer": "#customer", "items": [ { From 3679adbe0880995235eaf6f3036656f6364d3cd5 Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Tue, 26 Mar 2024 16:54:21 +0300 Subject: [PATCH 14/15] Reverted changes. --- .../backoffice/order-management/dynamic-order-creation.json | 1 - 1 file changed, 1 deletion(-) diff --git a/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json b/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json index 5e2d9c9c..04fabb77 100644 --- a/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json +++ b/cypress/fixtures/suite/backoffice/order-management/dynamic-order-creation.json @@ -93,7 +93,6 @@ "arguments": [ { "customer": "#customer", - "store": [{ "idStore": "#store.id_store", "name": "#store.name" }], "items": [ { "sku": "#product.sku", From aa00779320bd555d9932d837757a83b3db4c09cc Mon Sep 17 00:00:00 2001 From: Dmytro Asieiev Date: Wed, 27 Mar 2024 11:29:27 +0300 Subject: [PATCH 15/15] Adjusted to latest tag. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4e86fa8d..c7cf4328 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Start the final image -FROM cypress/browsers:node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1 +FROM cypress/browsers:node-20.11.1-chrome-123.0.6312.58-1-ff-124.0-edge-122.0.2365.92-1 # Set and create the working directory ENV CYPRESS_TESTS_WORK_DIR /opt/cypress-tests