Add Playwright E2E tests replacing Cypress with MSW integration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-22 16:43:32 +08:00
parent 67a723207f
commit aa2661b556
33 changed files with 2284 additions and 7 deletions

View File

@@ -0,0 +1,27 @@
// The Lucia project.
// Copyright 2026-2026 DSP, inc. All rights reserved.
// Authors:
// imacat.yang@dsp.im (imacat), 2026/03/22
import { defineConfig } from "@playwright/test";
export default defineConfig({
testDir: "./specs",
timeout: 30000,
expect: { timeout: 5000 },
use: {
baseURL: "http://localhost:4173",
viewport: { width: 1280, height: 720 },
},
projects: [
{
name: "chromium",
use: { browserName: "chromium" },
},
],
webServer: {
command: "npx vite preview --port 4173",
port: 4173,
reuseExistingServer: true,
},
});