diff --git a/e2e/solid-start/basic-auth/.gitignore b/e2e/solid-start/basic-auth/.gitignore index 75a469e80c0..d4aca0efe1c 100644 --- a/e2e/solid-start/basic-auth/.gitignore +++ b/e2e/solid-start/basic-auth/.gitignore @@ -18,3 +18,4 @@ yarn.lock /playwright-report/ /blob-report/ /playwright/.cache/ +.tmp/ diff --git a/e2e/solid-start/basic-auth/dev.db b/e2e/solid-start/basic-auth/dev.db index 5f4ab51a029..42821d6b9b7 100644 Binary files a/e2e/solid-start/basic-auth/dev.db and b/e2e/solid-start/basic-auth/dev.db differ diff --git a/e2e/solid-start/basic-auth/package.json b/e2e/solid-start/basic-auth/package.json index de2560c02f2..f4140c438c1 100644 --- a/e2e/solid-start/basic-auth/package.json +++ b/e2e/solid-start/basic-auth/package.json @@ -6,11 +6,11 @@ "scripts": { "dev": "vite dev --port 3000", "dev:e2e": "vite dev", - "build": "vite build", + "build": "vite build && tsc --noEmit", "preview": "vite preview", - "start": "node .output/server/index.mjs", + "start": "pnpx srvx --prod -s ../client dist/server/server.js", "prisma-generate": "prisma generate", - "test:e2e": "exit 0; rm -rf port*.txt; pnpm run prisma-generate && playwright test --project=chromium" + "test:e2e": "rm -rf port*.txt; mkdir -p .tmp; rm -f .tmp/dev.db .tmp/dev.db-journal .tmp/dev.db-wal .tmp/dev.db-shm; export DATABASE_URL=file:./.tmp/dev.db; pnpm run prisma-generate && pnpm exec prisma migrate deploy && playwright test --project=chromium" }, "dependencies": { "@libsql/client": "^0.15.15", @@ -32,6 +32,7 @@ "dotenv": "^17.2.3", "postcss": "^8.5.1", "prisma": "^7.0.0", + "srvx": "^0.9.8", "tailwindcss": "^4.1.17", "typescript": "^5.7.2", "vite-plugin-solid": "^2.11.10", diff --git a/e2e/solid-start/basic-auth/playwright.config.ts b/e2e/solid-start/basic-auth/playwright.config.ts index 18b8905468f..d8ab0dd8cc4 100644 --- a/e2e/solid-start/basic-auth/playwright.config.ts +++ b/e2e/solid-start/basic-auth/playwright.config.ts @@ -1,7 +1,13 @@ +import { fileURLToPath } from 'node:url' +import path from 'node:path' import { defineConfig, devices } from '@playwright/test' import { getTestServerPort } from '@tanstack/router-e2e-utils' import packageJson from './package.json' with { type: 'json' } +// Ensure port file is written next to this config, even if Playwright loads it +// from a different working directory. +process.chdir(path.dirname(fileURLToPath(import.meta.url))) + const PORT = await getTestServerPort(packageJson.name) const baseURL = `http://localhost:${PORT}` /** @@ -19,7 +25,7 @@ export default defineConfig({ }, webServer: { - command: `VITE_SERVER_PORT=${PORT} pnpm build && PORT=${PORT} VITE_SERVER_PORT=${PORT} pnpm start`, + command: `pnpm build && VITE_SERVER_PORT=${PORT} PORT=${PORT} pnpm start`, url: baseURL, reuseExistingServer: !process.env.CI, stdout: 'pipe', diff --git a/e2e/solid-start/basic-auth/src/components/Auth.tsx b/e2e/solid-start/basic-auth/src/components/Auth.tsx index de9d9e76f63..d1a2da67f0e 100644 --- a/e2e/solid-start/basic-auth/src/components/Auth.tsx +++ b/e2e/solid-start/basic-auth/src/components/Auth.tsx @@ -9,7 +9,7 @@ export function Auth({ actionText: string onSubmit: (e: HTMLFormElement) => void status: 'pending' | 'idle' | 'success' | 'error' - afterSubmit?: JSX.Element + afterSubmit?: () => JSX.Element }) { return (
The page you are looking for does not exist.
} ++ + + Start Over + +
+[]>(
+ arg: [...P],
+ options?: { isolationLevel?: Prisma.TransactionIsolationLevel },
+ ): runtime.Types.Utils.JsPromise