From e0bdaf1aa17a6e76c8cc075218488521eb7ceeee Mon Sep 17 00:00:00 2001 From: Bido Date: Sun, 29 Sep 2024 01:23:12 +0200 Subject: [PATCH 01/13] add playwright integration and basic tests --- .github/workflows/test.yml | 72 +++ e2e/nuxt-vite/tests/example.spec.ts | 13 + e2e/rust-vite/tests/example.spec.ts | 11 + e2e/vite-vite/tests/example.spec.ts | 11 + e2e/vite-webpack-rspack/tests/example.spec.ts | 13 + package.json | 8 +- playwright.config.ts | 53 +++ pnpm-lock.yaml | 417 +++++++++++++----- 8 files changed, 490 insertions(+), 108 deletions(-) create mode 100644 .github/workflows/test.yml create mode 100644 e2e/nuxt-vite/tests/example.spec.ts create mode 100644 e2e/rust-vite/tests/example.spec.ts create mode 100644 e2e/vite-vite/tests/example.spec.ts create mode 100644 e2e/vite-webpack-rspack/tests/example.spec.ts create mode 100644 playwright.config.ts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2a11ec7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,72 @@ +name: Build and Test with Playwright + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + pull-requests: read + +jobs: + run-playwright-tests: + name: Run Playwright Tests + runs-on: ubuntu-latest + container: node:20 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: PNPM Install + uses: pnpm/action-setup@v4 + with: + version: 9.1.3 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20.10.0 + cache: 'pnpm' + registry-url: https://registry.npmjs.org/ + + - run: corepack enable + + - name: Install NPM Dependencies + run: pnpm install --frozen-lockfile + + - name: Install Chromium Browser + run: pnpm playwright install --with-deps chromium + + - name: Build Projects + run: pnpm build + + - name: Start Vite Application + run: | + nohup pnpm run dev-vv & + + - name: Wait for Vite to be Ready + run: pnpm exec wait-on http://localhost:5175 + + - name: Run Playwright Tests + run: pnpm playwright test --project=vite-vite + + # Although the server starts, Playwright is unable to access it; the network is not reachable. + # - name: Start Rust-Vite Application + # run: | + # nohup pnpm run dev-rv & + + # - name: Wait for Vite to be Ready + # run: pnpm exec wait-on http://localhost:5172 + + # - name: Run Playwright Tests + # run: pnpm playwright test --project=rust-vite + + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: test-results + path: reports/e2e/output + retention-days: 30 diff --git a/e2e/nuxt-vite/tests/example.spec.ts b/e2e/nuxt-vite/tests/example.spec.ts new file mode 100644 index 0000000..0aa83d3 --- /dev/null +++ b/e2e/nuxt-vite/tests/example.spec.ts @@ -0,0 +1,13 @@ +import { expect, test } from '@playwright/test'; + +test('example.com basic test', async ({ page }) => { + // Go to example.com + await page.goto('https://example.com'); + + // Check the title of the page + await expect(page).toHaveTitle('Example Domain'); + + // Check if the heading exists on the page + const heading = page.locator('h1'); + await expect(heading).toHaveText('Example Domain'); +}); diff --git a/e2e/rust-vite/tests/example.spec.ts b/e2e/rust-vite/tests/example.spec.ts new file mode 100644 index 0000000..224748f --- /dev/null +++ b/e2e/rust-vite/tests/example.spec.ts @@ -0,0 +1,11 @@ +import { expect, test } from '@playwright/test'; + +test('example.com basic test', async ({ page, baseURL }) => { + await page.goto(baseURL!); + + // Get the heading by role with exact name 'Rust Host' + const heading = page.getByRole('heading', { name: 'Rust Host', exact: true }); + + // Expect the heading to be visible + await expect(heading).toBeVisible(); +}); diff --git a/e2e/vite-vite/tests/example.spec.ts b/e2e/vite-vite/tests/example.spec.ts new file mode 100644 index 0000000..71b3dc9 --- /dev/null +++ b/e2e/vite-vite/tests/example.spec.ts @@ -0,0 +1,11 @@ +import { expect, test } from '@playwright/test'; + +test('example.com basic test', async ({ page, baseURL }) => { + await page.goto(baseURL!); + + // Get the heading by role with exact name 'Rust Host' + const heading = page.getByRole('heading', { name: 'Vite Host', exact: true }); + + // Expect the heading to be visible + await expect(heading).toBeVisible(); +}); diff --git a/e2e/vite-webpack-rspack/tests/example.spec.ts b/e2e/vite-webpack-rspack/tests/example.spec.ts new file mode 100644 index 0000000..0aa83d3 --- /dev/null +++ b/e2e/vite-webpack-rspack/tests/example.spec.ts @@ -0,0 +1,13 @@ +import { expect, test } from '@playwright/test'; + +test('example.com basic test', async ({ page }) => { + // Go to example.com + await page.goto('https://example.com'); + + // Check the title of the page + await expect(page).toHaveTitle('Example Domain'); + + // Check if the heading exists on the page + const heading = page.locator('h1'); + await expect(heading).toHaveText('Example Domain'); +}); diff --git a/package.json b/package.json index 1f5ef77..fe6c01d 100644 --- a/package.json +++ b/package.json @@ -50,10 +50,12 @@ "defu": "^6.1.4", "estree-walker": "^2", "magic-string": "^0.30.11", - "pathe": "^1.1.2", - "vitest": "^2.1.1" + "vitest": "^2.1.1", + "pathe": "^1.1.2" }, "devDependencies": { + "@playwright/test": "^1.47.2", + "@types/node": "^22.7.4", "husky": "^8.0.3", "microbundle": "^0.15.1", "mime-types": "^2.1.35", @@ -62,4 +64,4 @@ "rimraf": "^6.0.1", "vite": "^5.4.3" } -} +} \ No newline at end of file diff --git a/playwright.config.ts b/playwright.config.ts new file mode 100644 index 0000000..cd6bba3 --- /dev/null +++ b/playwright.config.ts @@ -0,0 +1,53 @@ +import { defineConfig } from '@playwright/test'; + +export default defineConfig({ + testDir: 'tests', + timeout: 30 * 1000, + retries: process.env.CI ? 2 : 0, + workers: process.env.CI ? 1 : undefined, + use: { + trace: 'on', + screenshot: 'only-on-failure', + video: 'retain-on-failure', + }, + projects: [ + { + name: 'nuxt-vite', + testDir: 'e2e/nuxt-vite', + use: { + baseURL: 'http://localhost:3001', + browserName: 'chromium', + }, + }, + { + name: 'vite-vite', + testDir: 'e2e/vite-vite', + use: { + baseURL: 'http://localhost:5175', + browserName: 'chromium', + }, + }, + { + name: 'rust-vite', + testDir: 'e2e/rust-vite', + use: { + baseURL: 'http://localhost:5172', + browserName: 'chromium', + }, + }, + { + name: 'vite-webpack-rspack', + testDir: 'e2e/vite-webpack-rspack', + use: { + baseURL: 'http://localhost:3004', + browserName: 'chromium', + }, + }, + ], + outputDir: 'reports/e2e/output', + reporter: [ + ['list'], + ['html', { outputFolder: 'playwright-report', open: 'never' }], + ['json', { outputFile: 'test-results.json' }], + ], +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 11de071..57aa05b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,6 +30,12 @@ importers: specifier: ^2.1.1 version: 2.1.1(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) devDependencies: + '@playwright/test': + specifier: ^1.47.2 + version: 1.47.2 + '@types/node': + specifier: ^22.7.4 + version: 22.7.4 husky: specifier: ^8.0.3 version: 8.0.3 @@ -50,7 +56,7 @@ importers: version: 6.0.1 vite: specifier: ^5.4.3 - version: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + version: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) examples/nuxt-vite/nuxt-host: dependencies: @@ -59,14 +65,14 @@ importers: version: link:../../.. nuxt: specifier: ^3.13.0 - version: 3.13.0(@parcel/watcher@2.4.1)(@types/node@22.5.0)(ioredis@5.4.1)(magicast@0.3.5)(rollup@4.21.0)(sass-embedded@1.77.8)(terser@5.31.6)(typescript@5.5.3)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 3.13.0(@parcel/watcher@2.4.1)(@types/node@22.7.4)(ioredis@5.4.1)(magicast@0.3.5)(rollup@4.21.0)(sass-embedded@1.77.8)(terser@5.31.6)(typescript@5.5.3)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) vue: specifier: latest - version: 3.5.3(typescript@5.5.3) + version: 3.5.10(typescript@5.5.3) devDependencies: vite-plugin-top-level-await: specifier: ^1.4.4 - version: 1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) examples/nuxt-vite/nuxt-remote: dependencies: @@ -75,14 +81,14 @@ importers: version: link:../../.. nuxt: specifier: ^3.13.0 - version: 3.13.0(@parcel/watcher@2.4.1)(@types/node@22.5.0)(ioredis@5.4.1)(magicast@0.3.5)(rollup@4.21.0)(sass-embedded@1.77.8)(terser@5.31.6)(typescript@5.5.3)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 3.13.0(@parcel/watcher@2.4.1)(@types/node@22.7.4)(ioredis@5.4.1)(magicast@0.3.5)(rollup@4.21.0)(sass-embedded@1.77.8)(terser@5.31.6)(typescript@5.5.3)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) vue: specifier: latest - version: 3.5.3(typescript@5.5.3) + version: 3.5.10(typescript@5.5.3) devDependencies: vite-plugin-top-level-await: specifier: ^1.4.4 - version: 1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) examples/rust-vite/rust-host: dependencies: @@ -144,13 +150,13 @@ importers: version: 1.6.13(@swc/helpers@0.5.3) '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 4.3.1(vite@5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) vite: specifier: ^5.3.1 - version: 5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + version: 5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) vite-plugin-top-level-await: specifier: ^1.4.1 - version: 1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) examples/vite-vite/vite-host: dependencies: @@ -193,13 +199,13 @@ importers: version: 1.7.14(@swc/helpers@0.5.3) '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 4.3.1(vite@5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) vite: specifier: ^5.4.0 - version: 5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + version: 5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) vite-plugin-top-level-await: specifier: ^1.4.4 - version: 1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) examples/vite-vite/vite-remote: dependencies: @@ -245,13 +251,13 @@ importers: version: 1.7.14(@swc/helpers@0.5.3) '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 4.3.1(vite@5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) vite: specifier: ^5.4.0 - version: 5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + version: 5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) vite-plugin-top-level-await: specifier: ^1.4.4 - version: 1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) examples/vite-webpack-rspack/host: dependencies: @@ -276,7 +282,7 @@ importers: version: 18.3.0 '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 4.3.1(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) globals: specifier: ^15.9.0 version: 15.9.0 @@ -285,7 +291,7 @@ importers: version: 3.4.13 vite: specifier: ^5.4.1 - version: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + version: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) examples/vite-webpack-rspack/remote: dependencies: @@ -310,7 +316,7 @@ importers: version: 18.3.0 '@vitejs/plugin-react': specifier: ^4.3.1 - version: 4.3.1(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + version: 4.3.1(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) globals: specifier: ^15.9.0 version: 15.9.0 @@ -319,7 +325,7 @@ importers: version: 3.4.13 vite: specifier: ^5.4.1 - version: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + version: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) examples/vite-webpack-rspack/rspack: dependencies: @@ -2053,6 +2059,14 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@playwright/test@1.47.2': + resolution: + { + integrity: sha512-jTXRsoSPONAs8Za9QEQdyjFn+0ZQFjCiIztAIF6bi1HqhBzG9Ma7g1WotyiGqFSBRZjIEqMdT8RUlbk1QVhzCQ==, + } + engines: { node: '>=18' } + hasBin: true + '@polka/url@1.0.0-next.25': resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==} @@ -2696,6 +2710,12 @@ packages: '@types/node@22.5.0': resolution: {integrity: sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==} + '@types/node@22.7.4': + resolution: + { + integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==, + } + '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -2844,24 +2864,48 @@ packages: '@vue/compiler-core@3.4.38': resolution: {integrity: sha512-8IQOTCWnLFqfHzOGm9+P8OPSEDukgg3Huc92qSG49if/xI2SAwLHQO2qaPQbjCWPBcQoO1WYfXfTACUrWV3c5A==} + '@vue/compiler-core@3.5.10': + resolution: + { + integrity: sha512-iXWlk+Cg/ag7gLvY0SfVucU8Kh2CjysYZjhhP70w9qI4MvSox4frrP+vDGvtQuzIcgD8+sxM6lZvCtdxGunTAA==, + } + '@vue/compiler-core@3.5.3': resolution: {integrity: sha512-adAfy9boPkP233NTyvLbGEqVuIfK/R0ZsBsIOW4BZNfb4BRpRW41Do1u+ozJpsb+mdoy80O20IzAsHaihRb5qA==} '@vue/compiler-dom@3.4.38': resolution: {integrity: sha512-Osc/c7ABsHXTsETLgykcOwIxFktHfGSUDkb05V61rocEfsFDcjDLH/IHJSNJP+/Sv9KeN2Lx1V6McZzlSb9EhQ==} + '@vue/compiler-dom@3.5.10': + resolution: + { + integrity: sha512-DyxHC6qPcktwYGKOIy3XqnHRrrXyWR2u91AjP+nLkADko380srsC2DC3s7Y1Rk6YfOlxOlvEQKa9XXmLI+W4ZA==, + } + '@vue/compiler-dom@3.5.3': resolution: {integrity: sha512-wnzFArg9zpvk/811CDOZOadJRugf1Bgl/TQ3RfV4nKfSPok4hi0w10ziYUQR6LnnBAUlEXYLUfZ71Oj9ds/+QA==} '@vue/compiler-sfc@3.4.38': resolution: {integrity: sha512-s5QfZ+9PzPh3T5H4hsQDJtI8x7zdJaew/dCGgqZ2630XdzaZ3AD8xGZfBqpT8oaD/p2eedd+pL8tD5vvt5ZYJQ==} + '@vue/compiler-sfc@3.5.10': + resolution: + { + integrity: sha512-to8E1BgpakV7224ZCm8gz1ZRSyjNCAWEplwFMWKlzCdP9DkMKhRRwt0WkCjY7jkzi/Vz3xgbpeig5Pnbly4Tow==, + } + '@vue/compiler-sfc@3.5.3': resolution: {integrity: sha512-P3uATLny2tfyvMB04OQFe7Sczteno7SLFxwrOA/dw01pBWQHB5HL15a8PosoNX2aG/EAMGqnXTu+1LnmzFhpTQ==} '@vue/compiler-ssr@3.4.38': resolution: {integrity: sha512-YXznKFQ8dxYpAz9zLuVvfcXhc31FSPFDcqr0kyujbOwNhlmaNvL2QfIy+RZeJgSn5Fk54CWoEUeW+NVBAogGaw==} + '@vue/compiler-ssr@3.5.10': + resolution: + { + integrity: sha512-hxP4Y3KImqdtyUKXDRSxKSRkSm1H9fCvhojEYrnaoWhE4w/y8vwWhnosJoPPe2AXm5sU7CSbYYAgkt2ZPhDz+A==, + } + '@vue/compiler-ssr@3.5.3': resolution: {integrity: sha512-F/5f+r2WzL/2YAPl7UlKcJWHrvoZN8XwEBLnT7S4BXwncH25iDOabhO2M2DWioyTguJAGavDOawejkFXj8EM1w==} @@ -2880,34 +2924,72 @@ packages: '@vue/reactivity@3.4.38': resolution: {integrity: sha512-4vl4wMMVniLsSYYeldAKzbk72+D3hUnkw9z8lDeJacTxAkXeDAP1uE9xr2+aKIN0ipOL8EG2GPouVTH6yF7Gnw==} +<<<<<<< HEAD '@vue/reactivity@3.5.3': resolution: {integrity: sha512-2w61UnRWTP7+rj1H/j6FH706gRBHdFVpIqEkSDAyIpafBXYH8xt4gttstbbCWdU3OlcSWO8/3mbKl/93/HSMpw==} +======= + '@vue/reactivity@3.5.10': + resolution: + { + integrity: sha512-kW08v06F6xPSHhid9DJ9YjOGmwNDOsJJQk0ax21wKaUYzzuJGEuoKNU2Ujux8FLMrP7CFJJKsHhXN9l2WOVi2g==, + } +>>>>>>> 200d3be (add playwright integration and basic tests) '@vue/runtime-core@3.4.38': resolution: {integrity: sha512-21z3wA99EABtuf+O3IhdxP0iHgkBs1vuoCAsCKLVJPEjpVqvblwBnTj42vzHRlWDCyxu9ptDm7sI2ZMcWrQqlA==} +<<<<<<< HEAD '@vue/runtime-core@3.5.3': resolution: {integrity: sha512-5b2AQw5OZlmCzSsSBWYoZOsy75N4UdMWenTfDdI5bAzXnuVR7iR8Q4AOzQm2OGoA41xjk53VQKrqQhOz2ktWaw==} +======= + '@vue/runtime-core@3.5.10': + resolution: + { + integrity: sha512-9Q86I5Qq3swSkFfzrZ+iqEy7Vla325M7S7xc1NwKnRm/qoi1Dauz0rT6mTMmscqx4qz0EDJ1wjB+A36k7rl8mA==, + } +>>>>>>> 200d3be (add playwright integration and basic tests) '@vue/runtime-dom@3.4.38': resolution: {integrity: sha512-afZzmUreU7vKwKsV17H1NDThEEmdYI+GCAK/KY1U957Ig2NATPVjCROv61R19fjZNzMmiU03n79OMnXyJVN0UA==} +<<<<<<< HEAD '@vue/runtime-dom@3.5.3': resolution: {integrity: sha512-wPR1DEGc3XnQ7yHbmkTt3GoY0cEnVGQnARRdAkDzZ8MbUKEs26gogCQo6AOvvgahfjIcnvWJzkZArQ1fmWjcSg==} +======= + '@vue/runtime-dom@3.5.10': + resolution: + { + integrity: sha512-t3x7ht5qF8ZRi1H4fZqFzyY2j+GTMTDxRheT+i8M9Ph0oepUxoadmbwlFwMoW7RYCpNQLpP2Yx3feKs+fyBdpA==, + } +>>>>>>> 200d3be (add playwright integration and basic tests) '@vue/server-renderer@3.4.38': resolution: {integrity: sha512-NggOTr82FbPEkkUvBm4fTGcwUY8UuTsnWC/L2YZBmvaQ4C4Jl/Ao4HHTB+l7WnFCt5M/dN3l0XLuyjzswGYVCA==} peerDependencies: vue: 3.4.38 +<<<<<<< HEAD '@vue/server-renderer@3.5.3': resolution: {integrity: sha512-28volmaZVG2PGO3V3+gBPKoSHvLlE8FGfG/GKXKkjjfxLuj/50B/0OQGakM/g6ehQeqCrZYM4eHC4Ks48eig1Q==} +======= + '@vue/server-renderer@3.5.10': + resolution: + { + integrity: sha512-IVE97tt2kGKwHNq9yVO0xdh1IvYfZCShvDSy46JIh5OQxP1/EXSpoDqetVmyIzL7CYOWnnmMkVqd7YK2QSWkdw==, + } +>>>>>>> 200d3be (add playwright integration and basic tests) peerDependencies: - vue: 3.5.3 + vue: 3.5.10 '@vue/shared@3.4.38': resolution: {integrity: sha512-q0xCiLkuWWQLzVrecPb0RMsNWyxICOjPrcrwxTUEHb1fsnvni4dcuyG7RT/Ie7VPTvnjzIaWzRMUBsrqNj/hhw==} + '@vue/shared@3.5.10': + resolution: + { + integrity: sha512-VkkBhU97Ki+XJ0xvl4C9YJsIZ2uIlQ7HqPpZOS3m9VCvmROPaChZU6DexdMJqvz9tbgG+4EtFVrSuailUq5KGQ==, + } + '@vue/shared@3.5.3': resolution: {integrity: sha512-Jp2v8nylKBT+PlOUjun2Wp/f++TfJVFjshLzNtJDdmFJabJa7noGMncqXRM1vXGX+Yo2V7WykQFNxusSim8SCA==} @@ -3503,7 +3585,11 @@ packages: resolution: {integrity: sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==} concat-map@0.0.1: +<<<<<<< HEAD resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} +======= + resolution: { integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= } +>>>>>>> 200d3be (add playwright integration and basic tests) concat-with-sourcemaps@1.1.0: resolution: {integrity: sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==} @@ -4283,6 +4369,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] + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -5553,6 +5647,12 @@ packages: picocolors@1.0.1: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picocolors@1.1.0: + resolution: + { + integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==, + } + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -5584,6 +5684,22 @@ packages: pkg-types@1.2.0: resolution: {integrity: sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA==} + playwright-core@1.47.2: + resolution: + { + integrity: sha512-3JvMfF+9LJfe16l7AbSmU555PaTl2tPyQsVInqm3id16pdDfvZ8TTZ/pyzmkbDrZTQefyzU7AIHlZqQnxpqHVQ==, + } + engines: { node: '>=18' } + hasBin: true + + playwright@1.47.2: + resolution: + { + integrity: sha512-nx1cLMmQWqmA3UsnjaaokyoUpdVaaDhJhMoxX2qj3McpjnsqFHs516QAKYhqHAgOP+oCFTEOCOAaD1RgD/RQfA==, + } + engines: { node: '>=18' } + hasBin: true + possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} @@ -6017,6 +6133,13 @@ packages: resolution: {integrity: sha512-Aweb9unOEpQ3ezu4Q00DPvvM2ZTUitJdNKeP/+uQgr1IBIqu574IaZoURId7BKtWMREwzKa9OgzPzezWGPWFQw==} engines: {node: ^10 || ^12 || >=14} + postcss@8.4.47: + resolution: + { + integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==, + } + engines: { node: ^10 || ^12 || >=14 } + prettier@3.3.3: resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} engines: {node: '>=14'} @@ -6860,6 +6983,13 @@ packages: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} + source-map-js@1.2.1: + resolution: + { + integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==, + } + engines: { node: '>=0.10.0' } + source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} @@ -7605,8 +7735,16 @@ packages: typescript: optional: true +<<<<<<< HEAD vue@3.5.3: resolution: {integrity: sha512-xvRbd0HpuLovYbOHXRHlSBsSvmUJbo0pzbkKTApWnQGf3/cu5Z39mQeA5cZdLRVIoNf3zI6MSoOgHUT5i2jO+Q==} +======= + vue@3.5.10: + resolution: + { + integrity: sha512-Vy2kmJwHPlouC/tSnIgXVg03SG+9wSqT1xu1Vehc+ChsXsRd7jLkKgMltVEFOzUdBr3uFwBCG+41LJtfAcBRng==, + } +>>>>>>> 200d3be (add playwright integration and basic tests) peerDependencies: typescript: '*' peerDependenciesMeta: @@ -9554,12 +9692,12 @@ snapshots: '@nuxt/devalue@2.0.2': {} - '@nuxt/devtools-kit@1.4.1(magicast@0.3.5)(rollup@4.21.0)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6))': + '@nuxt/devtools-kit@1.4.1(magicast@0.3.5)(rollup@4.21.0)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6))': dependencies: '@nuxt/kit': 3.13.0(magicast@0.3.5)(rollup@4.21.0) '@nuxt/schema': 3.13.0(rollup@4.21.0) execa: 7.2.0 - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) transitivePeerDependencies: - magicast - rollup @@ -9578,13 +9716,13 @@ snapshots: rc9: 2.1.2 semver: 7.6.3 - '@nuxt/devtools@1.4.1(rollup@4.21.0)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6))': + '@nuxt/devtools@1.4.1(rollup@4.21.0)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6))': dependencies: '@antfu/utils': 0.7.10 - '@nuxt/devtools-kit': 1.4.1(magicast@0.3.5)(rollup@4.21.0)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + '@nuxt/devtools-kit': 1.4.1(magicast@0.3.5)(rollup@4.21.0)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) '@nuxt/devtools-wizard': 1.4.1 '@nuxt/kit': 3.13.0(magicast@0.3.5)(rollup@4.21.0) - '@vue/devtools-core': 7.3.3(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + '@vue/devtools-core': 7.3.3(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) '@vue/devtools-kit': 7.3.3 birpc: 0.2.17 consola: 3.2.3 @@ -9613,9 +9751,9 @@ snapshots: sirv: 2.0.4 tinyglobby: 0.2.5 unimport: 3.11.1(rollup@4.21.0) - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) - vite-plugin-inspect: 0.8.7(@nuxt/kit@3.13.0(magicast@0.3.5)(rollup@4.21.0))(rollup@4.21.0)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) - vite-plugin-vue-inspector: 5.2.0(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) + vite-plugin-inspect: 0.8.7(@nuxt/kit@3.13.0(magicast@0.3.5)(rollup@4.21.0))(rollup@4.21.0)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) + vite-plugin-vue-inspector: 5.2.0(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) which: 3.0.1 ws: 8.18.0 transitivePeerDependencies: @@ -9693,12 +9831,12 @@ snapshots: - rollup - supports-color - '@nuxt/vite-builder@3.13.0(@types/node@22.5.0)(magicast@0.3.5)(rollup@4.21.0)(sass-embedded@1.77.8)(terser@5.31.6)(typescript@5.5.3)(vue@3.5.3(typescript@5.5.3))': + '@nuxt/vite-builder@3.13.0(@types/node@22.7.4)(magicast@0.3.5)(rollup@4.21.0)(sass-embedded@1.77.8)(terser@5.31.6)(typescript@5.5.3)(vue@3.5.10(typescript@5.5.3))': dependencies: '@nuxt/kit': 3.13.0(magicast@0.3.5)(rollup@4.21.0) '@rollup/plugin-replace': 5.0.7(rollup@4.21.0) - '@vitejs/plugin-vue': 5.1.3(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6))(vue@3.5.3(typescript@5.5.3)) - '@vitejs/plugin-vue-jsx': 4.0.1(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6))(vue@3.5.3(typescript@5.5.3)) + '@vitejs/plugin-vue': 5.1.3(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6))(vue@3.5.10(typescript@5.5.3)) + '@vitejs/plugin-vue-jsx': 4.0.1(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6))(vue@3.5.10(typescript@5.5.3)) autoprefixer: 10.4.20(postcss@8.4.44) clear: 0.1.0 consola: 3.2.3 @@ -9724,10 +9862,10 @@ snapshots: ufo: 1.5.4 unenv: 1.10.0 unplugin: 1.12.3 - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) - vite-node: 2.0.5(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) - vite-plugin-checker: 0.7.2(typescript@5.5.3)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) - vue: 3.5.3(typescript@5.5.3) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) + vite-node: 2.0.5(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) + vite-plugin-checker: 0.7.2(typescript@5.5.3)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) + vue: 3.5.10(typescript@5.5.3) vue-bundle-renderer: 2.1.0 transitivePeerDependencies: - '@biomejs/biome' @@ -9816,6 +9954,10 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true + '@playwright/test@1.47.2': + dependencies: + playwright: 1.47.2 + '@polka/url@1.0.0-next.25': {} '@popperjs/core@2.11.8': {} @@ -10443,6 +10585,10 @@ snapshots: dependencies: undici-types: 6.19.8 + '@types/node@22.7.4': + dependencies: + undici-types: 6.19.8 + '@types/parse-json@4.0.2': {} '@types/prop-types@15.7.12': {} @@ -10466,7 +10612,7 @@ snapshots: '@types/resolve@1.17.1': dependencies: - '@types/node': 22.5.0 + '@types/node': 22.7.4 '@types/resolve@1.20.2': {} @@ -10516,13 +10662,13 @@ snapshots: '@unhead/schema': 1.10.0 '@unhead/shared': 1.10.0 - '@unhead/vue@1.10.0(vue@3.5.3(typescript@5.5.3))': + '@unhead/vue@1.10.0(vue@3.5.10(typescript@5.5.3))': dependencies: '@unhead/schema': 1.10.0 '@unhead/shared': 1.10.0 hookable: 5.5.3 unhead: 1.10.0 - vue: 3.5.3(typescript@5.5.3) + vue: 3.5.10(typescript@5.5.3) '@vercel/nft@0.26.5': dependencies: @@ -10542,43 +10688,44 @@ snapshots: - encoding - supports-color - '@vitejs/plugin-react@4.3.1(vite@5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6))': + '@vitejs/plugin-react@4.3.1(vite@5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6))': dependencies: '@babel/core': 7.25.2 '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + vite: 5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) transitivePeerDependencies: - supports-color - '@vitejs/plugin-react@4.3.1(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6))': + '@vitejs/plugin-react@4.3.1(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6))': dependencies: '@babel/core': 7.25.2 '@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2) '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.25.2) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue-jsx@4.0.1(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6))(vue@3.5.3(typescript@5.5.3))': + '@vitejs/plugin-vue-jsx@4.0.1(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6))(vue@3.5.10(typescript@5.5.3))': dependencies: '@babel/core': 7.25.2 '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.25.2) '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.25.2) - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) - vue: 3.5.3(typescript@5.5.3) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) + vue: 3.5.10(typescript@5.5.3) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@5.1.3(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6))(vue@3.5.3(typescript@5.5.3))': + '@vitejs/plugin-vue@5.1.3(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6))(vue@3.5.10(typescript@5.5.3))': dependencies: - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) - vue: 3.5.3(typescript@5.5.3) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) + vue: 3.5.10(typescript@5.5.3) +<<<<<<< HEAD '@vitest/expect@2.1.1': dependencies: '@vitest/spy': 2.1.1 @@ -10620,15 +10767,18 @@ snapshots: tinyrainbow: 1.2.0 '@vue-macros/common@1.12.2(rollup@4.21.0)(vue@3.5.3(typescript@5.5.3))': +======= + '@vue-macros/common@1.12.2(rollup@4.21.0)(vue@3.5.10(typescript@5.5.3))': +>>>>>>> 200d3be (add playwright integration and basic tests) dependencies: '@babel/types': 7.25.4 '@rollup/pluginutils': 5.1.0(rollup@4.21.0) - '@vue/compiler-sfc': 3.4.38 + '@vue/compiler-sfc': 3.5.3 ast-kit: 1.1.0 local-pkg: 0.5.0 magic-string-ast: 0.6.2 optionalDependencies: - vue: 3.5.3(typescript@5.5.3) + vue: 3.5.10(typescript@5.5.3) transitivePeerDependencies: - rollup @@ -10659,7 +10809,7 @@ snapshots: '@babel/helper-module-imports': 7.22.15 '@babel/helper-plugin-utils': 7.24.8 '@babel/parser': 7.25.4 - '@vue/compiler-sfc': 3.4.38 + '@vue/compiler-sfc': 3.5.3 '@vue/compiler-core@3.4.38': dependencies: @@ -10669,6 +10819,14 @@ snapshots: estree-walker: 2.0.2 source-map-js: 1.2.0 + '@vue/compiler-core@3.5.10': + dependencies: + '@babel/parser': 7.25.4 + '@vue/shared': 3.5.10 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.0 + '@vue/compiler-core@3.5.3': dependencies: '@babel/parser': 7.25.4 @@ -10682,6 +10840,11 @@ snapshots: '@vue/compiler-core': 3.4.38 '@vue/shared': 3.4.38 + '@vue/compiler-dom@3.5.10': + dependencies: + '@vue/compiler-core': 3.5.10 + '@vue/shared': 3.5.10 + '@vue/compiler-dom@3.5.3': dependencies: '@vue/compiler-core': 3.5.3 @@ -10699,6 +10862,18 @@ snapshots: postcss: 8.4.44 source-map-js: 1.2.0 + '@vue/compiler-sfc@3.5.10': + dependencies: + '@babel/parser': 7.25.4 + '@vue/compiler-core': 3.5.10 + '@vue/compiler-dom': 3.5.10 + '@vue/compiler-ssr': 3.5.10 + '@vue/shared': 3.5.10 + estree-walker: 2.0.2 + magic-string: 0.30.11 + postcss: 8.4.47 + source-map-js: 1.2.0 + '@vue/compiler-sfc@3.5.3': dependencies: '@babel/parser': 7.25.4 @@ -10716,6 +10891,11 @@ snapshots: '@vue/compiler-dom': 3.4.38 '@vue/shared': 3.4.38 + '@vue/compiler-ssr@3.5.10': + dependencies: + '@vue/compiler-dom': 3.5.10 + '@vue/shared': 3.5.10 + '@vue/compiler-ssr@3.5.3': dependencies: '@vue/compiler-dom': 3.5.3 @@ -10723,14 +10903,14 @@ snapshots: '@vue/devtools-api@6.6.3': {} - '@vue/devtools-core@7.3.3(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6))': + '@vue/devtools-core@7.3.3(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6))': dependencies: '@vue/devtools-kit': 7.3.3 '@vue/devtools-shared': 7.3.9 mitt: 3.0.1 nanoid: 3.3.7 pathe: 1.1.2 - vite-hot-client: 0.2.3(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + vite-hot-client: 0.2.3(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) transitivePeerDependencies: - vite @@ -10752,19 +10932,19 @@ snapshots: dependencies: '@vue/shared': 3.4.38 - '@vue/reactivity@3.5.3': + '@vue/reactivity@3.5.10': dependencies: - '@vue/shared': 3.5.3 + '@vue/shared': 3.5.10 '@vue/runtime-core@3.4.38': dependencies: '@vue/reactivity': 3.4.38 '@vue/shared': 3.4.38 - '@vue/runtime-core@3.5.3': + '@vue/runtime-core@3.5.10': dependencies: - '@vue/reactivity': 3.5.3 - '@vue/shared': 3.5.3 + '@vue/reactivity': 3.5.10 + '@vue/shared': 3.5.10 '@vue/runtime-dom@3.4.38': dependencies: @@ -10773,11 +10953,11 @@ snapshots: '@vue/shared': 3.4.38 csstype: 3.1.3 - '@vue/runtime-dom@3.5.3': + '@vue/runtime-dom@3.5.10': dependencies: - '@vue/reactivity': 3.5.3 - '@vue/runtime-core': 3.5.3 - '@vue/shared': 3.5.3 + '@vue/reactivity': 3.5.10 + '@vue/runtime-core': 3.5.10 + '@vue/shared': 3.5.10 csstype: 3.1.3 '@vue/server-renderer@3.4.38(vue@3.4.38(typescript@5.5.3))': @@ -10786,14 +10966,16 @@ snapshots: '@vue/shared': 3.4.38 vue: 3.4.38(typescript@5.5.3) - '@vue/server-renderer@3.5.3(vue@3.5.3(typescript@5.5.3))': + '@vue/server-renderer@3.5.10(vue@3.5.10(typescript@5.5.3))': dependencies: - '@vue/compiler-ssr': 3.5.3 - '@vue/shared': 3.5.3 - vue: 3.5.3(typescript@5.5.3) + '@vue/compiler-ssr': 3.5.10 + '@vue/shared': 3.5.10 + vue: 3.5.10(typescript@5.5.3) '@vue/shared@3.4.38': {} + '@vue/shared@3.5.10': {} + '@vue/shared@3.5.3': {} '@webassemblyjs/ast@1.12.1': @@ -12432,6 +12614,9 @@ snapshots: fs.realpath@1.0.0: {} + fsevents@2.3.2: + optional: true + fsevents@2.3.3: optional: true @@ -13040,7 +13225,7 @@ snapshots: jest-worker@26.6.2: dependencies: - '@types/node': 22.5.0 + '@types/node': 22.7.4 merge-stream: 2.0.0 supports-color: 7.2.0 @@ -13603,17 +13788,17 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - nuxt@3.13.0(@parcel/watcher@2.4.1)(@types/node@22.5.0)(ioredis@5.4.1)(magicast@0.3.5)(rollup@4.21.0)(sass-embedded@1.77.8)(terser@5.31.6)(typescript@5.5.3)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)): + nuxt@3.13.0(@parcel/watcher@2.4.1)(@types/node@22.7.4)(ioredis@5.4.1)(magicast@0.3.5)(rollup@4.21.0)(sass-embedded@1.77.8)(terser@5.31.6)(typescript@5.5.3)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)): dependencies: '@nuxt/devalue': 2.0.2 - '@nuxt/devtools': 1.4.1(rollup@4.21.0)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)) + '@nuxt/devtools': 1.4.1(rollup@4.21.0)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)) '@nuxt/kit': 3.13.0(magicast@0.3.5)(rollup@4.21.0) '@nuxt/schema': 3.13.0(rollup@4.21.0) '@nuxt/telemetry': 2.5.4(magicast@0.3.5)(rollup@4.21.0) - '@nuxt/vite-builder': 3.13.0(@types/node@22.5.0)(magicast@0.3.5)(rollup@4.21.0)(sass-embedded@1.77.8)(terser@5.31.6)(typescript@5.5.3)(vue@3.5.3(typescript@5.5.3)) + '@nuxt/vite-builder': 3.13.0(@types/node@22.7.4)(magicast@0.3.5)(rollup@4.21.0)(sass-embedded@1.77.8)(terser@5.31.6)(typescript@5.5.3)(vue@3.5.10(typescript@5.5.3)) '@unhead/dom': 1.10.0 '@unhead/ssr': 1.10.0 - '@unhead/vue': 1.10.0(vue@3.5.3(typescript@5.5.3)) + '@unhead/vue': 1.10.0(vue@3.5.10(typescript@5.5.3)) '@vue/shared': 3.4.38 acorn: 8.12.1 c12: 1.11.1(magicast@0.3.5) @@ -13657,16 +13842,16 @@ snapshots: unenv: 1.10.0 unimport: 3.11.1(rollup@4.21.0) unplugin: 1.12.3 - unplugin-vue-router: 0.10.7(rollup@4.21.0)(vue-router@4.4.3(vue@3.5.3(typescript@5.5.3)))(vue@3.5.3(typescript@5.5.3)) + unplugin-vue-router: 0.10.7(rollup@4.21.0)(vue-router@4.4.3(vue@3.5.10(typescript@5.5.3)))(vue@3.5.10(typescript@5.5.3)) unstorage: 1.10.2(ioredis@5.4.1) untyped: 1.4.2 - vue: 3.5.3(typescript@5.5.3) + vue: 3.5.10(typescript@5.5.3) vue-bundle-renderer: 2.1.0 vue-devtools-stub: 0.1.0 - vue-router: 4.4.3(vue@3.5.3(typescript@5.5.3)) + vue-router: 4.4.3(vue@3.5.10(typescript@5.5.3)) optionalDependencies: '@parcel/watcher': 2.4.1 - '@types/node': 22.5.0 + '@types/node': 22.7.4 transitivePeerDependencies: - '@azure/app-configuration' - '@azure/cosmos' @@ -13902,6 +14087,8 @@ snapshots: picocolors@1.0.1: {} + picocolors@1.1.0: {} + picomatch@2.3.1: {} picomatch@3.0.1: {} @@ -13924,6 +14111,14 @@ snapshots: mlly: 1.7.1 pathe: 1.1.2 + playwright-core@1.47.2: {} + + playwright@1.47.2: + dependencies: + playwright-core: 1.47.2 + optionalDependencies: + fsevents: 2.3.2 + possible-typed-array-names@1.0.0: {} postcss-calc@10.0.2(postcss@8.4.44): @@ -14349,6 +14544,12 @@ snapshots: picocolors: 1.0.1 source-map-js: 1.2.0 + postcss@8.4.47: + dependencies: + nanoid: 3.3.7 + picocolors: 1.1.0 + source-map-js: 1.2.1 + prettier@3.3.3: {} pretty-bytes@3.0.1: @@ -15357,6 +15558,8 @@ snapshots: source-map-js@1.2.0: {} + source-map-js@1.2.1: {} + source-map-support@0.5.21: dependencies: buffer-from: 1.1.2 @@ -15876,11 +16079,11 @@ snapshots: unpipe@1.0.0: {} - unplugin-vue-router@0.10.7(rollup@4.21.0)(vue-router@4.4.3(vue@3.5.3(typescript@5.5.3)))(vue@3.5.3(typescript@5.5.3)): + unplugin-vue-router@0.10.7(rollup@4.21.0)(vue-router@4.4.3(vue@3.5.10(typescript@5.5.3)))(vue@3.5.10(typescript@5.5.3)): dependencies: '@babel/types': 7.25.4 '@rollup/pluginutils': 5.1.0(rollup@4.21.0) - '@vue-macros/common': 1.12.2(rollup@4.21.0)(vue@3.5.3(typescript@5.5.3)) + '@vue-macros/common': 1.12.2(rollup@4.21.0)(vue@3.5.10(typescript@5.5.3)) ast-walker-scope: 0.6.2 chokidar: 3.6.0 fast-glob: 3.3.2 @@ -15893,7 +16096,7 @@ snapshots: unplugin: 1.12.3 yaml: 2.5.0 optionalDependencies: - vue-router: 4.4.3(vue@3.5.3(typescript@5.5.3)) + vue-router: 4.4.3(vue@3.5.10(typescript@5.5.3)) transitivePeerDependencies: - rollup - vue @@ -15978,17 +16181,17 @@ snapshots: vary@1.1.2: {} - vite-hot-client@0.2.3(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)): + vite-hot-client@0.2.3(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)): dependencies: - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) - vite-node@2.0.5(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6): + vite-node@2.0.5(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6): dependencies: cac: 6.7.14 debug: 4.3.6(supports-color@5.5.0) pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) transitivePeerDependencies: - '@types/node' - less @@ -16000,6 +16203,7 @@ snapshots: - supports-color - terser +<<<<<<< HEAD vite-node@2.1.1(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6): dependencies: cac: 6.7.14 @@ -16018,6 +16222,9 @@ snapshots: - terser vite-plugin-checker@0.7.2(typescript@5.5.3)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)): +======= + vite-plugin-checker@0.7.2(typescript@5.5.3)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)): +>>>>>>> 200d3be (add playwright integration and basic tests) dependencies: '@babel/code-frame': 7.24.7 ansi-escapes: 4.3.2 @@ -16029,7 +16236,7 @@ snapshots: npm-run-path: 4.0.1 strip-ansi: 6.0.1 tiny-invariant: 1.3.3 - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) vscode-languageclient: 7.0.0 vscode-languageserver: 7.0.0 vscode-languageserver-textdocument: 1.0.12 @@ -16037,7 +16244,7 @@ snapshots: optionalDependencies: typescript: 5.5.3 - vite-plugin-inspect@0.8.7(@nuxt/kit@3.13.0(magicast@0.3.5)(rollup@4.21.0))(rollup@4.21.0)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)): + vite-plugin-inspect@0.8.7(@nuxt/kit@3.13.0(magicast@0.3.5)(rollup@4.21.0))(rollup@4.21.0)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)): dependencies: '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.1.0(rollup@4.21.0) @@ -16048,34 +16255,34 @@ snapshots: perfect-debounce: 1.0.0 picocolors: 1.0.1 sirv: 2.0.4 - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) optionalDependencies: '@nuxt/kit': 3.13.0(magicast@0.3.5)(rollup@4.21.0) transitivePeerDependencies: - rollup - supports-color - vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)): + vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)): dependencies: '@rollup/plugin-virtual': 3.0.2(rollup@4.21.0) '@swc/core': 1.7.14(@swc/helpers@0.5.3) uuid: 10.0.0 - vite: 5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + vite: 5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) transitivePeerDependencies: - '@swc/helpers' - rollup - vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)): + vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.3)(rollup@4.21.0)(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)): dependencies: '@rollup/plugin-virtual': 3.0.2(rollup@4.21.0) '@swc/core': 1.7.14(@swc/helpers@0.5.3) uuid: 10.0.0 - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) transitivePeerDependencies: - '@swc/helpers' - rollup - vite-plugin-vue-inspector@5.2.0(vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6)): + vite-plugin-vue-inspector@5.2.0(vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6)): dependencies: '@babel/core': 7.25.2 '@babel/plugin-proposal-decorators': 7.24.7(@babel/core@7.25.2) @@ -16083,31 +16290,31 @@ snapshots: '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.2) '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.25.2) '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.25.2) - '@vue/compiler-dom': 3.4.38 + '@vue/compiler-dom': 3.5.3 kolorist: 1.8.0 magic-string: 0.30.11 - vite: 5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6) + vite: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) transitivePeerDependencies: - supports-color - vite@5.4.2(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6): + vite@5.4.2(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6): dependencies: esbuild: 0.21.5 postcss: 8.4.41 rollup: 4.21.0 optionalDependencies: - '@types/node': 22.5.0 + '@types/node': 22.7.4 fsevents: 2.3.3 sass-embedded: 1.77.8 terser: 5.31.6 - vite@5.4.3(@types/node@22.5.0)(sass-embedded@1.77.8)(terser@5.31.6): + vite@5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6): dependencies: esbuild: 0.21.5 postcss: 8.4.44 rollup: 4.21.0 optionalDependencies: - '@types/node': 22.5.0 + '@types/node': 22.7.4 fsevents: 2.3.3 sass-embedded: 1.77.8 terser: 5.31.6 @@ -16180,10 +16387,10 @@ snapshots: '@vue/devtools-api': 6.6.3 vue: 3.4.38(typescript@5.5.3) - vue-router@4.4.3(vue@3.5.3(typescript@5.5.3)): + vue-router@4.4.3(vue@3.5.10(typescript@5.5.3)): dependencies: '@vue/devtools-api': 6.6.3 - vue: 3.5.3(typescript@5.5.3) + vue: 3.5.10(typescript@5.5.3) vue@3.4.38(typescript@5.5.3): dependencies: @@ -16195,13 +16402,13 @@ snapshots: optionalDependencies: typescript: 5.5.3 - vue@3.5.3(typescript@5.5.3): + vue@3.5.10(typescript@5.5.3): dependencies: - '@vue/compiler-dom': 3.5.3 - '@vue/compiler-sfc': 3.5.3 - '@vue/runtime-dom': 3.5.3 - '@vue/server-renderer': 3.5.3(vue@3.5.3(typescript@5.5.3)) - '@vue/shared': 3.5.3 + '@vue/compiler-dom': 3.5.10 + '@vue/compiler-sfc': 3.5.10 + '@vue/runtime-dom': 3.5.10 + '@vue/server-renderer': 3.5.10(vue@3.5.10(typescript@5.5.3)) + '@vue/shared': 3.5.10 optionalDependencies: typescript: 5.5.3 From 145ec2e34b9ad96a66c0ab21910478fbdd860ddd Mon Sep 17 00:00:00 2001 From: Bido Date: Sun, 29 Sep 2024 01:29:19 +0200 Subject: [PATCH 02/13] adjust github action --- .github/workflows/test.yml | 24 +++-- e2e/vite-webpack-rspack/tests/example.spec.ts | 96 +++++++++++++++-- examples/vite-vite/vite-host/vite.config.js | 2 +- examples/vite-vite/vite-remote/vite.config.js | 1 - .../vite-webpack-rspack/host/vite.config.js | 3 + package.json | 3 +- playwright.config.ts | 2 +- pnpm-lock.yaml | 101 ++++++++++++++++++ 8 files changed, 214 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a11ec7..7c8bada 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,15 +43,15 @@ jobs: - name: Build Projects run: pnpm build - - name: Start Vite Application - run: | - nohup pnpm run dev-vv & + # - name: Start Vite Application + # run: | + # nohup pnpm run dev-vv & - - name: Wait for Vite to be Ready - run: pnpm exec wait-on http://localhost:5175 + # - name: Wait for Vite to be Ready + # run: pnpm exec wait-on http://localhost:5175 - - name: Run Playwright Tests - run: pnpm playwright test --project=vite-vite + # - name: Run Playwright Tests + # run: pnpm playwright test --project=vite-vite # Although the server starts, Playwright is unable to access it; the network is not reachable. # - name: Start Rust-Vite Application @@ -64,6 +64,16 @@ jobs: # - name: Run Playwright Tests # run: pnpm playwright test --project=rust-vite + - name: Start Multi Example Application + run: | + nohup pnpm run multi-example & + + - name: Wait for Application to be Ready + run: pnpm exec wait-on http://localhost:5173 + + - name: Run Playwright Tests + run: pnpm playwright test --project=vite-webpack-rspack + - uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} with: diff --git a/e2e/vite-webpack-rspack/tests/example.spec.ts b/e2e/vite-webpack-rspack/tests/example.spec.ts index 0aa83d3..cfb75d0 100644 --- a/e2e/vite-webpack-rspack/tests/example.spec.ts +++ b/e2e/vite-webpack-rspack/tests/example.spec.ts @@ -1,13 +1,95 @@ import { expect, test } from '@playwright/test'; -test('example.com basic test', async ({ page }) => { +test.describe('Vite Host Tests', () => { + test('test header - vite host', async ({ page, baseURL }) => { + await page.goto(baseURL!); + + const womenButton = page.getByRole('button', { name: 'Women', exact: true }); + const manButton = page.getByRole('button', { name: 'Man', exact: true }); + const companyButton = page.getByRole('button', { name: 'Company', exact: true }); + const storesButton = page.getByRole('button', { name: 'Stores', exact: true }); + + await Promise.all([ + expect(womenButton).toBeVisible(), + expect(manButton).toBeVisible(), + expect(companyButton).toBeVisible(), + expect(storesButton).toBeVisible(), + ]); + }); + + test('test footer - vite host', async ({ page, baseURL }) => { + // Go to example.com + await page.goto(baseURL!); + + const productsHeading = page.getByRole('heading', { level: 3, name: 'Products', exact: true }); + const companyHeading = page.getByRole('heading', { level: 3, name: 'Company', exact: true }); + const customerServiceHeading = page.getByRole('heading', { + level: 3, + name: 'Customer Service', + exact: true, + }); + + await Promise.all([ + expect(productsHeading).toBeVisible(), + expect(companyHeading).toBeVisible(), + expect(customerServiceHeading).toBeVisible(), + ]); + }); +}); + +test.skip('test vite remote', async ({ page, baseURL }) => { + // Go to example.com + await page.goto(baseURL!); + + // Get the buttons with exact text + const womenButton = page.getByRole('button', { name: 'Women', exact: true }); + const manButton = page.getByRole('button', { name: 'Man', exact: true }); + const companyButton = page.getByRole('button', { name: 'Company', exact: true }); + const storesButton = page.getByRole('button', { name: 'Stores', exact: true }); + + // Assert that all buttons are visible using Promise.all + await Promise.all([ + expect(womenButton).toBeVisible(), + expect(manButton).toBeVisible(), + expect(companyButton).toBeVisible(), + expect(storesButton).toBeVisible(), + ]); +}); + +test.skip('test rspack remote', async ({ page, baseURL }) => { + // Go to example.com + await page.goto(baseURL!); + + // Get the buttons with exact text + const womenButton = page.getByRole('button', { name: 'Women', exact: true }); + const manButton = page.getByRole('button', { name: 'Man', exact: true }); + const companyButton = page.getByRole('button', { name: 'Company', exact: true }); + const storesButton = page.getByRole('button', { name: 'Stores', exact: true }); + + // Assert that all buttons are visible using Promise.all + await Promise.all([ + expect(womenButton).toBeVisible(), + expect(manButton).toBeVisible(), + expect(companyButton).toBeVisible(), + expect(storesButton).toBeVisible(), + ]); +}); + +test.skip('test webpack remote', async ({ page, baseURL }) => { // Go to example.com - await page.goto('https://example.com'); + await page.goto(baseURL!); - // Check the title of the page - await expect(page).toHaveTitle('Example Domain'); + // Get the buttons with exact text + const womenButton = page.getByRole('button', { name: 'Women', exact: true }); + const manButton = page.getByRole('button', { name: 'Man', exact: true }); + const companyButton = page.getByRole('button', { name: 'Company', exact: true }); + const storesButton = page.getByRole('button', { name: 'Stores', exact: true }); - // Check if the heading exists on the page - const heading = page.locator('h1'); - await expect(heading).toHaveText('Example Domain'); + // Assert that all buttons are visible using Promise.all + await Promise.all([ + expect(womenButton).toBeVisible(), + expect(manButton).toBeVisible(), + expect(companyButton).toBeVisible(), + expect(storesButton).toBeVisible(), + ]); }); diff --git a/examples/vite-vite/vite-host/vite.config.js b/examples/vite-vite/vite-host/vite.config.js index 062e38d..a039431 100644 --- a/examples/vite-vite/vite-host/vite.config.js +++ b/examples/vite-vite/vite-host/vite.config.js @@ -6,7 +6,7 @@ import topLevelAwait from 'vite-plugin-top-level-await'; // https://vitejs.dev/config/ export default defineConfig({ server: { - open: true, + host: true, port: 5175, }, preview: { diff --git a/examples/vite-vite/vite-remote/vite.config.js b/examples/vite-vite/vite-remote/vite.config.js index fb5e6b7..1c71e0a 100644 --- a/examples/vite-vite/vite-remote/vite.config.js +++ b/examples/vite-vite/vite-remote/vite.config.js @@ -6,7 +6,6 @@ import topLevelAwait from 'vite-plugin-top-level-await'; // https://vitejs.dev/config/ export default defineConfig({ server: { - open: true, port: 5176, origin: 'http://localhost:5176', }, diff --git a/examples/vite-webpack-rspack/host/vite.config.js b/examples/vite-webpack-rspack/host/vite.config.js index 5df4337..2fab9c5 100644 --- a/examples/vite-webpack-rspack/host/vite.config.js +++ b/examples/vite-webpack-rspack/host/vite.config.js @@ -23,6 +23,9 @@ const mfConfig = { // https://vitejs.dev/config/ export default defineConfig({ + server: { + host: true, + }, plugins: [ react(), federation({ diff --git a/package.json b/package.json index fe6c01d..513876c 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "prettier": "3.3.3", "pretty-quick": "^4.0.0", "rimraf": "^6.0.1", - "vite": "^5.4.3" + "vite": "^5.4.3", + "wait-on": "^8.0.1" } } \ No newline at end of file diff --git a/playwright.config.ts b/playwright.config.ts index cd6bba3..b5ac015 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -39,7 +39,7 @@ export default defineConfig({ name: 'vite-webpack-rspack', testDir: 'e2e/vite-webpack-rspack', use: { - baseURL: 'http://localhost:3004', + baseURL: 'http://localhost:5173', browserName: 'chromium', }, }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 57aa05b..cd96f81 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,6 +57,9 @@ importers: vite: specifier: ^5.4.3 version: 5.4.3(@types/node@22.7.4)(sass-embedded@1.77.8)(terser@5.31.6) + wait-on: + specifier: ^8.0.1 + version: 8.0.1 examples/nuxt-vite/nuxt-host: dependencies: @@ -1697,6 +1700,18 @@ packages: resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} + '@hapi/hoek@9.3.0': + resolution: + { + integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==, + } + + '@hapi/topo@5.1.0': + resolution: + { + integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==, + } + '@ioredis/commands@1.2.0': resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==} @@ -2495,6 +2510,24 @@ packages: react-refresh: optional: true + '@sideway/address@4.1.5': + resolution: + { + integrity: sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==, + } + + '@sideway/formula@3.0.1': + resolution: + { + integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==, + } + + '@sideway/pinpoint@2.0.0': + resolution: + { + integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==, + } + '@sindresorhus/merge-streams@2.3.0': resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} engines: {node: '>=18'} @@ -3263,6 +3296,12 @@ packages: axios@1.7.4: resolution: {integrity: sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==} + axios@1.7.7: + resolution: + { + integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==, + } + b4a@1.6.6: resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} @@ -4981,6 +5020,12 @@ packages: resolution: {integrity: sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==} hasBin: true + joi@17.13.3: + resolution: + { + integrity: sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==, + } + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -5280,6 +5325,12 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} + minimist@1.2.8: + resolution: + { + integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==, + } + minipass@3.3.6: resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} engines: {node: '>=8'} @@ -7751,6 +7802,14 @@ packages: typescript: optional: true + wait-on@8.0.1: + resolution: + { + integrity: sha512-1wWQOyR2LVVtaqrcIL2+OM+x7bkpmzVROa0Nf6FryXkS+er5Sa1kzFGjzZRqLnHa3n1rACFLeTwUqE1ETL9Mig==, + } + engines: { node: '>=12.0.0' } + hasBin: true + watchpack@2.4.2: resolution: {integrity: sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==} engines: {node: '>=10.13.0'} @@ -9304,6 +9363,12 @@ snapshots: '@fastify/busboy@2.1.1': {} + '@hapi/hoek@9.3.0': {} + + '@hapi/topo@5.1.0': + dependencies: + '@hapi/hoek': 9.3.0 + '@ioredis/commands@1.2.0': {} '@isaacs/cliui@8.0.2': @@ -10393,6 +10458,14 @@ snapshots: optionalDependencies: react-refresh: 0.14.2 + '@sideway/address@4.1.5': + dependencies: + '@hapi/hoek': 9.3.0 + + '@sideway/formula@3.0.1': {} + + '@sideway/pinpoint@2.0.0': {} + '@sindresorhus/merge-streams@2.3.0': {} '@surma/rollup-plugin-off-main-thread@2.2.3': @@ -11342,6 +11415,14 @@ snapshots: transitivePeerDependencies: - debug + axios@1.7.7: + dependencies: + follow-redirects: 1.15.6 + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + b4a@1.6.6: {} babel-loader@8.4.1(@babel/core@7.25.2)(webpack@5.94.0(webpack-cli@4.10.0)): @@ -13237,6 +13318,14 @@ snapshots: jiti@1.21.6: {} + joi@17.13.3: + dependencies: + '@hapi/hoek': 9.3.0 + '@hapi/topo': 5.1.0 + '@sideway/address': 4.1.5 + '@sideway/formula': 3.0.1 + '@sideway/pinpoint': 2.0.0 + js-tokens@4.0.0: {} js-tokens@9.0.0: {} @@ -13584,6 +13673,8 @@ snapshots: dependencies: brace-expansion: 2.0.1 + minimist@1.2.8: {} + minipass@3.3.6: dependencies: yallist: 4.0.0 @@ -16412,6 +16503,16 @@ snapshots: optionalDependencies: typescript: 5.5.3 + wait-on@8.0.1: + dependencies: + axios: 1.7.7 + joi: 17.13.3 + lodash: 4.17.21 + minimist: 1.2.8 + rxjs: 7.8.1 + transitivePeerDependencies: + - debug + watchpack@2.4.2: dependencies: glob-to-regexp: 0.4.1 From a593f79707a40e2610cd9382a8b6032e43201c61 Mon Sep 17 00:00:00 2001 From: Bido Date: Sun, 29 Sep 2024 01:55:36 +0200 Subject: [PATCH 03/13] adjust workflows to be reusable --- .github/workflows/build.yml | 1 - .github/workflows/test.yml | 62 ++++++------------- e2e/vite-vite/tests/example.spec.ts | 6 +- e2e/vite-webpack-rspack/tests/example.spec.ts | 51 +-------------- examples/vite-vite/vite-host/src/main.jsx | 2 +- 5 files changed, 24 insertions(+), 98 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 201ed2f..ae64bac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,6 @@ permissions: pull-requests: read jobs: - ########### BUILD PACKAGE ############ build-package: name: Build Package runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c8bada..c292d94 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,25 +16,19 @@ jobs: name: Run Playwright Tests runs-on: ubuntu-latest container: node:20 + strategy: + matrix: + project: [vite-vite, vite-webpack-rspack] steps: - name: Checkout uses: actions/checkout@v4 - - name: PNPM Install - uses: pnpm/action-setup@v4 - with: - version: 9.1.3 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 20.10.0 - cache: 'pnpm' - registry-url: https://registry.npmjs.org/ - - - run: corepack enable + - name: Enable Corepack and Setup PNPM + run: | + corepack enable + corepack prepare pnpm@9.1.3 --activate - - name: Install NPM Dependencies + - name: Install Dependencies run: pnpm install --frozen-lockfile - name: Install Chromium Browser @@ -43,40 +37,22 @@ jobs: - name: Build Projects run: pnpm build - # - name: Start Vite Application - # run: | - # nohup pnpm run dev-vv & - - # - name: Wait for Vite to be Ready - # run: pnpm exec wait-on http://localhost:5175 - - # - name: Run Playwright Tests - # run: pnpm playwright test --project=vite-vite - - # Although the server starts, Playwright is unable to access it; the network is not reachable. - # - name: Start Rust-Vite Application - # run: | - # nohup pnpm run dev-rv & - - # - name: Wait for Vite to be Ready - # run: pnpm exec wait-on http://localhost:5172 - - # - name: Run Playwright Tests - # run: pnpm playwright test --project=rust-vite - - - name: Start Multi Example Application + - name: Start Application (${{ matrix.project }}) run: | - nohup pnpm run multi-example & - - - name: Wait for Application to be Ready - run: pnpm exec wait-on http://localhost:5173 + if [ "${{ matrix.project }}" = "vite-vite" ]; then + nohup pnpm run dev-vv & + pnpm exec wait-on http://localhost:5175; + else + nohup pnpm run multi-example & + pnpm exec wait-on http://localhost:5173; + fi - - name: Run Playwright Tests - run: pnpm playwright test --project=vite-webpack-rspack + - name: Run Playwright Tests (${{ matrix.project }}) + run: pnpm playwright test --project=${{ matrix.project }} - uses: actions/upload-artifact@v4 if: ${{ !cancelled() }} with: - name: test-results + name: test-results-${{ matrix.project }} path: reports/e2e/output retention-days: 30 diff --git a/e2e/vite-vite/tests/example.spec.ts b/e2e/vite-vite/tests/example.spec.ts index 71b3dc9..3703351 100644 --- a/e2e/vite-vite/tests/example.spec.ts +++ b/e2e/vite-vite/tests/example.spec.ts @@ -1,11 +1,7 @@ import { expect, test } from '@playwright/test'; -test('example.com basic test', async ({ page, baseURL }) => { +test('verify basic test', async ({ page, baseURL }) => { await page.goto(baseURL!); - - // Get the heading by role with exact name 'Rust Host' const heading = page.getByRole('heading', { name: 'Vite Host', exact: true }); - - // Expect the heading to be visible await expect(heading).toBeVisible(); }); diff --git a/e2e/vite-webpack-rspack/tests/example.spec.ts b/e2e/vite-webpack-rspack/tests/example.spec.ts index cfb75d0..0f467d7 100644 --- a/e2e/vite-webpack-rspack/tests/example.spec.ts +++ b/e2e/vite-webpack-rspack/tests/example.spec.ts @@ -37,59 +37,14 @@ test.describe('Vite Host Tests', () => { }); }); -test.skip('test vite remote', async ({ page, baseURL }) => { - // Go to example.com +test.fixme('test vite remote', async ({ page, baseURL }) => { await page.goto(baseURL!); - - // Get the buttons with exact text - const womenButton = page.getByRole('button', { name: 'Women', exact: true }); - const manButton = page.getByRole('button', { name: 'Man', exact: true }); - const companyButton = page.getByRole('button', { name: 'Company', exact: true }); - const storesButton = page.getByRole('button', { name: 'Stores', exact: true }); - - // Assert that all buttons are visible using Promise.all - await Promise.all([ - expect(womenButton).toBeVisible(), - expect(manButton).toBeVisible(), - expect(companyButton).toBeVisible(), - expect(storesButton).toBeVisible(), - ]); }); -test.skip('test rspack remote', async ({ page, baseURL }) => { - // Go to example.com +test.fixme('test rspack remote', async ({ page, baseURL }) => { await page.goto(baseURL!); - - // Get the buttons with exact text - const womenButton = page.getByRole('button', { name: 'Women', exact: true }); - const manButton = page.getByRole('button', { name: 'Man', exact: true }); - const companyButton = page.getByRole('button', { name: 'Company', exact: true }); - const storesButton = page.getByRole('button', { name: 'Stores', exact: true }); - - // Assert that all buttons are visible using Promise.all - await Promise.all([ - expect(womenButton).toBeVisible(), - expect(manButton).toBeVisible(), - expect(companyButton).toBeVisible(), - expect(storesButton).toBeVisible(), - ]); }); -test.skip('test webpack remote', async ({ page, baseURL }) => { - // Go to example.com +test.fixme('test webpack remote', async ({ page, baseURL }) => { await page.goto(baseURL!); - - // Get the buttons with exact text - const womenButton = page.getByRole('button', { name: 'Women', exact: true }); - const manButton = page.getByRole('button', { name: 'Man', exact: true }); - const companyButton = page.getByRole('button', { name: 'Company', exact: true }); - const storesButton = page.getByRole('button', { name: 'Stores', exact: true }); - - // Assert that all buttons are visible using Promise.all - await Promise.all([ - expect(womenButton).toBeVisible(), - expect(manButton).toBeVisible(), - expect(companyButton).toBeVisible(), - expect(storesButton).toBeVisible(), - ]); }); diff --git a/examples/vite-vite/vite-host/src/main.jsx b/examples/vite-vite/vite-host/src/main.jsx index 0847c7b..78f2b9f 100644 --- a/examples/vite-vite/vite-host/src/main.jsx +++ b/examples/vite-vite/vite-host/src/main.jsx @@ -7,7 +7,7 @@ import './style.css'; const root = ReactDOM.createRoot(document.getElementById('app')); root.render( -

MF HOST Demo

+

Vite Host

); From 62951c6a9046af57a597e59019d6c86bea0ea4ba Mon Sep 17 00:00:00 2001 From: Bido Date: Sun, 29 Sep 2024 10:47:28 +0200 Subject: [PATCH 04/13] adjust upload artifacts only on failure --- .github/workflows/test.yml | 7 ++++--- playwright.config.ts | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c292d94..e8e5689 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,9 +50,10 @@ jobs: - name: Run Playwright Tests (${{ matrix.project }}) run: pnpm playwright test --project=${{ matrix.project }} - - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} + - name: Upload Artifacts on Failure + if: failure() + uses: actions/upload-artifact@v4 with: name: test-results-${{ matrix.project }} path: reports/e2e/output - retention-days: 30 + retention-days: 3 diff --git a/playwright.config.ts b/playwright.config.ts index b5ac015..34fc9b2 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -5,8 +5,9 @@ export default defineConfig({ timeout: 30 * 1000, retries: process.env.CI ? 2 : 0, workers: process.env.CI ? 1 : undefined, + forbidOnly: Boolean(process.env.CI), use: { - trace: 'on', + trace: 'retain-on-failure', screenshot: 'only-on-failure', video: 'retain-on-failure', }, From 606d286537aff133520def6b89b2adc0663b61ad Mon Sep 17 00:00:00 2001 From: Bido Date: Sun, 29 Sep 2024 13:36:29 +0200 Subject: [PATCH 05/13] add more e2e test for the multi example --- e2e/vite-webpack-rspack/tests/example.spec.ts | 41 +++++++++++++------ .../remote/src/Product.jsx | 3 +- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/e2e/vite-webpack-rspack/tests/example.spec.ts b/e2e/vite-webpack-rspack/tests/example.spec.ts index 0f467d7..8baf655 100644 --- a/e2e/vite-webpack-rspack/tests/example.spec.ts +++ b/e2e/vite-webpack-rspack/tests/example.spec.ts @@ -1,9 +1,11 @@ import { expect, test } from '@playwright/test'; test.describe('Vite Host Tests', () => { - test('test header - vite host', async ({ page, baseURL }) => { + test.beforeEach(async ({ page, baseURL }) => { await page.goto(baseURL!); + }); + test('test header - vite host', async ({ page }) => { const womenButton = page.getByRole('button', { name: 'Women', exact: true }); const manButton = page.getByRole('button', { name: 'Man', exact: true }); const companyButton = page.getByRole('button', { name: 'Company', exact: true }); @@ -17,10 +19,7 @@ test.describe('Vite Host Tests', () => { ]); }); - test('test footer - vite host', async ({ page, baseURL }) => { - // Go to example.com - await page.goto(baseURL!); - + test('test footer - vite host', async ({ page }) => { const productsHeading = page.getByRole('heading', { level: 3, name: 'Products', exact: true }); const companyHeading = page.getByRole('heading', { level: 3, name: 'Company', exact: true }); const customerServiceHeading = page.getByRole('heading', { @@ -37,14 +36,32 @@ test.describe('Vite Host Tests', () => { }); }); -test.fixme('test vite remote', async ({ page, baseURL }) => { - await page.goto(baseURL!); -}); +test.describe('Vite remote', () => {}); -test.fixme('test rspack remote', async ({ page, baseURL }) => { - await page.goto(baseURL!); +test.describe('Rspack remote', () => { + test('has title', async ({ page, baseURL }) => { + await page.goto(baseURL!); + const recentReviews = page.getByRole('heading', { + level: 2, + name: 'Customers also purchased', + exact: true, + }); + await expect(recentReviews).toBeVisible(); + }); }); -test.fixme('test webpack remote', async ({ page, baseURL }) => { - await page.goto(baseURL!); +test.describe('Webpack remote', () => { + test('has title', async ({ page, baseURL }) => { + await page.goto(baseURL!); + const furtherRecommendations = page.getByRole('heading', { + level: 2, + name: 'Customers also purchased', + exact: true, + }); + await expect(furtherRecommendations).toBeVisible(); + }); + + test('navigates to product page onclick', async () => { + // !TODO: to test proper navigation in the host! + }); }); diff --git a/examples/vite-webpack-rspack/remote/src/Product.jsx b/examples/vite-webpack-rspack/remote/src/Product.jsx index d039b65..0b1faf8 100644 --- a/examples/vite-webpack-rspack/remote/src/Product.jsx +++ b/examples/vite-webpack-rspack/remote/src/Product.jsx @@ -5,6 +5,7 @@ import ProductImage from './ProductImage'; export default () => { const [size, setSize] = useState('M'); const [color, setColor] = useState('black'); + return (
@@ -76,7 +77,7 @@ export default () => {