From 6d2e08b168dabe6db2d23c0c840aa8f1c32e6328 Mon Sep 17 00:00:00 2001 From: doproiescu-plenty <126688988+doproiescu-plenty@users.noreply.github.com> Date: Fri, 24 May 2024 10:51:37 +0300 Subject: [PATCH 01/44] feat: paypal card test --- .github/workflows/paypal-card-test.yaml | 62 +++++++++++++++++++++++++ apps/web/cypress.config.ts | 1 + 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/paypal-card-test.yaml diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml new file mode 100644 index 000000000..ba3465099 --- /dev/null +++ b/.github/workflows/paypal-card-test.yaml @@ -0,0 +1,62 @@ +name: tests + +on: + workflow_dispatch: + pull_request: + +permissions: + contents: read + packages: read + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Enable corepack + run: corepack enable + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: '20.5' + cache: 'yarn' + registry-url: "https://npm.pkg.github.com" + + - name: Set yarn version + run: | + yarn set version stable + yarn set version 3.6.4 + + - name: Setup .yarnrc.yml + run: | + yarn config set nodeLinker node-modules + yarn config set npmScopes.plentymarkets.npmRegistryServer "https://npm.pkg.github.com" + yarn config set npmScopes.plentymarkets.npmAlwaysAuth true + yarn config set npmScopes.plentymarkets.npmAuthToken $NODE_AUTH_TOKEN + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Dependencies + run: yarn --immutable + + - name: E2E tests + uses: cypress-io/github-action@v5 + with: + build: yarn build + command: yarn test:cypress + install: false + spec: __tests__/test/**/paypalCreditCard.cy.js + env: + PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} + PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} + + - uses: actions/upload-artifact@v3 + if: failure() + with: + name: cypress-screenshots + path: apps/web/__tests__/report/screenshots + if-no-files-found: ignore diff --git a/apps/web/cypress.config.ts b/apps/web/cypress.config.ts index 6bd53a40d..0cdcd11c2 100644 --- a/apps/web/cypress.config.ts +++ b/apps/web/cypress.config.ts @@ -16,6 +16,7 @@ export default defineConfig({ }, baseUrl: 'http://localhost:3000', specPattern: '__tests__/test/**/*.cy.{js,jsx,ts,tsx}', + excludeSpecPattern: [ '__tests__/test/**/paypalCreditCard.cy.js' ], supportFile: '__tests__/support/e2e.ts', retries: { runMode: 2, From edafac2ac710f01101fff6aa3a3d0ecb67edcafd Mon Sep 17 00:00:00 2001 From: doproiescu-plenty <126688988+doproiescu-plenty@users.noreply.github.com> Date: Mon, 27 May 2024 10:43:57 +0300 Subject: [PATCH 02/44] feat: update paypal test --- .github/workflows/paypal-card-test.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index ba3465099..8a06979d5 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -1,4 +1,4 @@ -name: tests +name: Paypal Card Test on: workflow_dispatch: @@ -33,10 +33,10 @@ jobs: - name: Setup .yarnrc.yml run: | - yarn config set nodeLinker node-modules - yarn config set npmScopes.plentymarkets.npmRegistryServer "https://npm.pkg.github.com" - yarn config set npmScopes.plentymarkets.npmAlwaysAuth true - yarn config set npmScopes.plentymarkets.npmAuthToken $NODE_AUTH_TOKEN + yarn config set nodeLinker node-modules + yarn config set npmScopes.plentymarkets.npmRegistryServer "https://npm.pkg.github.com" + yarn config set npmScopes.plentymarkets.npmAlwaysAuth true + yarn config set npmScopes.plentymarkets.npmAuthToken $NODE_AUTH_TOKEN env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -49,7 +49,7 @@ jobs: build: yarn build command: yarn test:cypress install: false - spec: __tests__/test/**/paypalCreditCard.cy.js + spec: '__tests__/test/**/paypalCreditCard.cy.js' env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From 23694cd88cffefa08c9fc253f6fc46f8d3bd7a74 Mon Sep 17 00:00:00 2001 From: doproiescu-plenty <126688988+doproiescu-plenty@users.noreply.github.com> Date: Mon, 27 May 2024 11:32:07 +0300 Subject: [PATCH 03/44] Update paypal-card-test.yaml --- .github/workflows/paypal-card-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 8a06979d5..27e14e025 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,7 +49,7 @@ jobs: build: yarn build command: yarn test:cypress install: false - spec: '__tests__/test/**/paypalCreditCard.cy.js' + spec: 'smoke/paypalCreditCard.cy.js' env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From 814fbbbaba5c23b4422bf0fc36b0ccc090f5cc67 Mon Sep 17 00:00:00 2001 From: doproiescu-plenty <126688988+doproiescu-plenty@users.noreply.github.com> Date: Tue, 28 May 2024 10:30:54 +0300 Subject: [PATCH 04/44] fix: paypal test path --- .github/workflows/paypal-card-test.yaml | 2 +- apps/web/cypress.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 27e14e025..5b381d496 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,7 +49,7 @@ jobs: build: yarn build command: yarn test:cypress install: false - spec: 'smoke/paypalCreditCard.cy.js' + spec: apps/web/__tests_/test/smoke/paypalCreditCard.cy.js' env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} diff --git a/apps/web/cypress.config.ts b/apps/web/cypress.config.ts index 0cdcd11c2..09a8bbb91 100644 --- a/apps/web/cypress.config.ts +++ b/apps/web/cypress.config.ts @@ -16,7 +16,7 @@ export default defineConfig({ }, baseUrl: 'http://localhost:3000', specPattern: '__tests__/test/**/*.cy.{js,jsx,ts,tsx}', - excludeSpecPattern: [ '__tests__/test/**/paypalCreditCard.cy.js' ], + excludeSpecPattern: [ '__tests__/test/smoke/paypalCreditCard.cy.js' ], supportFile: '__tests__/support/e2e.ts', retries: { runMode: 2, From cbe0658c099c9af9a15d881dedf34e6ced46fe2e Mon Sep 17 00:00:00 2001 From: doproiescu-plenty <126688988+doproiescu-plenty@users.noreply.github.com> Date: Wed, 29 May 2024 10:48:17 +0300 Subject: [PATCH 05/44] fix: paypal test path --- .github/workflows/paypal-card-test.yaml | 2 +- apps/web/cypress.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 5b381d496..4197a3bc7 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,7 +49,7 @@ jobs: build: yarn build command: yarn test:cypress install: false - spec: apps/web/__tests_/test/smoke/paypalCreditCard.cy.js' + spec: apps/web/__tests_/test/smoke/paypalCreditCard.cy.ts' env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} diff --git a/apps/web/cypress.config.ts b/apps/web/cypress.config.ts index 09a8bbb91..ef0e63ee6 100644 --- a/apps/web/cypress.config.ts +++ b/apps/web/cypress.config.ts @@ -16,7 +16,7 @@ export default defineConfig({ }, baseUrl: 'http://localhost:3000', specPattern: '__tests__/test/**/*.cy.{js,jsx,ts,tsx}', - excludeSpecPattern: [ '__tests__/test/smoke/paypalCreditCard.cy.js' ], + excludeSpecPattern: [ '__tests__/test/smoke/paypalCreditCard.cy.ts' ], supportFile: '__tests__/support/e2e.ts', retries: { runMode: 2, From 9ef86328f70dba51c5ce5d5df583a06a9cfe0bf8 Mon Sep 17 00:00:00 2001 From: doproiescu-plenty <126688988+doproiescu-plenty@users.noreply.github.com> Date: Wed, 29 May 2024 11:00:40 +0300 Subject: [PATCH 06/44] fix: paypal card test path --- .github/workflows/paypal-card-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 4197a3bc7..1b39c3f4b 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,7 +49,7 @@ jobs: build: yarn build command: yarn test:cypress install: false - spec: apps/web/__tests_/test/smoke/paypalCreditCard.cy.ts' + spec: apps/web/__tests__/test/smoke/paypalCreditCard.cy.ts' env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From 848870f5a407b71b8c5f56d5276c58e7ce893968 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Wed, 29 May 2024 11:48:06 +0300 Subject: [PATCH 07/44] chore: modify spec path --- .github/workflows/paypal-card-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 1b39c3f4b..95aa7243d 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,7 +49,7 @@ jobs: build: yarn build command: yarn test:cypress install: false - spec: apps/web/__tests__/test/smoke/paypalCreditCard.cy.ts' + spec: __tests__/test/smoke/paypalCreditCard.cy.ts env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From af9b21fbae4bed1c277636fa4e70ddd061bfe121 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Wed, 29 May 2024 12:16:04 +0300 Subject: [PATCH 08/44] chore: modify spec path --- .github/workflows/paypal-card-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 95aa7243d..fd0c219cc 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,7 +49,7 @@ jobs: build: yarn build command: yarn test:cypress install: false - spec: __tests__/test/smoke/paypalCreditCard.cy.ts + spec: "__tests__/test/smoke/paypalCreditCard.cy.ts" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From 2ff714ec937ccc9abab893b75b4be15034cebcc8 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Wed, 29 May 2024 12:32:17 +0300 Subject: [PATCH 09/44] chore: modify spec path --- .github/workflows/paypal-card-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index fd0c219cc..964b53e5c 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,7 +49,7 @@ jobs: build: yarn build command: yarn test:cypress install: false - spec: "__tests__/test/smoke/paypalCreditCard.cy.ts" + spec: "apps/web/__tests__/test/smoke/paypalCreditCard.cy.ts" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From 39d802ba3ef2b681f65204f2034429ee43e2f15e Mon Sep 17 00:00:00 2001 From: Kevin Stederoth <43753494+ksted@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:05:00 +0200 Subject: [PATCH 10/44] fix: spec path --- .github/workflows/paypal-card-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 964b53e5c..fd0c219cc 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,7 +49,7 @@ jobs: build: yarn build command: yarn test:cypress install: false - spec: "apps/web/__tests__/test/smoke/paypalCreditCard.cy.ts" + spec: "__tests__/test/smoke/paypalCreditCard.cy.ts" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From fa877bb144989fe409ca3398aa3b90cdc9e81f00 Mon Sep 17 00:00:00 2001 From: Kevin Stederoth <43753494+ksted@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:13:14 +0200 Subject: [PATCH 11/44] fix: remove command parameter Command causes other parameters to be ignored, Cypress action issue 1032 --- .github/workflows/paypal-card-test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index fd0c219cc..86cd221fc 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -47,7 +47,6 @@ jobs: uses: cypress-io/github-action@v5 with: build: yarn build - command: yarn test:cypress install: false spec: "__tests__/test/smoke/paypalCreditCard.cy.ts" env: From 1982deb56399dc59109192789fe1774532765691 Mon Sep 17 00:00:00 2001 From: Kevin Stederoth <43753494+ksted@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:19:20 +0200 Subject: [PATCH 12/44] fix: add project parameter --- .github/workflows/paypal-card-test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 86cd221fc..f53865c1d 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -48,6 +48,7 @@ jobs: with: build: yarn build install: false + project: "./apps/web" spec: "__tests__/test/smoke/paypalCreditCard.cy.ts" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} From 582307d3bb17c0213b5ec36bcfe53c5dab688283 Mon Sep 17 00:00:00 2001 From: Kevin Stederoth <43753494+ksted@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:24:29 +0200 Subject: [PATCH 13/44] fix: add start parameter --- .github/workflows/paypal-card-test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index f53865c1d..f7b3d7eab 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -48,6 +48,7 @@ jobs: with: build: yarn build install: false + start: yarn start project: "./apps/web" spec: "__tests__/test/smoke/paypalCreditCard.cy.ts" env: From 812b33b6deb10ee1df7082f579182323e9957afb Mon Sep 17 00:00:00 2001 From: Kevin Stederoth <43753494+ksted@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:29:40 +0200 Subject: [PATCH 14/44] fix: spec path --- .github/workflows/paypal-card-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index f7b3d7eab..b7f99181c 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -50,7 +50,7 @@ jobs: install: false start: yarn start project: "./apps/web" - spec: "__tests__/test/smoke/paypalCreditCard.cy.ts" + spec: "./apps/web/__tests__/test/smoke/paypalCreditCard.cy.ts" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From da9f9851a162ce1490277eaba92efe1d65c3725b Mon Sep 17 00:00:00 2001 From: Kevin Stederoth <43753494+ksted@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:35:29 +0200 Subject: [PATCH 15/44] Rename paypalCreditCard.cy.ts to paypalCreditCard.spec.cy.ts --- .../smoke/{paypalCreditCard.cy.ts => paypalCreditCard.spec.cy.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename apps/web/__tests__/test/smoke/{paypalCreditCard.cy.ts => paypalCreditCard.spec.cy.ts} (100%) diff --git a/apps/web/__tests__/test/smoke/paypalCreditCard.cy.ts b/apps/web/__tests__/test/smoke/paypalCreditCard.spec.cy.ts similarity index 100% rename from apps/web/__tests__/test/smoke/paypalCreditCard.cy.ts rename to apps/web/__tests__/test/smoke/paypalCreditCard.spec.cy.ts From d545402027b597f170d6aa6c238d2b39a0e696ba Mon Sep 17 00:00:00 2001 From: Kevin Stederoth <43753494+ksted@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:38:33 +0200 Subject: [PATCH 16/44] fix: spec path --- .github/workflows/paypal-card-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index b7f99181c..c550ea901 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -50,7 +50,7 @@ jobs: install: false start: yarn start project: "./apps/web" - spec: "./apps/web/__tests__/test/smoke/paypalCreditCard.cy.ts" + spec: "./apps/web/__tests__/test/smoke/paypalCreditCard.spec.cy.ts" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From 50c9738779f8117439a82c79e2d1110a6e45b891 Mon Sep 17 00:00:00 2001 From: Kevin Stederoth <43753494+ksted@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:44:39 +0200 Subject: [PATCH 17/44] fix: add wait-on parameter --- .github/workflows/paypal-card-test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index c550ea901..37c2eba0b 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,6 +49,7 @@ jobs: build: yarn build install: false start: yarn start + wait-on: "http://localhost:3000" project: "./apps/web" spec: "./apps/web/__tests__/test/smoke/paypalCreditCard.spec.cy.ts" env: From 107f649f2113d467ad2b8acb2117238c89405a3b Mon Sep 17 00:00:00 2001 From: doproiescu-plenty <126688988+doproiescu-plenty@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:35:11 +0300 Subject: [PATCH 18/44] Update cypress.config.ts --- apps/web/cypress.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/cypress.config.ts b/apps/web/cypress.config.ts index ef0e63ee6..8d06be351 100644 --- a/apps/web/cypress.config.ts +++ b/apps/web/cypress.config.ts @@ -16,7 +16,7 @@ export default defineConfig({ }, baseUrl: 'http://localhost:3000', specPattern: '__tests__/test/**/*.cy.{js,jsx,ts,tsx}', - excludeSpecPattern: [ '__tests__/test/smoke/paypalCreditCard.cy.ts' ], + excludeSpecPattern: ['__tests__/test/smoke/paypalCreditCard.spec.cy.ts'], supportFile: '__tests__/support/e2e.ts', retries: { runMode: 2, From a53cb10d5539c4b357b85eeb2d4dd566709e3df1 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:16:17 +0300 Subject: [PATCH 19/44] chore: modify spec location --- .github/workflows/paypal-card-test.yaml | 2 +- .../{test/smoke => standalone}/paypalCreditCard.spec.cy.ts | 0 apps/web/cypress.config.ts | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) rename apps/web/__tests__/{test/smoke => standalone}/paypalCreditCard.spec.cy.ts (100%) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 37c2eba0b..e00fd567d 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -51,7 +51,7 @@ jobs: start: yarn start wait-on: "http://localhost:3000" project: "./apps/web" - spec: "./apps/web/__tests__/test/smoke/paypalCreditCard.spec.cy.ts" + spec: "./apps/web/__tests__/standalone/paypalCreditCard.spec.cy.ts" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} diff --git a/apps/web/__tests__/test/smoke/paypalCreditCard.spec.cy.ts b/apps/web/__tests__/standalone/paypalCreditCard.spec.cy.ts similarity index 100% rename from apps/web/__tests__/test/smoke/paypalCreditCard.spec.cy.ts rename to apps/web/__tests__/standalone/paypalCreditCard.spec.cy.ts diff --git a/apps/web/cypress.config.ts b/apps/web/cypress.config.ts index 8d06be351..6bd53a40d 100644 --- a/apps/web/cypress.config.ts +++ b/apps/web/cypress.config.ts @@ -16,7 +16,6 @@ export default defineConfig({ }, baseUrl: 'http://localhost:3000', specPattern: '__tests__/test/**/*.cy.{js,jsx,ts,tsx}', - excludeSpecPattern: ['__tests__/test/smoke/paypalCreditCard.spec.cy.ts'], supportFile: '__tests__/support/e2e.ts', retries: { runMode: 2, From bdcc564b7e1520211e8c5bfb22b3384aad7b774d Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:49:28 +0300 Subject: [PATCH 20/44] chore: modify spec location --- .github/workflows/paypal-card-test.yaml | 2 +- .../standalone/paypalCreditCard.spec.cy.ts | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 apps/web/__tests__/test/standalone/paypalCreditCard.spec.cy.ts diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index e00fd567d..adad0d3d8 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -51,7 +51,7 @@ jobs: start: yarn start wait-on: "http://localhost:3000" project: "./apps/web" - spec: "./apps/web/__tests__/standalone/paypalCreditCard.spec.cy.ts" + spec: "./apps/web/__tests__/test/standalone/paypalCreditCard.spec.cy.ts" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} diff --git a/apps/web/__tests__/test/standalone/paypalCreditCard.spec.cy.ts b/apps/web/__tests__/test/standalone/paypalCreditCard.spec.cy.ts new file mode 100644 index 000000000..4f2a2eba3 --- /dev/null +++ b/apps/web/__tests__/test/standalone/paypalCreditCard.spec.cy.ts @@ -0,0 +1,39 @@ +import { CartPageObject } from '../../support/pageObjects/CartPageObject'; +import { CheckoutPageObject } from '../../support/pageObjects/CheckoutPageObject'; +import { HomePageObject } from '../../support/pageObjects/HomePageObject'; +import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject'; +import { paths } from '../../../utils/paths'; + +const checkout = new CheckoutPageObject(); +const cart = new CartPageObject(); +const homePage = new HomePageObject(); +const productListPage = new ProductListPageObject(); + +describe('Smoke: PayPal credit card order', () => { + beforeEach(() => { + cy.setCookie('vsf-locale', 'en'); + cy.setCookie('consent-cookie', '{"Essentials":{"Session":true,"Consent":true,"Session2":true},"External Media":{"Session":false,"Consent":false,"Session2":false},"Functional":{"Session":false,"Consent":false,"Session2":false},"Marketing":{"Session":false,"Consent":false,"Session2":false}}') + }); + + it('[smoke] Check if status on order gets updated when paying with paypal credit card', () => { + cy.visitAndHydrate(paths.home); + + homePage.goToCategory(); + productListPage.addToCart(); + + cart.openCart(); + checkout + .goToGuestCheckout() + .goToCheckout() + .fillContactInformationForm() + .addBillingAddress() + .fillBillingAddressForm() + .acceptTerms() + .checkCreditCard() + .placeOrderButton() + .fillCreditCardForm() + .payCreditCard() + .displaySuccessPage() + .displayFullyPaid(); + }); +}); From f8296cb804ddd65346a87ea3c754026708317d44 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:31:21 +0300 Subject: [PATCH 21/44] chore: modify spec location --- .github/workflows/paypal-card-test.yaml | 2 +- .github/workflows/tests.yaml | 2 + .../test/{ => others}/feature/cookieBar.cy.ts | 4 +- .../{ => others}/feature/languageSelect.cy.ts | 4 +- .../test/{ => others}/feature/wishlist.cy.ts | 12 +++--- .../test/{ => others}/smoke/cartPage.cy.ts | 2 +- .../{ => others}/smoke/categoryPage.cy.ts | 4 +- .../{ => others}/smoke/checkoutPage.cy.ts | 10 ++--- .../test/{ => others}/smoke/homePage.cy.ts | 4 +- .../test/{ => others}/smoke/loginPage.cy.ts | 4 +- .../{ => others}/smoke/myAccountPage.cy.ts | 4 +- .../{ => others}/smoke/passwordPage.cy.ts | 4 +- .../smoke/productDetailPage.cy.ts | 8 ++-- .../{ => others}/smoke/productListPage.cy.ts | 6 +-- .../test/{ => others}/smoke/signupPage.cy.ts | 4 +- .../test/{ => others}/unit/apiUrl.spec.ts | 2 +- .../test/{ => others}/unit/i18n.spec.ts | 6 +-- .../quarantine}/paypalCreditCard.spec.cy.ts | 0 .../standalone/paypalCreditCard.spec.cy.ts | 39 ------------------- 19 files changed, 42 insertions(+), 79 deletions(-) rename apps/web/__tests__/test/{ => others}/feature/cookieBar.cy.ts (70%) rename apps/web/__tests__/test/{ => others}/feature/languageSelect.cy.ts (88%) rename apps/web/__tests__/test/{ => others}/feature/wishlist.cy.ts (78%) rename apps/web/__tests__/test/{ => others}/smoke/cartPage.cy.ts (90%) rename apps/web/__tests__/test/{ => others}/smoke/categoryPage.cy.ts (87%) rename apps/web/__tests__/test/{ => others}/smoke/checkoutPage.cy.ts (62%) rename apps/web/__tests__/test/{ => others}/smoke/homePage.cy.ts (83%) rename apps/web/__tests__/test/{ => others}/smoke/loginPage.cy.ts (83%) rename apps/web/__tests__/test/{ => others}/smoke/myAccountPage.cy.ts (89%) rename apps/web/__tests__/test/{ => others}/smoke/passwordPage.cy.ts (82%) rename apps/web/__tests__/test/{ => others}/smoke/productDetailPage.cy.ts (56%) rename apps/web/__tests__/test/{ => others}/smoke/productListPage.cy.ts (65%) rename apps/web/__tests__/test/{ => others}/smoke/signupPage.cy.ts (62%) rename apps/web/__tests__/test/{ => others}/unit/apiUrl.spec.ts (91%) rename apps/web/__tests__/test/{ => others}/unit/i18n.spec.ts (94%) rename apps/web/__tests__/{standalone => test/quarantine}/paypalCreditCard.spec.cy.ts (100%) delete mode 100644 apps/web/__tests__/test/standalone/paypalCreditCard.spec.cy.ts diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index adad0d3d8..edc921601 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -51,7 +51,7 @@ jobs: start: yarn start wait-on: "http://localhost:3000" project: "./apps/web" - spec: "./apps/web/__tests__/test/standalone/paypalCreditCard.spec.cy.ts" + spec: "./apps/web/__tests__/test/quarantine/**.ts" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8fb0475e3..a397492d3 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -64,6 +64,8 @@ jobs: build: yarn build command: yarn test:cypress install: false + project: "./apps/web" + spec: "./apps/web/__tests__/test/others/**.ts" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} diff --git a/apps/web/__tests__/test/feature/cookieBar.cy.ts b/apps/web/__tests__/test/others/feature/cookieBar.cy.ts similarity index 70% rename from apps/web/__tests__/test/feature/cookieBar.cy.ts rename to apps/web/__tests__/test/others/feature/cookieBar.cy.ts index 8fb5f577d..8bf1e9ed2 100644 --- a/apps/web/__tests__/test/feature/cookieBar.cy.ts +++ b/apps/web/__tests__/test/others/feature/cookieBar.cy.ts @@ -1,5 +1,5 @@ -import { CookieBarObject } from '../../support/pageObjects/CookieBarObject'; -import { paths } from '../../../utils/paths'; +import { CookieBarObject } from '../../../support/pageObjects/CookieBarObject'; +import { paths } from '../../../../utils/paths'; const cookieBar = new CookieBarObject(); beforeEach(() => { diff --git a/apps/web/__tests__/test/feature/languageSelect.cy.ts b/apps/web/__tests__/test/others/feature/languageSelect.cy.ts similarity index 88% rename from apps/web/__tests__/test/feature/languageSelect.cy.ts rename to apps/web/__tests__/test/others/feature/languageSelect.cy.ts index ae865fc76..a4015c164 100644 --- a/apps/web/__tests__/test/feature/languageSelect.cy.ts +++ b/apps/web/__tests__/test/others/feature/languageSelect.cy.ts @@ -1,5 +1,5 @@ -import { LanguageSelectObject } from '../../support/pageObjects/LanguageSelectObject'; -import { paths } from '../../../utils/paths'; +import { LanguageSelectObject } from '../../../support/pageObjects/LanguageSelectObject'; +import { paths } from '../../../../utils/paths'; const languageSelect = new LanguageSelectObject(); diff --git a/apps/web/__tests__/test/feature/wishlist.cy.ts b/apps/web/__tests__/test/others/feature/wishlist.cy.ts similarity index 78% rename from apps/web/__tests__/test/feature/wishlist.cy.ts rename to apps/web/__tests__/test/others/feature/wishlist.cy.ts index 118ba588c..9ffbfb8e8 100644 --- a/apps/web/__tests__/test/feature/wishlist.cy.ts +++ b/apps/web/__tests__/test/others/feature/wishlist.cy.ts @@ -1,9 +1,9 @@ -import { paths } from '../../../utils/paths'; -import { HomePageObject } from '../../support/pageObjects/HomePageObject'; -import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject'; -import { WishlistObject } from "../../support/pageObjects/WishlistObject"; -import { CartPageObject } from "../../support/pageObjects/CartPageObject"; -import {ProductDetailPageObject} from "../../support/pageObjects/ProductDetailPageObject"; +import { paths } from '../../../../utils/paths'; +import { HomePageObject } from '../../../support/pageObjects/HomePageObject'; +import { ProductListPageObject } from '../../../support/pageObjects/ProductListPageObject'; +import { WishlistObject } from "../../../support/pageObjects/WishlistObject"; +import { CartPageObject } from "../../../support/pageObjects/CartPageObject"; +import {ProductDetailPageObject} from "../../../support/pageObjects/ProductDetailPageObject"; const homePage = new HomePageObject(); const wishlist = new WishlistObject(); diff --git a/apps/web/__tests__/test/smoke/cartPage.cy.ts b/apps/web/__tests__/test/others/smoke/cartPage.cy.ts similarity index 90% rename from apps/web/__tests__/test/smoke/cartPage.cy.ts rename to apps/web/__tests__/test/others/smoke/cartPage.cy.ts index a58c9c211..07b1c42c8 100644 --- a/apps/web/__tests__/test/smoke/cartPage.cy.ts +++ b/apps/web/__tests__/test/others/smoke/cartPage.cy.ts @@ -1,4 +1,4 @@ -import { CartPageObject } from '../../support/pageObjects/CartPageObject'; +import { CartPageObject } from '../../../support/pageObjects/CartPageObject'; const cart = new CartPageObject(); diff --git a/apps/web/__tests__/test/smoke/categoryPage.cy.ts b/apps/web/__tests__/test/others/smoke/categoryPage.cy.ts similarity index 87% rename from apps/web/__tests__/test/smoke/categoryPage.cy.ts rename to apps/web/__tests__/test/others/smoke/categoryPage.cy.ts index e5aaffd23..2598fe4b5 100644 --- a/apps/web/__tests__/test/smoke/categoryPage.cy.ts +++ b/apps/web/__tests__/test/others/smoke/categoryPage.cy.ts @@ -1,4 +1,4 @@ -import { CategoryPageObject } from '../../support/pageObjects/CategoryObject'; +import { CategoryPageObject } from '../../../support/pageObjects/CategoryObject'; const category = new CategoryPageObject(); @@ -9,7 +9,7 @@ describe('Smoke: Category Page', () => { }); it('[smoke] Category filters should trigger a product data reload', () => { - // We should configure the system so that the first category is set up with filters. + // We should configure the system so that the first category is set up with filters. // This way we are independet from the language and the url. cy.visitAndHydrate('/living-room'); diff --git a/apps/web/__tests__/test/smoke/checkoutPage.cy.ts b/apps/web/__tests__/test/others/smoke/checkoutPage.cy.ts similarity index 62% rename from apps/web/__tests__/test/smoke/checkoutPage.cy.ts rename to apps/web/__tests__/test/others/smoke/checkoutPage.cy.ts index 3f132d5a0..c7b6d3cfa 100644 --- a/apps/web/__tests__/test/smoke/checkoutPage.cy.ts +++ b/apps/web/__tests__/test/others/smoke/checkoutPage.cy.ts @@ -1,8 +1,8 @@ -import { CartPageObject } from '../../support/pageObjects/CartPageObject'; -import { CheckoutPageObject } from '../../support/pageObjects/CheckoutPageObject'; -import { HomePageObject } from '../../support/pageObjects/HomePageObject'; -import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject'; -import { paths } from '../../../utils/paths'; +import { CartPageObject } from '../../../support/pageObjects/CartPageObject'; +import { CheckoutPageObject } from '../../../support/pageObjects/CheckoutPageObject'; +import { HomePageObject } from '../../../support/pageObjects/HomePageObject'; +import { ProductListPageObject } from '../../../support/pageObjects/ProductListPageObject'; +import { paths } from '../../../../utils/paths'; const checkout = new CheckoutPageObject(); const cart = new CartPageObject(); diff --git a/apps/web/__tests__/test/smoke/homePage.cy.ts b/apps/web/__tests__/test/others/smoke/homePage.cy.ts similarity index 83% rename from apps/web/__tests__/test/smoke/homePage.cy.ts rename to apps/web/__tests__/test/others/smoke/homePage.cy.ts index 61efc9fce..dc92329c9 100644 --- a/apps/web/__tests__/test/smoke/homePage.cy.ts +++ b/apps/web/__tests__/test/others/smoke/homePage.cy.ts @@ -1,5 +1,5 @@ -import { HomePageObject } from '../../support/pageObjects/HomePageObject'; -import { paths } from '../../../utils/paths'; +import { HomePageObject } from '../../../support/pageObjects/HomePageObject'; +import { paths } from '../../../../utils/paths'; const homePage = new HomePageObject(); const locale_de = 'de'; diff --git a/apps/web/__tests__/test/smoke/loginPage.cy.ts b/apps/web/__tests__/test/others/smoke/loginPage.cy.ts similarity index 83% rename from apps/web/__tests__/test/smoke/loginPage.cy.ts rename to apps/web/__tests__/test/others/smoke/loginPage.cy.ts index 818a51362..6afacd59e 100644 --- a/apps/web/__tests__/test/smoke/loginPage.cy.ts +++ b/apps/web/__tests__/test/others/smoke/loginPage.cy.ts @@ -1,5 +1,5 @@ -import { paths } from '../../../utils/paths'; -import { LoginPageObject } from '../../support/pageObjects/LoginPageObject'; +import { paths } from '../../../../utils/paths'; +import { LoginPageObject } from '../../../support/pageObjects/LoginPageObject'; const login = new LoginPageObject(); describe('Login page check', () => { diff --git a/apps/web/__tests__/test/smoke/myAccountPage.cy.ts b/apps/web/__tests__/test/others/smoke/myAccountPage.cy.ts similarity index 89% rename from apps/web/__tests__/test/smoke/myAccountPage.cy.ts rename to apps/web/__tests__/test/others/smoke/myAccountPage.cy.ts index fec874f18..6ee3e5fad 100644 --- a/apps/web/__tests__/test/smoke/myAccountPage.cy.ts +++ b/apps/web/__tests__/test/others/smoke/myAccountPage.cy.ts @@ -1,5 +1,5 @@ -import { paths } from '../../../utils/paths'; -import { MyAccountPageObject } from '../../support/pageObjects/MyAccountPageObject'; +import { paths } from '../../../../utils/paths'; +import { MyAccountPageObject } from '../../../support/pageObjects/MyAccountPageObject'; const myAccount: MyAccountPageObject = new MyAccountPageObject(); diff --git a/apps/web/__tests__/test/smoke/passwordPage.cy.ts b/apps/web/__tests__/test/others/smoke/passwordPage.cy.ts similarity index 82% rename from apps/web/__tests__/test/smoke/passwordPage.cy.ts rename to apps/web/__tests__/test/others/smoke/passwordPage.cy.ts index c47e9bb84..72de03a6f 100644 --- a/apps/web/__tests__/test/smoke/passwordPage.cy.ts +++ b/apps/web/__tests__/test/others/smoke/passwordPage.cy.ts @@ -1,5 +1,5 @@ -import { paths } from '../../../utils/paths'; -import { PasswordPageObject } from '../../support/pageObjects/PasswordPageObject'; +import { paths } from '../../../../utils/paths'; +import { PasswordPageObject } from '../../../support/pageObjects/PasswordPageObject'; const password = new PasswordPageObject(); diff --git a/apps/web/__tests__/test/smoke/productDetailPage.cy.ts b/apps/web/__tests__/test/others/smoke/productDetailPage.cy.ts similarity index 56% rename from apps/web/__tests__/test/smoke/productDetailPage.cy.ts rename to apps/web/__tests__/test/others/smoke/productDetailPage.cy.ts index b63f83094..3c8b1c506 100644 --- a/apps/web/__tests__/test/smoke/productDetailPage.cy.ts +++ b/apps/web/__tests__/test/others/smoke/productDetailPage.cy.ts @@ -1,7 +1,7 @@ -import { ProductDetailPageObject } from '../../support/pageObjects/ProductDetailPageObject'; -import { paths } from '../../../utils/paths'; -import { HomePageObject } from '../../support/pageObjects/HomePageObject'; -import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject'; +import { ProductDetailPageObject } from '../../../support/pageObjects/ProductDetailPageObject'; +import { paths } from '../../../../utils/paths'; +import { HomePageObject } from '../../../support/pageObjects/HomePageObject'; +import { ProductListPageObject } from '../../../support/pageObjects/ProductListPageObject'; const productDetailPage = new ProductDetailPageObject(); const homePage = new HomePageObject(); diff --git a/apps/web/__tests__/test/smoke/productListPage.cy.ts b/apps/web/__tests__/test/others/smoke/productListPage.cy.ts similarity index 65% rename from apps/web/__tests__/test/smoke/productListPage.cy.ts rename to apps/web/__tests__/test/others/smoke/productListPage.cy.ts index 3495ce068..41c94e94e 100644 --- a/apps/web/__tests__/test/smoke/productListPage.cy.ts +++ b/apps/web/__tests__/test/others/smoke/productListPage.cy.ts @@ -1,6 +1,6 @@ -import { paths } from '../../../utils/paths'; -import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject'; -import { HomePageObject } from "../../support/pageObjects/HomePageObject"; +import { paths } from '../../../../utils/paths'; +import { ProductListPageObject } from '../../../support/pageObjects/ProductListPageObject'; +import { HomePageObject } from "../../../support/pageObjects/HomePageObject"; const homePage = new HomePageObject(); const productListPage = new ProductListPageObject(); diff --git a/apps/web/__tests__/test/smoke/signupPage.cy.ts b/apps/web/__tests__/test/others/smoke/signupPage.cy.ts similarity index 62% rename from apps/web/__tests__/test/smoke/signupPage.cy.ts rename to apps/web/__tests__/test/others/smoke/signupPage.cy.ts index be00a1ae5..eb3177819 100644 --- a/apps/web/__tests__/test/smoke/signupPage.cy.ts +++ b/apps/web/__tests__/test/others/smoke/signupPage.cy.ts @@ -1,5 +1,5 @@ -import { paths } from '../../../utils/paths'; -import { SignupPageObject } from '../../support/pageObjects/SignupPageObject'; +import { paths } from '../../../../utils/paths'; +import { SignupPageObject } from '../../../support/pageObjects/SignupPageObject'; const signup = new SignupPageObject(); diff --git a/apps/web/__tests__/test/unit/apiUrl.spec.ts b/apps/web/__tests__/test/others/unit/apiUrl.spec.ts similarity index 91% rename from apps/web/__tests__/test/unit/apiUrl.spec.ts rename to apps/web/__tests__/test/others/unit/apiUrl.spec.ts index 20d918fe1..9c13b1b9f 100644 --- a/apps/web/__tests__/test/unit/apiUrl.spec.ts +++ b/apps/web/__tests__/test/others/unit/apiUrl.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { validateApiUrl } from '../../../utils/pathHelper'; +import { validateApiUrl } from '../../../../utils/pathHelper'; describe('validateApiUrl function', () => { const expectedApiUrl = 'http://localhost:8181'; diff --git a/apps/web/__tests__/test/unit/i18n.spec.ts b/apps/web/__tests__/test/others/unit/i18n.spec.ts similarity index 94% rename from apps/web/__tests__/test/unit/i18n.spec.ts rename to apps/web/__tests__/test/others/unit/i18n.spec.ts index 3aedce40e..7964afe3e 100644 --- a/apps/web/__tests__/test/unit/i18n.spec.ts +++ b/apps/web/__tests__/test/others/unit/i18n.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest' -const en = require('../../../lang/en.json') -const de = require('../../../lang/de.json') +const en = require('../../../../lang/en.json') +const de = require('../../../../lang/de.json') describe('i18n', () => { it('has the same keys in English and German', () => { @@ -33,7 +33,7 @@ const haveEqualStructure = (lang1: object, lang2: object) => { const hasAllKeys = (obj1: object, obj2: object) => { const obj1WorkingCopy = structuredClone(obj1) const obj2WorkingCopy = structuredClone(obj2) - + const obj1Skeleton = setValuesToEmptyString(obj1WorkingCopy); const obj2Skeleton = setValuesToEmptyString(obj2WorkingCopy); diff --git a/apps/web/__tests__/standalone/paypalCreditCard.spec.cy.ts b/apps/web/__tests__/test/quarantine/paypalCreditCard.spec.cy.ts similarity index 100% rename from apps/web/__tests__/standalone/paypalCreditCard.spec.cy.ts rename to apps/web/__tests__/test/quarantine/paypalCreditCard.spec.cy.ts diff --git a/apps/web/__tests__/test/standalone/paypalCreditCard.spec.cy.ts b/apps/web/__tests__/test/standalone/paypalCreditCard.spec.cy.ts deleted file mode 100644 index 4f2a2eba3..000000000 --- a/apps/web/__tests__/test/standalone/paypalCreditCard.spec.cy.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { CartPageObject } from '../../support/pageObjects/CartPageObject'; -import { CheckoutPageObject } from '../../support/pageObjects/CheckoutPageObject'; -import { HomePageObject } from '../../support/pageObjects/HomePageObject'; -import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject'; -import { paths } from '../../../utils/paths'; - -const checkout = new CheckoutPageObject(); -const cart = new CartPageObject(); -const homePage = new HomePageObject(); -const productListPage = new ProductListPageObject(); - -describe('Smoke: PayPal credit card order', () => { - beforeEach(() => { - cy.setCookie('vsf-locale', 'en'); - cy.setCookie('consent-cookie', '{"Essentials":{"Session":true,"Consent":true,"Session2":true},"External Media":{"Session":false,"Consent":false,"Session2":false},"Functional":{"Session":false,"Consent":false,"Session2":false},"Marketing":{"Session":false,"Consent":false,"Session2":false}}') - }); - - it('[smoke] Check if status on order gets updated when paying with paypal credit card', () => { - cy.visitAndHydrate(paths.home); - - homePage.goToCategory(); - productListPage.addToCart(); - - cart.openCart(); - checkout - .goToGuestCheckout() - .goToCheckout() - .fillContactInformationForm() - .addBillingAddress() - .fillBillingAddressForm() - .acceptTerms() - .checkCreditCard() - .placeOrderButton() - .fillCreditCardForm() - .payCreditCard() - .displaySuccessPage() - .displayFullyPaid(); - }); -}); From 50bd3729560153964d6d99a8d231c9b9220063f8 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:43:57 +0300 Subject: [PATCH 22/44] chore: modify spec location --- .github/workflows/tests.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a397492d3..e9952e987 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -62,8 +62,9 @@ jobs: uses: cypress-io/github-action@v5 with: build: yarn build - command: yarn test:cypress install: false + start: yarn start + wait-on: "http://localhost:3000" project: "./apps/web" spec: "./apps/web/__tests__/test/others/**.ts" env: From 47bb6af79bc51ebcc29e6706a4bf900f3bacc8a5 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:50:30 +0300 Subject: [PATCH 23/44] chore: modify spec location --- .github/workflows/tests.yaml | 3 ++- .../test/{others => }/feature/cookieBar.cy.ts | 4 ++-- .../test/{others => }/feature/languageSelect.cy.ts | 4 ++-- .../test/{others => }/feature/wishlist.cy.ts | 12 ++++++------ .../__tests__/test/{others => }/smoke/cartPage.cy.ts | 2 +- .../test/{others => }/smoke/categoryPage.cy.ts | 2 +- .../test/{others => }/smoke/checkoutPage.cy.ts | 10 +++++----- .../__tests__/test/{others => }/smoke/homePage.cy.ts | 4 ++-- .../test/{others => }/smoke/loginPage.cy.ts | 4 ++-- .../test/{others => }/smoke/myAccountPage.cy.ts | 4 ++-- .../test/{others => }/smoke/passwordPage.cy.ts | 4 ++-- .../test/{others => }/smoke/productDetailPage.cy.ts | 8 ++++---- .../test/{others => }/smoke/productListPage.cy.ts | 6 +++--- .../test/{others => }/smoke/signupPage.cy.ts | 4 ++-- .../__tests__/test/{others => }/unit/apiUrl.spec.ts | 2 +- .../__tests__/test/{others => }/unit/i18n.spec.ts | 4 ++-- 16 files changed, 39 insertions(+), 38 deletions(-) rename apps/web/__tests__/test/{others => }/feature/cookieBar.cy.ts (70%) rename apps/web/__tests__/test/{others => }/feature/languageSelect.cy.ts (88%) rename apps/web/__tests__/test/{others => }/feature/wishlist.cy.ts (78%) rename apps/web/__tests__/test/{others => }/smoke/cartPage.cy.ts (90%) rename apps/web/__tests__/test/{others => }/smoke/categoryPage.cy.ts (90%) rename apps/web/__tests__/test/{others => }/smoke/checkoutPage.cy.ts (62%) rename apps/web/__tests__/test/{others => }/smoke/homePage.cy.ts (83%) rename apps/web/__tests__/test/{others => }/smoke/loginPage.cy.ts (83%) rename apps/web/__tests__/test/{others => }/smoke/myAccountPage.cy.ts (89%) rename apps/web/__tests__/test/{others => }/smoke/passwordPage.cy.ts (82%) rename apps/web/__tests__/test/{others => }/smoke/productDetailPage.cy.ts (56%) rename apps/web/__tests__/test/{others => }/smoke/productListPage.cy.ts (65%) rename apps/web/__tests__/test/{others => }/smoke/signupPage.cy.ts (62%) rename apps/web/__tests__/test/{others => }/unit/apiUrl.spec.ts (91%) rename apps/web/__tests__/test/{others => }/unit/i18n.spec.ts (94%) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e9952e987..f65cc9d62 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -66,7 +66,8 @@ jobs: start: yarn start wait-on: "http://localhost:3000" project: "./apps/web" - spec: "./apps/web/__tests__/test/others/**.ts" + spec: | + "./apps/web/__tests__/test/feature/**.ts" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} diff --git a/apps/web/__tests__/test/others/feature/cookieBar.cy.ts b/apps/web/__tests__/test/feature/cookieBar.cy.ts similarity index 70% rename from apps/web/__tests__/test/others/feature/cookieBar.cy.ts rename to apps/web/__tests__/test/feature/cookieBar.cy.ts index 8bf1e9ed2..8fb5f577d 100644 --- a/apps/web/__tests__/test/others/feature/cookieBar.cy.ts +++ b/apps/web/__tests__/test/feature/cookieBar.cy.ts @@ -1,5 +1,5 @@ -import { CookieBarObject } from '../../../support/pageObjects/CookieBarObject'; -import { paths } from '../../../../utils/paths'; +import { CookieBarObject } from '../../support/pageObjects/CookieBarObject'; +import { paths } from '../../../utils/paths'; const cookieBar = new CookieBarObject(); beforeEach(() => { diff --git a/apps/web/__tests__/test/others/feature/languageSelect.cy.ts b/apps/web/__tests__/test/feature/languageSelect.cy.ts similarity index 88% rename from apps/web/__tests__/test/others/feature/languageSelect.cy.ts rename to apps/web/__tests__/test/feature/languageSelect.cy.ts index a4015c164..ae865fc76 100644 --- a/apps/web/__tests__/test/others/feature/languageSelect.cy.ts +++ b/apps/web/__tests__/test/feature/languageSelect.cy.ts @@ -1,5 +1,5 @@ -import { LanguageSelectObject } from '../../../support/pageObjects/LanguageSelectObject'; -import { paths } from '../../../../utils/paths'; +import { LanguageSelectObject } from '../../support/pageObjects/LanguageSelectObject'; +import { paths } from '../../../utils/paths'; const languageSelect = new LanguageSelectObject(); diff --git a/apps/web/__tests__/test/others/feature/wishlist.cy.ts b/apps/web/__tests__/test/feature/wishlist.cy.ts similarity index 78% rename from apps/web/__tests__/test/others/feature/wishlist.cy.ts rename to apps/web/__tests__/test/feature/wishlist.cy.ts index 9ffbfb8e8..118ba588c 100644 --- a/apps/web/__tests__/test/others/feature/wishlist.cy.ts +++ b/apps/web/__tests__/test/feature/wishlist.cy.ts @@ -1,9 +1,9 @@ -import { paths } from '../../../../utils/paths'; -import { HomePageObject } from '../../../support/pageObjects/HomePageObject'; -import { ProductListPageObject } from '../../../support/pageObjects/ProductListPageObject'; -import { WishlistObject } from "../../../support/pageObjects/WishlistObject"; -import { CartPageObject } from "../../../support/pageObjects/CartPageObject"; -import {ProductDetailPageObject} from "../../../support/pageObjects/ProductDetailPageObject"; +import { paths } from '../../../utils/paths'; +import { HomePageObject } from '../../support/pageObjects/HomePageObject'; +import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject'; +import { WishlistObject } from "../../support/pageObjects/WishlistObject"; +import { CartPageObject } from "../../support/pageObjects/CartPageObject"; +import {ProductDetailPageObject} from "../../support/pageObjects/ProductDetailPageObject"; const homePage = new HomePageObject(); const wishlist = new WishlistObject(); diff --git a/apps/web/__tests__/test/others/smoke/cartPage.cy.ts b/apps/web/__tests__/test/smoke/cartPage.cy.ts similarity index 90% rename from apps/web/__tests__/test/others/smoke/cartPage.cy.ts rename to apps/web/__tests__/test/smoke/cartPage.cy.ts index 07b1c42c8..a58c9c211 100644 --- a/apps/web/__tests__/test/others/smoke/cartPage.cy.ts +++ b/apps/web/__tests__/test/smoke/cartPage.cy.ts @@ -1,4 +1,4 @@ -import { CartPageObject } from '../../../support/pageObjects/CartPageObject'; +import { CartPageObject } from '../../support/pageObjects/CartPageObject'; const cart = new CartPageObject(); diff --git a/apps/web/__tests__/test/others/smoke/categoryPage.cy.ts b/apps/web/__tests__/test/smoke/categoryPage.cy.ts similarity index 90% rename from apps/web/__tests__/test/others/smoke/categoryPage.cy.ts rename to apps/web/__tests__/test/smoke/categoryPage.cy.ts index 2598fe4b5..db83782ab 100644 --- a/apps/web/__tests__/test/others/smoke/categoryPage.cy.ts +++ b/apps/web/__tests__/test/smoke/categoryPage.cy.ts @@ -1,4 +1,4 @@ -import { CategoryPageObject } from '../../../support/pageObjects/CategoryObject'; +import { CategoryPageObject } from '../../support/pageObjects/CategoryObject'; const category = new CategoryPageObject(); diff --git a/apps/web/__tests__/test/others/smoke/checkoutPage.cy.ts b/apps/web/__tests__/test/smoke/checkoutPage.cy.ts similarity index 62% rename from apps/web/__tests__/test/others/smoke/checkoutPage.cy.ts rename to apps/web/__tests__/test/smoke/checkoutPage.cy.ts index c7b6d3cfa..3f132d5a0 100644 --- a/apps/web/__tests__/test/others/smoke/checkoutPage.cy.ts +++ b/apps/web/__tests__/test/smoke/checkoutPage.cy.ts @@ -1,8 +1,8 @@ -import { CartPageObject } from '../../../support/pageObjects/CartPageObject'; -import { CheckoutPageObject } from '../../../support/pageObjects/CheckoutPageObject'; -import { HomePageObject } from '../../../support/pageObjects/HomePageObject'; -import { ProductListPageObject } from '../../../support/pageObjects/ProductListPageObject'; -import { paths } from '../../../../utils/paths'; +import { CartPageObject } from '../../support/pageObjects/CartPageObject'; +import { CheckoutPageObject } from '../../support/pageObjects/CheckoutPageObject'; +import { HomePageObject } from '../../support/pageObjects/HomePageObject'; +import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject'; +import { paths } from '../../../utils/paths'; const checkout = new CheckoutPageObject(); const cart = new CartPageObject(); diff --git a/apps/web/__tests__/test/others/smoke/homePage.cy.ts b/apps/web/__tests__/test/smoke/homePage.cy.ts similarity index 83% rename from apps/web/__tests__/test/others/smoke/homePage.cy.ts rename to apps/web/__tests__/test/smoke/homePage.cy.ts index dc92329c9..61efc9fce 100644 --- a/apps/web/__tests__/test/others/smoke/homePage.cy.ts +++ b/apps/web/__tests__/test/smoke/homePage.cy.ts @@ -1,5 +1,5 @@ -import { HomePageObject } from '../../../support/pageObjects/HomePageObject'; -import { paths } from '../../../../utils/paths'; +import { HomePageObject } from '../../support/pageObjects/HomePageObject'; +import { paths } from '../../../utils/paths'; const homePage = new HomePageObject(); const locale_de = 'de'; diff --git a/apps/web/__tests__/test/others/smoke/loginPage.cy.ts b/apps/web/__tests__/test/smoke/loginPage.cy.ts similarity index 83% rename from apps/web/__tests__/test/others/smoke/loginPage.cy.ts rename to apps/web/__tests__/test/smoke/loginPage.cy.ts index 6afacd59e..818a51362 100644 --- a/apps/web/__tests__/test/others/smoke/loginPage.cy.ts +++ b/apps/web/__tests__/test/smoke/loginPage.cy.ts @@ -1,5 +1,5 @@ -import { paths } from '../../../../utils/paths'; -import { LoginPageObject } from '../../../support/pageObjects/LoginPageObject'; +import { paths } from '../../../utils/paths'; +import { LoginPageObject } from '../../support/pageObjects/LoginPageObject'; const login = new LoginPageObject(); describe('Login page check', () => { diff --git a/apps/web/__tests__/test/others/smoke/myAccountPage.cy.ts b/apps/web/__tests__/test/smoke/myAccountPage.cy.ts similarity index 89% rename from apps/web/__tests__/test/others/smoke/myAccountPage.cy.ts rename to apps/web/__tests__/test/smoke/myAccountPage.cy.ts index 6ee3e5fad..fec874f18 100644 --- a/apps/web/__tests__/test/others/smoke/myAccountPage.cy.ts +++ b/apps/web/__tests__/test/smoke/myAccountPage.cy.ts @@ -1,5 +1,5 @@ -import { paths } from '../../../../utils/paths'; -import { MyAccountPageObject } from '../../../support/pageObjects/MyAccountPageObject'; +import { paths } from '../../../utils/paths'; +import { MyAccountPageObject } from '../../support/pageObjects/MyAccountPageObject'; const myAccount: MyAccountPageObject = new MyAccountPageObject(); diff --git a/apps/web/__tests__/test/others/smoke/passwordPage.cy.ts b/apps/web/__tests__/test/smoke/passwordPage.cy.ts similarity index 82% rename from apps/web/__tests__/test/others/smoke/passwordPage.cy.ts rename to apps/web/__tests__/test/smoke/passwordPage.cy.ts index 72de03a6f..c47e9bb84 100644 --- a/apps/web/__tests__/test/others/smoke/passwordPage.cy.ts +++ b/apps/web/__tests__/test/smoke/passwordPage.cy.ts @@ -1,5 +1,5 @@ -import { paths } from '../../../../utils/paths'; -import { PasswordPageObject } from '../../../support/pageObjects/PasswordPageObject'; +import { paths } from '../../../utils/paths'; +import { PasswordPageObject } from '../../support/pageObjects/PasswordPageObject'; const password = new PasswordPageObject(); diff --git a/apps/web/__tests__/test/others/smoke/productDetailPage.cy.ts b/apps/web/__tests__/test/smoke/productDetailPage.cy.ts similarity index 56% rename from apps/web/__tests__/test/others/smoke/productDetailPage.cy.ts rename to apps/web/__tests__/test/smoke/productDetailPage.cy.ts index 3c8b1c506..b63f83094 100644 --- a/apps/web/__tests__/test/others/smoke/productDetailPage.cy.ts +++ b/apps/web/__tests__/test/smoke/productDetailPage.cy.ts @@ -1,7 +1,7 @@ -import { ProductDetailPageObject } from '../../../support/pageObjects/ProductDetailPageObject'; -import { paths } from '../../../../utils/paths'; -import { HomePageObject } from '../../../support/pageObjects/HomePageObject'; -import { ProductListPageObject } from '../../../support/pageObjects/ProductListPageObject'; +import { ProductDetailPageObject } from '../../support/pageObjects/ProductDetailPageObject'; +import { paths } from '../../../utils/paths'; +import { HomePageObject } from '../../support/pageObjects/HomePageObject'; +import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject'; const productDetailPage = new ProductDetailPageObject(); const homePage = new HomePageObject(); diff --git a/apps/web/__tests__/test/others/smoke/productListPage.cy.ts b/apps/web/__tests__/test/smoke/productListPage.cy.ts similarity index 65% rename from apps/web/__tests__/test/others/smoke/productListPage.cy.ts rename to apps/web/__tests__/test/smoke/productListPage.cy.ts index 41c94e94e..3495ce068 100644 --- a/apps/web/__tests__/test/others/smoke/productListPage.cy.ts +++ b/apps/web/__tests__/test/smoke/productListPage.cy.ts @@ -1,6 +1,6 @@ -import { paths } from '../../../../utils/paths'; -import { ProductListPageObject } from '../../../support/pageObjects/ProductListPageObject'; -import { HomePageObject } from "../../../support/pageObjects/HomePageObject"; +import { paths } from '../../../utils/paths'; +import { ProductListPageObject } from '../../support/pageObjects/ProductListPageObject'; +import { HomePageObject } from "../../support/pageObjects/HomePageObject"; const homePage = new HomePageObject(); const productListPage = new ProductListPageObject(); diff --git a/apps/web/__tests__/test/others/smoke/signupPage.cy.ts b/apps/web/__tests__/test/smoke/signupPage.cy.ts similarity index 62% rename from apps/web/__tests__/test/others/smoke/signupPage.cy.ts rename to apps/web/__tests__/test/smoke/signupPage.cy.ts index eb3177819..be00a1ae5 100644 --- a/apps/web/__tests__/test/others/smoke/signupPage.cy.ts +++ b/apps/web/__tests__/test/smoke/signupPage.cy.ts @@ -1,5 +1,5 @@ -import { paths } from '../../../../utils/paths'; -import { SignupPageObject } from '../../../support/pageObjects/SignupPageObject'; +import { paths } from '../../../utils/paths'; +import { SignupPageObject } from '../../support/pageObjects/SignupPageObject'; const signup = new SignupPageObject(); diff --git a/apps/web/__tests__/test/others/unit/apiUrl.spec.ts b/apps/web/__tests__/test/unit/apiUrl.spec.ts similarity index 91% rename from apps/web/__tests__/test/others/unit/apiUrl.spec.ts rename to apps/web/__tests__/test/unit/apiUrl.spec.ts index 9c13b1b9f..20d918fe1 100644 --- a/apps/web/__tests__/test/others/unit/apiUrl.spec.ts +++ b/apps/web/__tests__/test/unit/apiUrl.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { validateApiUrl } from '../../../../utils/pathHelper'; +import { validateApiUrl } from '../../../utils/pathHelper'; describe('validateApiUrl function', () => { const expectedApiUrl = 'http://localhost:8181'; diff --git a/apps/web/__tests__/test/others/unit/i18n.spec.ts b/apps/web/__tests__/test/unit/i18n.spec.ts similarity index 94% rename from apps/web/__tests__/test/others/unit/i18n.spec.ts rename to apps/web/__tests__/test/unit/i18n.spec.ts index 7964afe3e..c134325d2 100644 --- a/apps/web/__tests__/test/others/unit/i18n.spec.ts +++ b/apps/web/__tests__/test/unit/i18n.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest' -const en = require('../../../../lang/en.json') -const de = require('../../../../lang/de.json') +const en = require('../../../lang/en.json') +const de = require('../../../lang/de.json') describe('i18n', () => { it('has the same keys in English and German', () => { From 5861a781ded90f14e4a91539debe3b9a3224fd15 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:55:29 +0300 Subject: [PATCH 24/44] chore: modify spec location --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f65cc9d62..cd0fcefff 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -67,7 +67,7 @@ jobs: wait-on: "http://localhost:3000" project: "./apps/web" spec: | - "./apps/web/__tests__/test/feature/**.ts" + /apps/web/__tests__/test/feature/**.ts env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From 654d3ae09601568961d46b4e84363bfb2314b121 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:55:38 +0300 Subject: [PATCH 25/44] chore: modify spec location --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index cd0fcefff..5af5e3dc7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -67,7 +67,7 @@ jobs: wait-on: "http://localhost:3000" project: "./apps/web" spec: | - /apps/web/__tests__/test/feature/**.ts + apps/web/__tests__/test/feature/**.ts env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From d007737210c648a8c61eb13267ef70f9fb4abcd5 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:02:01 +0300 Subject: [PATCH 26/44] chore: modify spec regex --- .github/workflows/paypal-card-test.yaml | 2 +- .github/workflows/tests.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index edc921601..cdf94cf99 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -51,7 +51,7 @@ jobs: start: yarn start wait-on: "http://localhost:3000" project: "./apps/web" - spec: "./apps/web/__tests__/test/quarantine/**.ts" + spec: "./apps/web/__tests__/test/quarantine/*.cy.{js,jsx,ts,tsx}" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5af5e3dc7..5431c8388 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -67,7 +67,8 @@ jobs: wait-on: "http://localhost:3000" project: "./apps/web" spec: | - apps/web/__tests__/test/feature/**.ts + apps/web/__tests__/test/feature/*.cy.{js,jsx,ts,tsx} + apps/web/__tests__/test/smoke/*.cy.{js,jsx,ts,tsx} env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From 9d454fa781586ff77f82b27816e45617f2546e9e Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:03:11 +0300 Subject: [PATCH 27/44] chore: changelog --- docs/changelog/changelog_en.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changelog/changelog_en.md b/docs/changelog/changelog_en.md index 1129ac11b..59db41487 100644 --- a/docs/changelog/changelog_en.md +++ b/docs/changelog/changelog_en.md @@ -14,6 +14,8 @@ ### Changed +- Moved paypal credit card test into quarantine folder. + ## v1.4.1 (2024-06-05) Overview of all changes ### New From 804330893990ed48fcfd371de3ada1284c39cee5 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:21:05 +0300 Subject: [PATCH 28/44] chore: changelog --- .github/workflows/paypal-card-test.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index cdf94cf99..2ccd2885e 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -1,8 +1,9 @@ name: Paypal Card Test on: - workflow_dispatch: - pull_request: + push: + branches: + - main permissions: contents: read From 2c9f4356e7a22f4eae7501776bc080d0e4bfbec7 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 11:27:44 +0300 Subject: [PATCH 29/44] chore: tests actions start --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5431c8388..ef16c8871 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -63,7 +63,7 @@ jobs: with: build: yarn build install: false - start: yarn start + start: yarn dev wait-on: "http://localhost:3000" project: "./apps/web" spec: | From e7dcee12fa996248fb346cf4eb8928a06eeeaedd Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:08:11 +0300 Subject: [PATCH 30/44] chore: tests actions start --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ef16c8871..5431c8388 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -63,7 +63,7 @@ jobs: with: build: yarn build install: false - start: yarn dev + start: yarn start wait-on: "http://localhost:3000" project: "./apps/web" spec: | From 13fb4ab1f309e6d832b2080b2a8cf98c1fbc9dc3 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:14:40 +0300 Subject: [PATCH 31/44] chore: tests actions start --- .github/workflows/paypal-card-test.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 2ccd2885e..5bfcdbb7b 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,10 +49,7 @@ jobs: with: build: yarn build install: false - start: yarn start - wait-on: "http://localhost:3000" - project: "./apps/web" - spec: "./apps/web/__tests__/test/quarantine/*.cy.{js,jsx,ts,tsx}" + command: yarn test:cypress env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From b064fe4ca7ae53409caa2ef99da9fdf641813a69 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:30:14 +0300 Subject: [PATCH 32/44] chore: tests actions start --- .github/workflows/paypal-card-test.yaml | 5 ++++- .github/workflows/tests.yaml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 5bfcdbb7b..2ccd2885e 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,7 +49,10 @@ jobs: with: build: yarn build install: false - command: yarn test:cypress + start: yarn start + wait-on: "http://localhost:3000" + project: "./apps/web" + spec: "./apps/web/__tests__/test/quarantine/*.cy.{js,jsx,ts,tsx}" env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5431c8388..c2a6af4bc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -67,6 +67,7 @@ jobs: wait-on: "http://localhost:3000" project: "./apps/web" spec: | + apps/web/__tests__/test/unit/*.cy.{js,jsx,ts,tsx} apps/web/__tests__/test/feature/*.cy.{js,jsx,ts,tsx} apps/web/__tests__/test/smoke/*.cy.{js,jsx,ts,tsx} env: From 72ba32889b3346718d0acb267a988432d5be2e16 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:39:24 +0300 Subject: [PATCH 33/44] chore: revert action --- .github/workflows/tests.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c2a6af4bc..2cf64f443 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -63,13 +63,7 @@ jobs: with: build: yarn build install: false - start: yarn start - wait-on: "http://localhost:3000" - project: "./apps/web" - spec: | - apps/web/__tests__/test/unit/*.cy.{js,jsx,ts,tsx} - apps/web/__tests__/test/feature/*.cy.{js,jsx,ts,tsx} - apps/web/__tests__/test/smoke/*.cy.{js,jsx,ts,tsx} + command: yarn test:cypress env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From 65f4ff7ea9ebe1ffaf520a79f96b7e9379d9d42f Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:57:26 +0300 Subject: [PATCH 34/44] chore: e2e action --- .github/workflows/tests.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2cf64f443..c2a6af4bc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -63,7 +63,13 @@ jobs: with: build: yarn build install: false - command: yarn test:cypress + start: yarn start + wait-on: "http://localhost:3000" + project: "./apps/web" + spec: | + apps/web/__tests__/test/unit/*.cy.{js,jsx,ts,tsx} + apps/web/__tests__/test/feature/*.cy.{js,jsx,ts,tsx} + apps/web/__tests__/test/smoke/*.cy.{js,jsx,ts,tsx} env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From 15903491b81c1bfcb0e6a899edfebd03810bd0cd Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:44:42 +0300 Subject: [PATCH 35/44] chore: e2e action --- .github/workflows/tests.yaml | 4 +--- apps/web/package.json | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c2a6af4bc..ed36a069c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -63,9 +63,7 @@ jobs: with: build: yarn build install: false - start: yarn start - wait-on: "http://localhost:3000" - project: "./apps/web" + command: yarn test:cypress spec: | apps/web/__tests__/test/unit/*.cy.{js,jsx,ts,tsx} apps/web/__tests__/test/feature/*.cy.{js,jsx,ts,tsx} diff --git a/apps/web/package.json b/apps/web/package.json index 6ef66ca40..fabb44b7b 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -19,7 +19,7 @@ "test": "vitest run", "test:coverage": "vitest run --coverage", "test:watch": "vitest", - "test:cypress": "cypress run --browser chrome --headless", + "test:cypress": "cypress run --browser chrome --headless --spec 'apps/web/__tests__/test/feature/*.cy.{js,jsx,ts,tsx},apps/web/__tests__/test/smoke/*.cy.{js,jsx,ts,tsx}'", "test:cypress-dev": "cypress open --e2e" }, "dependencies": { From d098ca39773355e102505da6b3a2ada75e935e53 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:44:54 +0300 Subject: [PATCH 36/44] chore: e2e action --- .github/workflows/tests.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ed36a069c..2cf64f443 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -64,10 +64,6 @@ jobs: build: yarn build install: false command: yarn test:cypress - spec: | - apps/web/__tests__/test/unit/*.cy.{js,jsx,ts,tsx} - apps/web/__tests__/test/feature/*.cy.{js,jsx,ts,tsx} - apps/web/__tests__/test/smoke/*.cy.{js,jsx,ts,tsx} env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} From fbca055add46d6c76dc11b2f12519816c57b321f Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:53:12 +0300 Subject: [PATCH 37/44] chore: e2e action --- apps/web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/package.json b/apps/web/package.json index fabb44b7b..4a69f6973 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -19,7 +19,7 @@ "test": "vitest run", "test:coverage": "vitest run --coverage", "test:watch": "vitest", - "test:cypress": "cypress run --browser chrome --headless --spec 'apps/web/__tests__/test/feature/*.cy.{js,jsx,ts,tsx},apps/web/__tests__/test/smoke/*.cy.{js,jsx,ts,tsx}'", + "test:cypress": "cypress run --browser chrome --headless --spec '__tests__/test/feature/*.cy.{js,jsx,ts,tsx},__tests__/test/smoke/*.cy.{js,jsx,ts,tsx}'", "test:cypress-dev": "cypress open --e2e" }, "dependencies": { From 0226759a3eceb719fb076afadb18632a847eaa22 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:54:08 +0300 Subject: [PATCH 38/44] chore: e2e action --- .github/workflows/paypal-card-test.yaml | 5 +---- apps/web/package.json | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 2ccd2885e..028f8448e 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -49,10 +49,7 @@ jobs: with: build: yarn build install: false - start: yarn start - wait-on: "http://localhost:3000" - project: "./apps/web" - spec: "./apps/web/__tests__/test/quarantine/*.cy.{js,jsx,ts,tsx}" + command: yarn test:cypress-quarantine env: PAYPAL_EMAIL: ${{ secrets.PAYPAL_EMAIL }} PAYPAL_PASSWORD: ${{ secrets.PAYPAL_PASSWORD }} diff --git a/apps/web/package.json b/apps/web/package.json index 4a69f6973..eacfd3bae 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -19,6 +19,7 @@ "test": "vitest run", "test:coverage": "vitest run --coverage", "test:watch": "vitest", + "test:cypress-quarantine": "cypress run --browser chrome --headless --spec '__tests__/test/quarantine/*.cy.{js,jsx,ts,tsx}'", "test:cypress": "cypress run --browser chrome --headless --spec '__tests__/test/feature/*.cy.{js,jsx,ts,tsx},__tests__/test/smoke/*.cy.{js,jsx,ts,tsx}'", "test:cypress-dev": "cypress open --e2e" }, From 698c644bbeec03aaf27e4eb024df02ff7c2f84b6 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 15:48:22 +0300 Subject: [PATCH 39/44] chore: test paypal credit card action --- .github/workflows/paypal-card-test.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 028f8448e..13b184879 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -1,9 +1,8 @@ name: Paypal Card Test on: - push: - branches: - - main + workflow_dispatch: + pull_request: permissions: contents: read From d9ed34660273227d5cef4a86602aee5284829a2f Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:00:53 +0300 Subject: [PATCH 40/44] chore: test paypal credit card action --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 5c80e57c6..6ece4676b 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "test": "yarn turbo:disable-telemetry && turbo run test", "test:watch": "yarn turbo:disable-telemetry && turbo run test:watch", "test:coverage": "yarn turbo:disable-telemetry && npx turbo run test:coverage", + "test:cypress-quarantine": "concurrently -k -s=first \"yarn wait-on http-get://localhost:3000 && yarn turbo:disable-telemetry && turbo run test:cypress-quarantine\" \"yarn start\"", "test:cypress": "concurrently -k -s=first \"yarn wait-on http-get://localhost:3000 && yarn turbo:disable-telemetry && turbo run test:cypress\" \"yarn start\"", "test:cypress-dev": "concurrently -k -s=first \"yarn wait-on http-get://localhost:3000 && yarn turbo:disable-telemetry && turbo run test:cypress-dev\" \"yarn dev\"", "lhci:mobile": "lhci autorun" From 3253de021b0ae8303de912733e054be8d8ecdbdf Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:27:42 +0300 Subject: [PATCH 41/44] chore: test paypal credit card action --- turbo.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/turbo.json b/turbo.json index 67642f024..99666c58a 100644 --- a/turbo.json +++ b/turbo.json @@ -41,6 +41,9 @@ "test:watch": { "cache": false }, + "test:cypress-quarantine": { + "cache": false + }, "test:cypress": { "cache": false }, From e615a507e185da4351f28a01962623cb22696816 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:52:36 +0300 Subject: [PATCH 42/44] chore: added unit tests to paypal card action --- .github/workflows/paypal-card-test.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 13b184879..8845f1844 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -43,6 +43,21 @@ jobs: - name: Install Dependencies run: yarn --immutable + - name: Unit tests + run: | + touch apps/web/.env + cat <> apps/web/.env + API_SECURITY_TOKEN=${{ secrets.API_SECURITY_TOKEN }} + API_ENDPOINT=https://mevofvd5omld.c01-14.plentymarkets.com + CLOUDFLARE_TURNSTILE_SITE_KEY="0x4AAAAAAANx3aXDh7UR35x0" >> apps/web/.env + ${{ vars.CONFIG }} + EOT + pushd ${{ github.workspace }}/apps/server/ + yarn start & + pushd ${{ github.workspace }}/apps/web/ + yarn test:coverage + pushd -0 && dirs -c + - name: E2E tests uses: cypress-io/github-action@v5 with: From 231613d4253afeecbe0d1a6f238b0347605807dc Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Tue, 11 Jun 2024 17:00:55 +0300 Subject: [PATCH 43/44] chore: set environment file separately from unit tests --- .github/workflows/paypal-card-test.yaml | 7 +------ .github/workflows/tests.yaml | 5 ++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/paypal-card-test.yaml index 8845f1844..c135182dd 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/paypal-card-test.yaml @@ -43,7 +43,7 @@ jobs: - name: Install Dependencies run: yarn --immutable - - name: Unit tests + - name: Set environment run: | touch apps/web/.env cat <> apps/web/.env @@ -52,11 +52,6 @@ jobs: CLOUDFLARE_TURNSTILE_SITE_KEY="0x4AAAAAAANx3aXDh7UR35x0" >> apps/web/.env ${{ vars.CONFIG }} EOT - pushd ${{ github.workspace }}/apps/server/ - yarn start & - pushd ${{ github.workspace }}/apps/web/ - yarn test:coverage - pushd -0 && dirs -c - name: E2E tests uses: cypress-io/github-action@v5 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2cf64f443..db856fa35 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -43,7 +43,7 @@ jobs: - name: Install Dependencies run: yarn --immutable - - name: Unit tests + - name: Set environment run: | touch apps/web/.env cat <> apps/web/.env @@ -52,6 +52,9 @@ jobs: CLOUDFLARE_TURNSTILE_SITE_KEY="0x4AAAAAAANx3aXDh7UR35x0" >> apps/web/.env ${{ vars.CONFIG }} EOT + + - name: Unit tests + run: | pushd ${{ github.workspace }}/apps/server/ yarn start & pushd ${{ github.workspace }}/apps/web/ From 9e667e69b5adb3af1f82c2ba2690f9aa3f56e197 Mon Sep 17 00:00:00 2001 From: abocsan-plenty <129151096+abocsan-plenty@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:51:56 +0300 Subject: [PATCH 44/44] chore: renaming of action --- .../{paypal-card-test.yaml => quarantine-tests.yaml} | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename .github/workflows/{paypal-card-test.yaml => quarantine-tests.yaml} (96%) diff --git a/.github/workflows/paypal-card-test.yaml b/.github/workflows/quarantine-tests.yaml similarity index 96% rename from .github/workflows/paypal-card-test.yaml rename to .github/workflows/quarantine-tests.yaml index c135182dd..83673eb39 100644 --- a/.github/workflows/paypal-card-test.yaml +++ b/.github/workflows/quarantine-tests.yaml @@ -1,15 +1,16 @@ -name: Paypal Card Test +name: Quarantine Tests on: - workflow_dispatch: - pull_request: + push: + branches: + - main permissions: contents: read packages: read jobs: - tests: + quarantine tests: runs-on: ubuntu-latest steps: