mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
- Added a new GitHub Actions workflow for end-to-end (E2E) testing, including setup for Node.js, Playwright, and server initialization. - Introduced a setup script for E2E test fixtures to create necessary directories and files. - Integrated CodeMirror for XML syntax editing in the XmlSyntaxEditor component, improving code highlighting and editing experience. - Updated package dependencies in package.json and package-lock.json to include new libraries for XML handling and theming. - Refactored various components for improved readability and consistency, including the sidebar and file browser dialog. - Added tests for spec editor persistence to ensure data integrity across sessions.
40 lines
956 B
TypeScript
40 lines
956 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
const port = process.env.TEST_PORT || 3007;
|
|
const reuseServer = process.env.TEST_REUSE_SERVER === "true";
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests",
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: "html",
|
|
timeout: 30000,
|
|
use: {
|
|
baseURL: `http://localhost:${port}`,
|
|
trace: "on-first-retry",
|
|
screenshot: "only-on-failure",
|
|
},
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
],
|
|
...(reuseServer
|
|
? {}
|
|
: {
|
|
webServer: {
|
|
command: `npx next dev -p ${port}`,
|
|
url: `http://localhost:${port}`,
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 120000,
|
|
env: {
|
|
...process.env,
|
|
NEXT_PUBLIC_SKIP_SETUP: "true",
|
|
},
|
|
},
|
|
}),
|
|
});
|