Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/e2e-playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ on:
- 'src/**'
- 'shared/**'
- 'tools/compat-testing/**'
- 'idaptik-ums/**'
- 'vite.config.js'
- '.github/workflows/e2e-playwright.yml'
pull_request:
branches: [main, master]
paths:
- 'src/**'
- 'shared/**'
- 'tools/compat-testing/**'
- 'idaptik-ums/**'
- 'vite.config.js'
- '.github/workflows/e2e-playwright.yml'
workflow_dispatch:

permissions: read-all
Expand Down Expand Up @@ -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' }}
Expand Down
6 changes: 3 additions & 3 deletions tools/compat-testing/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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',
},
Expand Down Expand Up @@ -74,7 +74,7 @@ export default defineConfig({

webServer: {
command: 'deno task dev:vite',
port: 8080,
port: 1984,
reuseExistingServer: true,
timeout: 60000,
},
Expand Down
14 changes: 12 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Loading