diff --git a/.github/workflows/e2e-playwright.yml b/.github/workflows/e2e-playwright.yml index 4977d819..7e114f4f 100644 --- a/.github/workflows/e2e-playwright.yml +++ b/.github/workflows/e2e-playwright.yml @@ -13,6 +13,8 @@ on: - 'src/**' - 'shared/**' - 'tools/compat-testing/**' + - 'idaptik-ums/**' + - 'vite.config.js' - '.github/workflows/e2e-playwright.yml' pull_request: branches: [main, master] @@ -20,6 +22,9 @@ on: - 'src/**' - 'shared/**' - 'tools/compat-testing/**' + - 'idaptik-ums/**' + - 'vite.config.js' + - '.github/workflows/e2e-playwright.yml' workflow_dispatch: permissions: read-all @@ -54,8 +59,8 @@ jobs: - name: Install dependencies run: deno install --node-modules-dir=auto - - name: Build ReScript - run: deno task res:build || echo "ReScript build attempted" + - name: Build ReScript (root) + run: deno task res:build - name: Install Playwright browsers run: npx playwright install --with-deps ${{ matrix.project == 'firefox-1080p' && 'firefox' || matrix.project == 'webkit-1080p' && 'webkit' || 'chromium' }} diff --git a/tools/compat-testing/playwright.config.js b/tools/compat-testing/playwright.config.js index 05ade3f1..a1106472 100644 --- a/tools/compat-testing/playwright.config.js +++ b/tools/compat-testing/playwright.config.js @@ -7,7 +7,7 @@ import { defineConfig, devices } from '@playwright/test'; export default defineConfig({ - testDir: './tools/compat-testing/tests', + testDir: './tests', timeout: 30000, retries: 1, fullyParallel: true, @@ -19,7 +19,7 @@ export default defineConfig({ // Shared settings applied to every project unless overridden. use: { - baseURL: 'http://localhost:8080', + baseURL: 'http://localhost:1984', trace: 'on-first-retry', screenshot: 'only-on-failure', }, @@ -74,7 +74,7 @@ export default defineConfig({ webServer: { command: 'deno task dev:vite', - port: 8080, + port: 1984, reuseExistingServer: true, timeout: 60000, }, diff --git a/vite.config.js b/vite.config.js index b7dadd7f..c4264ab2 100644 --- a/vite.config.js +++ b/vite.config.js @@ -89,8 +89,18 @@ export default defineConfig({ }, }, optimizeDeps: { - // Include AffineScript dependencies for proper optimization - include: ['@src/app/tea/AffineTEA.js', '@src/app/tea/AffineTEARouter.js'], + // Vite pre-bundles relative-path .js imports automatically as it walks + // the module graph from the entry HTML, so the explicit include is + // redundant. The prior '@src/...' bare-specifier shape failed to resolve + // (no '@src' alias is configured; only 'affinescript' and '@tea' are). + include: [], + // Scope entry discovery to the root index.html only. Vite's default + // crawls every .html in the project, which pulled in idaptik-ums/index.html + // — a separate Tauri webview entry that imports its own (independently + // built) src/App.res.mjs. Playwright tests only exercise the root '/' path, + // so scanning idaptik-ums is wasted work and was previously crashing the + // dev-server boot under the Playwright webServer 60s timeout. + entries: ['index.html'], }, define: { APP_VERSION: JSON.stringify(process.env.npm_package_version),