@eyeauras/workbench-testing
Shared Playwright defaults for applications built with EyeAuras UI Workbench. Install it as development tooling; it is not a runtime dependency of the Workbench framework.
npm install --save-dev @eyeauras/[email protected] @playwright/[email protected] @types/node
The package installs its matching headless Chromium build, fails otherwise-passing tests on unexpected
console.error or uncaught page errors, and provides conservative defaults through
defineWorkbenchPlaywrightConfig. Consumers still own testDir, baseURL, webServer, selectors,
application fixtures, and any optional BDD setup.
// playwright.config.ts
import { defineWorkbenchPlaywrightConfig } from "@eyeauras/workbench-testing";
export default defineWorkbenchPlaywrightConfig({
testDir: "./tests/ui",
use: { baseURL: "http://127.0.0.1:4175" },
webServer: {
command: "npm run dev -- --host 127.0.0.1 --port 4175 --strictPort",
url: "http://127.0.0.1:4175",
reuseExistingServer: false,
},
});
// tests/ui/example.spec.ts
import { expect, test } from "@eyeauras/workbench-testing";
test("opens the editor", async ({ page }) => {
await page.goto("/");
await expect(page.getByRole("main")).toBeVisible();
});
Normal runs are headless and single-worker. Use Playwright's --headed flag when interactive diagnosis
is intentional. An HTML report is generated but never opened automatically.
This example assumes a Vite application with an npm run dev script. Run npx playwright test
from the consumer. On Linux install Playwright system dependencies once with
npx playwright install-deps chromium. Test tooling requires the supported Node version of the host
project; it adds no React, Tauri or Workbench runtime dependency.