Emdash source with visual editor image upload fix

Fixes:
1. media.ts: wrap placeholder generation in try-catch
2. toolbar.ts: check r.ok, display error message in popover
This commit is contained in:
2026-05-03 10:44:54 +07:00
parent 78f81bebb6
commit 2d1be52177
2352 changed files with 662964 additions and 0 deletions

38
playwright.config.ts Normal file
View File

@@ -0,0 +1,38 @@
import { defineConfig, devices } from "@playwright/test";
/**
* Playwright E2E test configuration for EmDash CMS
*
* Tests run against an isolated fixture (not a demo app).
* Global setup creates a temp directory, starts a fresh dev server,
* runs setup via dev-bypass, and seeds collections with test data.
* Port 4444 is used to avoid conflicts with development servers.
*/
export default defineConfig({
testDir: "./e2e/tests",
// Disable parallel to avoid shared database state issues
fullyParallel: false,
workers: 1,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
reporter: "html",
timeout: 30000,
globalSetup: "./e2e/global-setup.ts",
globalTeardown: "./e2e/global-teardown.ts",
use: {
baseURL: "http://localhost:4444",
trace: "on-first-retry",
screenshot: "only-on-failure",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
// No webServer — global-setup.ts handles server lifecycle
});