Skip to content

Commit

Permalink
Migrate testcafe to playwright - phase 1 (#2930)
Browse files Browse the repository at this point in the history
* test(e2e): card avs

* wip run with storybook build

* run storybook in the adyen-web-server

* test(address): added tests for post code validation

* test: added tests for setup session and CheckoutSession class

* test(binlookup): added unit tests

* refactor: fix tests

* refactor: increase size limit

* refactor: added more tests

* update version

* refactor: fix some commented out tests

* refactor: enable test

* Adding comment about new location of migrated tests

* refactor: enable test

* refactor: enable test

* refactor: update yarn.lock file

---------

Co-authored-by: guilhermer <[email protected]>
Co-authored-by: nicholas <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2024
1 parent 1541573 commit 52fe294
Show file tree
Hide file tree
Showing 367 changed files with 7,408 additions and 15,226 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@adyen/adyen-web-e2e","@adyen/adyen-web-playwright","@adyen/adyen-web-playground","@adyen/adyen-web-server"]
"ignore": ["@adyen/adyen-web-playwright","@adyen/adyen-web-playground","@adyen/adyen-web-server"]
}
21 changes: 9 additions & 12 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@ jobs:
fail-fast: false
matrix:
node-version: [20.12.2]
api-version: ["v68", "v69", "v70", "v71"]
api-version: ["v69", "v70", "v71"]
# node-version: [16.x, 18.x, 19.x]
# Currently 18 and 19 are not supported, still keeping it
# as a reminder for compatibility check
env:
CHECKOUT_API_KEY: ${{secrets.ADYEN_CHECKOUT_API_KEY}}
MERCHANT_ACCOUNT: ${{secrets.ADYEN_CHECKOUT_MERCHANT_ACCOUNT}}
CLIENT_KEY: ${{secrets.ADYEN_CHECKOUT_CLIENT_KEY}}
CLIENT_ENV: test
TESTING_ENVIRONMENT: https://checkout-test.adyen.com/checkout/${{matrix.api-version}}
API_VERSION: ${{matrix.api-version}}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -26,21 +33,11 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install Project Dependencies
run: yarn install
- name: Build Project
run: yarn build
- name: Install Playwright Dependencies
working-directory: packages/e2e-playwright/
run: yarn install && npx playwright install --with-deps
- name: Run E2E Tests
working-directory: packages/e2e-playwright/
run: yarn test:headless
env:
CHECKOUT_API_KEY: ${{secrets.ADYEN_CHECKOUT_API_KEY}}
MERCHANT_ACCOUNT: ${{secrets.ADYEN_CHECKOUT_MERCHANT_ACCOUNT}}
CLIENT_KEY: ${{secrets.ADYEN_CHECKOUT_CLIENT_KEY}}
CLIENT_ENV: test
TESTING_ENVIRONMENT: https://checkout-test.adyen.com/checkout/${{matrix.api-version}}
API_VERSION: ${{matrix.api-version}}
run: yarn test:e2e
- name: Archive test result artifacts
if: always()
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
],
"scripts": {
"start": "concurrently --kill-others-on-fail \"yarn workspace @adyen/adyen-web start\" \"yarn workspace @adyen/adyen-web-playground start\" --names \"lib,playground\"",
"build": "yarn workspace @adyen/adyen-web build",
"start:storybook": "yarn workspace @adyen/adyen-web start:storybook",
"start:prod-storybook": "yarn workspace @adyen/adyen-web-server start:storybook",
"build": "yarn workspace @adyen/adyen-web build",
"build:storybook": "yarn workspace @adyen/adyen-web build:storybook",
"format": "yarn workspace @adyen/adyen-web format",
"lint": "yarn workspace @adyen/adyen-web lint",
"test": "yarn workspace @adyen/adyen-web test",
"test:watch": "yarn workspace @adyen/adyen-web test:watch",
"test:coverage": "yarn workspace @adyen/adyen-web test:coverage",
"test:e2e": "yarn build && yarn workspace @adyen/adyen-web-playwright test:headless",
"test:e2e-testcafe": "yarn build && yarn workspace @adyen/adyen-web-e2e test:e2e",
"test:e2e": "yarn workspace @adyen/adyen-web-playwright test:headless",
"type-check": "yarn workspace @adyen/adyen-web type-check",
"prepare": "yarn workspace @adyen/adyen-web prepare",
"changeset": "changeset",
Expand Down
3 changes: 0 additions & 3 deletions packages/e2e-playwright/app/config/postcss.config.js

This file was deleted.

116 changes: 0 additions & 116 deletions packages/e2e-playwright/app/config/webpack.config.js

This file was deleted.

81 changes: 0 additions & 81 deletions packages/e2e-playwright/app/src/handlers.js

This file was deleted.

31 changes: 0 additions & 31 deletions packages/e2e-playwright/app/src/pages/ANCV/ANCV.html

This file was deleted.

44 changes: 0 additions & 44 deletions packages/e2e-playwright/app/src/pages/ANCV/ANCV.js

This file was deleted.

31 changes: 0 additions & 31 deletions packages/e2e-playwright/app/src/pages/Cards/Cards.html

This file was deleted.

Loading

0 comments on commit 52fe294

Please sign in to comment.