diff --git a/.github/workflows/argos.yml b/.github/workflows/argos.yml deleted file mode 100644 index 8a1f36f1f..000000000 --- a/.github/workflows/argos.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: Argos Tests - -on: - push: - branches: - - dev - pull_request: - paths: - - 'preview/**/*.js' - - 'preview/**/*.html' - - 'preview/**/*.scss' - - 'core/**/*.js' - - 'core/**/*.scss' - -env: - NODE: 22 - -permissions: - contents: read - -jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - # if: github.event.pull_request.draft == false - if: false - steps: - - name: Clone repository - uses: actions/checkout@v6 - - - name: Cache turbo build setup - uses: actions/cache@v5 - with: - path: .turbo - key: ${{ runner.os }}-turbo-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-turbo- - - - name: Install PNPM - uses: pnpm/action-setup@v4 - - - name: Set up Node.js - uses: actions/setup-node@v6 - with: - node-version: "${{ env.NODE }}" - cache: 'pnpm' - - - name: Get installed Playwright version - id: playwright-version - run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package.json').devDependencies['@playwright/test'])")" >> $GITHUB_ENV - - - name: Cache playwright binaries - uses: actions/cache@v5 - id: playwright-cache - with: - path: | - ~/.cache/ms-playwright - key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} - - - name: Install pnpm dependencies - run: pnpm install - - - name: Install Playwright Browsers - run: pnpm exec playwright install --with-deps - if: steps.playwright-cache.outputs.cache-hit != 'true' - - - name: Run Playwright tests - run: pnpm run playwright \ No newline at end of file diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index e20402113..8c3cfe935 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -106,7 +106,6 @@ ### Minor Changes -- a2640e2: Add Playwright configuration and visual regression tests - d3ae77c: Enable `scrollSpy` in `countup` module - bd3d959: Refactor SCSS files to replace divide function with calc - cb278c7: Add Segmented Control component diff --git a/package.json b/package.json index 85312401a..db9ced356 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "type-check": "turbo type-check", "version": "changeset version", "publish": "changeset publish", - "playwright": "pnpm run build && pnpm run vt", "reformat-md": "tsx .build/reformat-mdx.ts", "lint": "pnpm run lint-md", "lint-md": "markdownlint docs/content/**/*.md", @@ -22,10 +21,8 @@ "shx": "^0.4.0" }, "devDependencies": { - "@argos-ci/playwright": "^6.3.8", "@changesets/changelog-github": "^0.5.2", "@changesets/cli": "^2.29.8", - "@playwright/test": "^1.57.0", "adm-zip": "^0.5.16", "autoprefixer": "^10.4.23", "bundlewatch": "^0.4.1", diff --git a/playwright.config.ts b/playwright.config.ts deleted file mode 100644 index a647dc721..000000000 --- a/playwright.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { defineConfig, devices } from "@playwright/test" - -export default defineConfig({ - testDir: "./tests", - timeout: 10000, - fullyParallel: true, - projects: [ - { - name: "chromium", - use: { ...devices["Desktop Chrome"] }, - }, - ], - use: { - trace: "on-first-retry", - screenshot: "only-on-failure", - }, - reporter: [ - process.env.CI ? ["dot"] : ["list"], - ["@argos-ci/playwright/reporter", { uploadToArgos: !!process.env.CI }], - ], -}) \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2dbe66004..56a225faf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,18 +12,12 @@ importers: specifier: ^0.4.0 version: 0.4.0 devDependencies: - '@argos-ci/playwright': - specifier: ^6.3.8 - version: 6.3.8 '@changesets/changelog-github': specifier: ^0.5.2 version: 0.5.2 '@changesets/cli': specifier: ^2.29.8 version: 2.29.8(@types/node@22.19.3) - '@playwright/test': - specifier: ^1.57.0 - version: 1.57.0 adm-zip: specifier: ^0.5.16 version: 0.5.16 @@ -336,26 +330,6 @@ packages: resolution: {integrity: sha512-zM+nnqZpiQj20PyAh6uvgdSz+hD7Rj7UfAZwizqNP+bLvcbGXZwABERobuilkCQqyDBBH4uv0yqIcPRl8dSBEg==} engines: {node: '>= 14.0.0'} - '@argos-ci/api-client@0.15.0': - resolution: {integrity: sha512-LxEZZyn/PTgI8P5AEANufZ/K+gM2E4R78vySEvBK3wRQZ8qi4RkCWKUGWJEMauM1yQE1e2PdJ1Kitu56Of8yIg==} - engines: {node: '>=20.0.0'} - - '@argos-ci/browser@5.1.0': - resolution: {integrity: sha512-4UEM8MSPrlSKbzWMTa2KFXQ5SH/GB8tBl7TRXRk10McgzDwjNO3lG28KP10MTrWnn67cww7gzXPP8umSI048WQ==} - engines: {node: '>=20.0.0'} - - '@argos-ci/core@5.0.3': - resolution: {integrity: sha512-s/QmAowgfauJqn4v2dfTdNDkyMl5Cy2lv4AshdeQ3IRVUxaHBVQnIR45RkB/JIYsuDXiiYilxM7qzUmjr2WfhQ==} - engines: {node: '>=20.0.0'} - - '@argos-ci/playwright@6.3.8': - resolution: {integrity: sha512-aBmt0xBQPHEej4e1GR5pvBr0VwFaB5c5OxpEgJ0EzjkCPZ/jid3PU4EBpGqmUJrN2lp+NM9wuiyd/P77PobVQw==} - engines: {node: '>=20.0.0'} - - '@argos-ci/util@3.2.0': - resolution: {integrity: sha512-/Bn0qCH8VsdPv5WB9TUEf3oTgsIqsTMUEjPVDopHLzKK+j7nQYGOF3MnN7VhBow82BXeStBfJCS3UiZ6cgxRlw==} - engines: {node: '>=20.0.0'} - '@babel/code-frame@7.27.1': resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} engines: {node: '>=6.9.0'} @@ -1430,10 +1404,6 @@ packages: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} - chalk@5.6.2: - resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - character-entities-html4@2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} @@ -1542,10 +1512,6 @@ packages: config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} - convict@6.2.4: - resolution: {integrity: sha512-qN60BAwdMVdofckX7AlohVJ2x9UvjTNoKVXCL2LxFk1l7757EJqf1nySdMkPQer0bt8kQ5lQiyZ9/2NvrFBuwQ==} - engines: {node: '>=6'} - core-js-pure@3.42.0: resolution: {integrity: sha512-007bM04u91fF4kMgwom2I5cQxAFIy8jVulgr9eozILl/SZE53QOqnW/+vviC+wQWLv+AunBG+8Q0TLoeSsSxRQ==} @@ -2326,9 +2292,6 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} - lodash.clonedeep@4.5.0: - resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} - lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -2475,10 +2438,6 @@ packages: resolution: {integrity: sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==} engines: {node: '>= 0.6'} - mime-types@3.0.2: - resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==} - engines: {node: '>=18'} - mime@3.0.0: resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} engines: {node: '>=10.0.0'} @@ -2632,12 +2591,6 @@ packages: oniguruma-to-es@4.3.3: resolution: {integrity: sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg==} - openapi-fetch@0.15.0: - resolution: {integrity: sha512-OjQUdi61WO4HYhr9+byCPMj0+bgste/LtSBEcV6FzDdONTs7x0fWn8/ndoYwzqCsKWIxEZwo4FN/TG1c1rI8IQ==} - - openapi-typescript-helpers@0.0.15: - resolution: {integrity: sha512-opyTPaunsklCBpTK8JGef6mfPhLSnyy5a0IN9vKtx3+4aExf+KxEqYwIy3hqkedXIB97u357uLMJsOnm3GVjsw==} - outdent@0.5.0: resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} @@ -3271,10 +3224,6 @@ packages: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} - tmp@0.2.5: - resolution: {integrity: sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==} - engines: {node: '>=14.14'} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -3524,10 +3473,6 @@ packages: engines: {node: '>= 14'} hasBin: true - yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -3743,40 +3688,6 @@ snapshots: dependencies: '@algolia/client-common': 5.24.0 - '@argos-ci/api-client@0.15.0': - dependencies: - debug: 4.4.3 - openapi-fetch: 0.15.0 - transitivePeerDependencies: - - supports-color - - '@argos-ci/browser@5.1.0': {} - - '@argos-ci/core@5.0.3': - dependencies: - '@argos-ci/api-client': 0.15.0 - '@argos-ci/util': 3.2.0 - convict: 6.2.4 - debug: 4.4.3 - fast-glob: 3.3.3 - mime-types: 3.0.2 - sharp: 0.34.5 - tmp: 0.2.5 - transitivePeerDependencies: - - supports-color - - '@argos-ci/playwright@6.3.8': - dependencies: - '@argos-ci/browser': 5.1.0 - '@argos-ci/core': 5.0.3 - '@argos-ci/util': 3.2.0 - chalk: 5.6.2 - debug: 4.4.3 - transitivePeerDependencies: - - supports-color - - '@argos-ci/util@3.2.0': {} - '@babel/code-frame@7.27.1': dependencies: '@babel/helper-validator-identifier': 7.27.1 @@ -4105,7 +4016,8 @@ snapshots: '@hotwired/turbo@8.0.18': {} - '@img/colour@1.0.0': {} + '@img/colour@1.0.0': + optional: true '@img/sharp-darwin-arm64@0.34.5': optionalDependencies: @@ -4383,6 +4295,7 @@ snapshots: '@playwright/test@1.57.0': dependencies: playwright: 1.57.0 + optional: true '@popperjs/core@2.11.8': {} @@ -4765,8 +4678,6 @@ snapshots: ansi-styles: 4.3.0 supports-color: 7.2.0 - chalk@5.6.2: {} - character-entities-html4@2.1.0: {} character-entities-legacy@3.0.0: {} @@ -4870,11 +4781,6 @@ snapshots: ini: 1.3.8 proto-list: 1.2.4 - convict@6.2.4: - dependencies: - lodash.clonedeep: 4.5.0 - yargs-parser: 20.2.9 - core-js-pure@3.42.0: {} core-js@3.46.0: {} @@ -4947,7 +4853,8 @@ snapshots: detect-libc@1.0.3: optional: true - detect-libc@2.1.2: {} + detect-libc@2.1.2: + optional: true devlop@1.1.0: dependencies: @@ -5638,8 +5545,6 @@ snapshots: dependencies: p-locate: 4.1.0 - lodash.clonedeep@4.5.0: {} - lodash.merge@4.6.2: {} lodash.startcase@4.4.0: {} @@ -5906,10 +5811,6 @@ snapshots: dependencies: mime-db: 1.54.0 - mime-types@3.0.2: - dependencies: - mime-db: 1.54.0 - mime@3.0.0: {} mimic-fn@2.1.0: {} @@ -6054,12 +5955,6 @@ snapshots: regex: 6.0.1 regex-recursion: 6.0.2 - openapi-fetch@0.15.0: - dependencies: - openapi-typescript-helpers: 0.0.15 - - openapi-typescript-helpers@0.0.15: {} - outdent@0.5.0: {} p-filter@2.1.0: @@ -6143,13 +6038,15 @@ snapshots: pify@4.0.1: {} - playwright-core@1.57.0: {} + playwright-core@1.57.0: + optional: true playwright@1.57.0: dependencies: playwright-core: 1.57.0 optionalDependencies: fsevents: 2.3.2 + optional: true please-upgrade-node@3.2.0: dependencies: @@ -6500,6 +6397,7 @@ snapshots: '@img/sharp-win32-arm64': 0.34.5 '@img/sharp-win32-ia32': 0.34.5 '@img/sharp-win32-x64': 0.34.5 + optional: true shebang-command@1.2.0: dependencies: @@ -6708,8 +6606,6 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 - tmp@0.2.5: {} - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -6907,8 +6803,6 @@ snapshots: yaml@2.7.1: {} - yargs-parser@20.2.9: {} - yargs-parser@21.1.1: {} yargs@17.7.2: diff --git a/tests/visual.test.ts b/tests/visual.test.ts deleted file mode 100644 index 28a2ba970..000000000 --- a/tests/visual.test.ts +++ /dev/null @@ -1,18 +0,0 @@ -import test, { expect } from '@playwright/test'; -import { argosScreenshot } from "@argos-ci/playwright" -import { readdirSync } from "fs" -import path from "path" - -const previewDir = path.join(__dirname, "../preview/dist") - -const htmlFiles = readdirSync(previewDir).filter((file) => file.endsWith(".html")) - -for (const file of htmlFiles) { - test(`Compare ${file}`, async ({ page }) => { - await page.goto(`file://${path.join(previewDir, file)}`) - await page.waitForLoadState("networkidle") - await argosScreenshot(page, `${file}`, { - threshold: 0.7, - }) - }) -}