diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 78af989b7a..660bce7abc 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -17,7 +17,7 @@ on: jobs: pytest: - uses: hotosm/gh-workflows/.github/workflows/test_compose.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/test_compose.yml@1.5.0 with: image_name: ghcr.io/${{ github.repository }}/backend build_context: src/backend @@ -29,12 +29,12 @@ jobs: secrets: inherit frontend-tests: - uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@1.5.0 with: working_dir: src/frontend backend-build: - uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.0 needs: [pytest] with: context: src/backend @@ -42,7 +42,7 @@ jobs: image_name: ghcr.io/${{ github.repository }}/backend frontend-build: - uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.0 needs: [frontend-tests] with: context: src/frontend @@ -152,7 +152,7 @@ jobs: needs: - smoke-test-backend - smoke-test-frontend - uses: hotosm/gh-workflows/.github/workflows/remote_deploy.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/remote_deploy.yml@1.5.0 with: environment: ${{ github.ref_name }} docker_compose_file: "docker-compose.${{ github.ref_name }}.yml" diff --git a/.github/workflows/build_ci_img.yml b/.github/workflows/build_ci_img.yml index dbec5afffc..b4db437f17 100644 --- a/.github/workflows/build_ci_img.yml +++ b/.github/workflows/build_ci_img.yml @@ -16,7 +16,7 @@ on: jobs: backend-ci-build: - uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.0 with: context: src/backend build_target: ci diff --git a/.github/workflows/build_odk_imgs.yml b/.github/workflows/build_odk_imgs.yml index c9ca34aabd..7c2ad35bf5 100644 --- a/.github/workflows/build_odk_imgs.yml +++ b/.github/workflows/build_odk_imgs.yml @@ -13,7 +13,7 @@ on: jobs: build-odkcentral: - uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.0 with: context: odkcentral/api image_tags: | @@ -26,7 +26,7 @@ jobs: # multi_arch: true build-odkcentral-ui: - uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.0 with: context: odkcentral/ui image_tags: | diff --git a/.github/workflows/build_proxy_imgs.yml b/.github/workflows/build_proxy_imgs.yml index facedf40c4..85626241e7 100644 --- a/.github/workflows/build_proxy_imgs.yml +++ b/.github/workflows/build_proxy_imgs.yml @@ -10,7 +10,7 @@ on: jobs: build-cert-init-main: - uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.0 with: context: nginx build_target: certs-init-main @@ -21,7 +21,7 @@ jobs: multi_arch: true build-cert-init-dev: - uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.0 with: context: nginx build_target: certs-init-development @@ -33,7 +33,7 @@ jobs: multi_arch: true build-proxy-main: - uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.0 with: context: nginx build_target: main @@ -44,7 +44,7 @@ jobs: multi_arch: true build-proxy-dev: - uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.0 with: context: nginx build_target: development diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 95f28b450c..c31c122e03 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,19 +12,19 @@ on: jobs: build_doxygen: - uses: hotosm/gh-workflows/.github/workflows/doxygen_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/doxygen_build.yml@1.5.0 with: output_path: docs/apidocs build_openapi_json: - uses: hotosm/gh-workflows/.github/workflows/openapi_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/openapi_build.yml@1.5.0 with: image: ghcr.io/${{ github.repository }}/backend:ci-${{ github.ref_name }} example_env_file_path: ".env.example" output_path: docs/openapi.json publish_docs: - uses: hotosm/gh-workflows/.github/workflows/mkdocs_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/mkdocs_build.yml@1.5.0 needs: - build_doxygen - build_openapi_json diff --git a/.github/workflows/pr_test_backend.yml b/.github/workflows/pr_test_backend.yml index db245159e1..1f56d68cec 100644 --- a/.github/workflows/pr_test_backend.yml +++ b/.github/workflows/pr_test_backend.yml @@ -14,7 +14,7 @@ on: jobs: pytest: - uses: hotosm/gh-workflows/.github/workflows/test_compose.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/test_compose.yml@1.5.0 with: image_name: ghcr.io/${{ github.repository }}/backend build_context: src/backend diff --git a/.github/workflows/pr_test_frontend.yml b/.github/workflows/pr_test_frontend.yml index 33cbba1daa..10edd0b065 100644 --- a/.github/workflows/pr_test_frontend.yml +++ b/.github/workflows/pr_test_frontend.yml @@ -13,7 +13,14 @@ on: workflow_dispatch: jobs: - frontend-tests: - uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@1.4.10 + unit-tests: + uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@1.5.0 with: working_dir: src/frontend + + e2e-tests: + uses: hotosm/gh-workflows/.github/workflows/test_pnpm.yml@main + with: + container_config: '{"image": "mcr.microsoft.com/playwright:v1.43.0"}' + working_dir: src/frontend + run_command: "test:e2e" diff --git a/.github/workflows/tag_build.yml b/.github/workflows/tag_build.yml index 42a5499d06..a1a785dcb0 100644 --- a/.github/workflows/tag_build.yml +++ b/.github/workflows/tag_build.yml @@ -9,7 +9,7 @@ on: jobs: backend-build: - uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/image_build.yml@1.5.0 with: context: src/backend build_target: prod diff --git a/.github/workflows/wiki.yml b/.github/workflows/wiki.yml index f5ee8df1a2..178a98dc80 100644 --- a/.github/workflows/wiki.yml +++ b/.github/workflows/wiki.yml @@ -10,6 +10,6 @@ on: jobs: publish-docs-to-wiki: - uses: hotosm/gh-workflows/.github/workflows/wiki.yml@1.4.10 + uses: hotosm/gh-workflows/.github/workflows/wiki.yml@1.5.0 with: homepage_path: "wiki_redirect.md" diff --git a/Justfile b/Justfile index 46797ffc37..0b01a5bdc7 100644 --- a/Justfile +++ b/Justfile @@ -52,7 +52,7 @@ test-backend: docker compose run --rm api pytest test-frontend: - docker compose run -e CI=True --rm --entrypoint='sh -c' ui 'npm run test' + docker compose run --rm ui-test test: test-backend test-frontend diff --git a/docker-compose.yml b/docker-compose.yml index 579c809f09..c4f9a759f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -129,6 +129,20 @@ services: - fmtm-net restart: "unless-stopped" + ui-test: + profiles: ["ui-test"] + image: mcr.microsoft.com/playwright:v1.43.0 + working_dir: /app + environment: + - DISPLAY=:0 + volumes: + - ./src/frontend:/app + - /tmp/.X11-unix:/tmp/.X11-unix + command: npm run test:e2e + networks: + - fmtm-net + restart: "never" + central: profiles: ["", "central"] image: "ghcr.io/hotosm/fmtm/odkcentral:${ODK_CENTRAL_TAG:-v2023.5.0}" diff --git a/docs/dev/Frontend.md b/docs/dev/Frontend.md index f52c322791..a74f1038a5 100644 --- a/docs/dev/Frontend.md +++ b/docs/dev/Frontend.md @@ -64,10 +64,17 @@ directory. Then add a new entry to the `src/frontend/router.tsx` file. To add a new component, create a new .tsx file in the src/frontend/ components directory. -## Conclusion +## Frontend Testing -Running the FMTM project is easy with Docker. You can also run the -project locally outside of Docker, but it requires more setup. The -frontend is built with React and Typescript, and the backend is built -with FastAPI. Use the tips provided to customize and extend the -functionality of the project. +To run the frontend tests locally, run: + +```bash +docker compose run --rm ui-test +``` + +To run the FMTM UI for interactive testing, run: + +```bash +docker compose up -d +docker compose run --rm ui-test npx -y playwright open http://ui:7051 +``` diff --git a/src/frontend/.github/workflows/playwright.yml b/src/frontend/.github/workflows/playwright.yml deleted file mode 100644 index cd56f8924c..0000000000 --- a/src/frontend/.github/workflows/playwright.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Playwright Tests -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] -jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test - - uses: actions/upload-artifact@v4 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 diff --git a/src/frontend/package.json b/src/frontend/package.json index 9c2fdf5fb4..2a82a88906 100755 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -8,9 +8,10 @@ "start": "env-cmd -f .env.dev vite dev", "start:live": "vite dev", "test": "vitest", - "test:watch": "vitest --watch", - "test:ui": "vitest --ui", + "test:unit": "vitest", "test:coverage": "vitest --coverage", + "test:e2e": "playwright test", + "test:install-deps": "playwright install-deps", "lint": "eslint --fix --ext .js,.jsx,.ts,.tsx src" }, "license": "GPL-3.0-only", diff --git a/src/frontend/tests-examples/demo-todo-app.spec.ts b/src/frontend/playwright-tests-examples/demo-todo-app.spec.ts similarity index 100% rename from src/frontend/tests-examples/demo-todo-app.spec.ts rename to src/frontend/playwright-tests-examples/demo-todo-app.spec.ts diff --git a/src/frontend/pnpm-lock.yaml b/src/frontend/pnpm-lock.yaml index 046b40899d..a88436c486 100644 --- a/src/frontend/pnpm-lock.yaml +++ b/src/frontend/pnpm-lock.yaml @@ -205,12 +205,18 @@ dependencies: version: 9.0.1 devDependencies: + '@playwright/test': + specifier: ^1.43.0 + version: 1.43.0 '@testing-library/jest-dom': specifier: ^6.1.3 version: 6.1.3(@types/jest@29.5.5)(vitest@0.34.6) '@testing-library/react': specifier: ^12.1.5 version: 12.1.5(react-dom@17.0.2)(react@17.0.2) + '@types/node': + specifier: ^20.12.5 + version: 20.12.7 '@types/react': specifier: ^17.0.2 version: 17.0.67 @@ -273,7 +279,7 @@ devDependencies: version: 4.9.5 vite: specifier: ^4.4.11 - version: 4.4.11(@types/node@20.8.3)(sass@1.69.0) + version: 4.4.11(@types/node@20.12.7)(sass@1.69.0) vite-plugin-pwa: specifier: ^0.16.5 version: 0.16.5(vite@4.4.11)(workbox-build@7.0.0)(workbox-window@7.0.0) @@ -1937,7 +1943,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.8.3 + '@types/node': 20.12.7 jest-mock: 29.7.0 dev: true @@ -1953,7 +1959,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.8.3 + '@types/node': 20.12.7 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -1972,7 +1978,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.2 - '@types/node': 20.8.3 + '@types/node': 20.12.7 '@types/yargs': 17.0.28 chalk: 4.1.2 @@ -2281,6 +2287,14 @@ packages: tslib: 2.6.2 dev: false + /@playwright/test@1.43.0: + resolution: {integrity: sha512-Ebw0+MCqoYflop7wVKj711ccbNlrwTBCtjY5rlbiY9kHL2bCYxq+qltK6uPsVBGGAOb033H2VO0YobcQVxoW7Q==} + engines: {node: '>=16'} + hasBin: true + dependencies: + playwright: 1.43.0 + dev: true + /@popperjs/core@2.11.8: resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} dev: false @@ -3729,7 +3743,7 @@ packages: /@types/jsdom@20.0.1: resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} dependencies: - '@types/node': 20.8.3 + '@types/node': 20.12.7 '@types/tough-cookie': 4.0.3 parse5: 7.1.2 dev: true @@ -3747,8 +3761,10 @@ packages: '@types/geojson': 7946.0.14 dev: false - /@types/node@20.8.3: - resolution: {integrity: sha512-jxiZQFpb+NlH5kjW49vXxvxTjeeqlbsnTAdBTKpzEdPs9itay7MscYXz3Fo9VYFEsfQ6LJFitHad3faerLAjCw==} + /@types/node@20.12.7: + resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==} + dependencies: + undici-types: 5.26.5 /@types/object.omit@3.0.3: resolution: {integrity: sha512-xrq4bQTBGYY2cw+gV4PzoG2Lv3L0pjZ1uXStRRDQoATOYW1lCsFQHhQ+OkPhIcQoqLjAq7gYif7D14Qaa6Zbew==} @@ -3785,7 +3801,7 @@ packages: /@types/resolve@1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 20.8.3 + '@types/node': 20.12.7 dev: true /@types/scheduler@0.16.4: @@ -3959,7 +3975,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.23.0) '@types/babel__core': 7.20.2 react-refresh: 0.14.0 - vite: 4.4.11(@types/node@20.8.3)(sass@1.69.0) + vite: 4.4.11(@types/node@20.12.7)(sass@1.69.0) transitivePeerDependencies: - supports-color dev: true @@ -5718,6 +5734,14 @@ packages: /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + /fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + /fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -6341,7 +6365,7 @@ packages: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 - '@types/node': 20.8.3 + '@types/node': 20.12.7 jest-mock: 29.7.0 jest-util: 29.7.0 jsdom: 20.0.3 @@ -6383,7 +6407,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.8.3 + '@types/node': 20.12.7 jest-util: 29.7.0 dev: true @@ -6392,7 +6416,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.8.3 + '@types/node': 20.12.7 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -6402,7 +6426,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.8.3 + '@types/node': 20.12.7 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -6411,7 +6435,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.8.3 + '@types/node': 20.12.7 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -7141,6 +7165,22 @@ packages: pathe: 1.1.1 dev: true + /playwright-core@1.43.0: + resolution: {integrity: sha512-iWFjyBUH97+pUFiyTqSLd8cDMMOS0r2ZYz2qEsPjH8/bX++sbIJT35MSwKnp1r/OQBAqC5XO99xFbJ9XClhf4w==} + engines: {node: '>=16'} + hasBin: true + dev: true + + /playwright@1.43.0: + resolution: {integrity: sha512-SiOKHbVjTSf6wHuGCbqrEyzlm6qvXcv7mENP+OZon1I07brfZLGdfWV0l/efAzVx7TF3Z45ov1gPEkku9q25YQ==} + engines: {node: '>=16'} + hasBin: true + dependencies: + playwright-core: 1.43.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /pmtiles@3.0.5: resolution: {integrity: sha512-K6NxVvW/vXE3052VZKF2ppyjdyhLx41FidR5yV8L/+El+lcMJpXS0vHBSPFmjdag5zkYv2XGDdq+3VjB2K7l6w==} dependencies: @@ -8631,6 +8671,9 @@ packages: which-boxed-primitive: 1.0.2 dev: true + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + /unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} engines: {node: '>=4'} @@ -8775,7 +8818,7 @@ packages: d3-timer: 3.0.1 dev: false - /vite-node@0.34.6(@types/node@20.8.3)(sass@1.69.0): + /vite-node@0.34.6(@types/node@20.12.7)(sass@1.69.0): resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -8785,7 +8828,7 @@ packages: mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.11(@types/node@20.8.3)(sass@1.69.0) + vite: 4.4.11(@types/node@20.12.7)(sass@1.69.0) transitivePeerDependencies: - '@types/node' - less @@ -8808,14 +8851,14 @@ packages: debug: 4.3.4 fast-glob: 3.3.1 pretty-bytes: 6.1.1 - vite: 4.4.11(@types/node@20.8.3)(sass@1.69.0) + vite: 4.4.11(@types/node@20.12.7)(sass@1.69.0) workbox-build: 7.0.0 workbox-window: 7.0.0 transitivePeerDependencies: - supports-color dev: true - /vite@4.4.11(@types/node@20.8.3)(sass@1.69.0): + /vite@4.4.11(@types/node@20.12.7)(sass@1.69.0): resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -8843,7 +8886,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.8.3 + '@types/node': 20.12.7 esbuild: 0.18.20 postcss: 8.4.31 rollup: 3.29.4 @@ -8885,7 +8928,7 @@ packages: dependencies: '@types/chai': 4.3.6 '@types/chai-subset': 1.3.3 - '@types/node': 20.8.3 + '@types/node': 20.12.7 '@vitest/expect': 0.34.6 '@vitest/runner': 0.34.6 '@vitest/snapshot': 0.34.6 @@ -8905,8 +8948,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.7.0 - vite: 4.4.11(@types/node@20.8.3)(sass@1.69.0) - vite-node: 0.34.6(@types/node@20.8.3)(sass@1.69.0) + vite: 4.4.11(@types/node@20.12.7)(sass@1.69.0) + vite-node: 0.34.6(@types/node@20.12.7)(sass@1.69.0) why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/src/frontend/vite.config.ts b/src/frontend/vite.config.ts index 32bf0e2821..234c519517 100644 --- a/src/frontend/vite.config.ts +++ b/src/frontend/vite.config.ts @@ -2,6 +2,7 @@ import path from 'path'; import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; +import { configDefaults } from 'vitest/config'; import { VitePWA } from 'vite-plugin-pwa'; // https://vitejs.dev/config/ @@ -36,6 +37,7 @@ export default defineConfig(({ mode }) => { globals: true, environment: 'jsdom', setupFiles: './setupTests.ts', + exclude: [...configDefaults.exclude, 'e2e', 'playwright-tests-examples'], }, }; });