diff --git a/README.md b/README.md index 58adafe..df64eb7 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ For the longer walkthrough, see [`docs/user-guide.md`](docs/user-guide.md). ## Status -**v1.1.1 is live on the WordPress.org plugin directory** ([maestro-menu-editor](https://wordpress.org/plugins/maestro-menu-editor/)) — it includes the v1.1 polish release plus follow-up toolbar label refinements over the 1.0.0 base (roadmap in [`.planning/ROADMAP.md`](.planning/ROADMAP.md)). The server core (replay engine, REST API, sanitization) and the editor are done, and all test layers are expected to stay green (unit 44, integration 29, E2E coverage, JavaScript unit tests, phpcs, PHPStan, and Plugin Check on the runtime build). The editor uses the click-to-select model with debounced autosave: +**v1.3.1 is live on the WordPress.org plugin directory** ([maestro-menu-editor](https://wordpress.org/plugins/maestro-menu-editor/)) — it includes the v1.1 through v1.3 polish and fix releases over the 1.0.0 base (roadmap in [`.planning/ROADMAP.md`](.planning/ROADMAP.md)). The server core (replay engine, REST API, sanitization) and the editor are done, and all test layers are expected to stay green (unit 90, integration 47, E2E coverage, JavaScript unit tests, phpcs, PHPStan, and Plugin Check on the runtime build). The editor uses the click-to-select model with debounced autosave: - **Debounced autosave (~500 ms)** on reorder, rename, icon pick, visibility toggle, and per-item reset — no manual Save button; a "Saving… / Saved" status indicator (dashicon + text) instead. Saves are serialized (single-flight) so a slow request can't overwrite newer edits. Reload only on Exit (which flushes any pending save) and on Reset all. - **Click-to-select with one shared controls panel.** No edit chrome until an item is selected: each row shows only a hover/focus-revealed drag handle. Selecting an item opens the shared panel (rename, icon picker for top-level items, per-role visibility, reset-this-item). diff --git a/TESTING.md b/TESTING.md index 33684b2..6f95efb 100644 --- a/TESTING.md +++ b/TESTING.md @@ -2,7 +2,7 @@ Three layers, smallest and fastest first. -> **Current expected status:** unit 44/44, integration 29/29 with 81 assertions, JavaScript unit tests, phpcs, PHPStan, Plugin Check, and the Playwright E2E suite should pass before release. E2E coverage includes reset-this-item, per-role visibility, icon persistence, keyboard reordering, first-run cues, and toolbar accessibility checks. +> **Current expected status:** unit 90/90 with 101 assertions, integration 47/47 with 122 assertions, JavaScript unit tests, phpcs, PHPStan, Plugin Check, and the Playwright E2E suite should pass before release. E2E coverage includes reset-this-item, per-role visibility, icon persistence, keyboard reordering, first-run cues, and toolbar accessibility checks. ## Gotchas (first run) @@ -60,12 +60,13 @@ npx playwright install # one-time browser download npm run test:e2e # or: npm run test:e2e:headed ``` -The E2E global setup normalizes the tests-site `admin` and `maestro_editor` +The E2E auth setup normalizes the tests-site `admin` and `maestro_editor` passwords to `password` before browser login, so reruns are deterministic even after a persisted wp-env database has drifted. Targets the wp-env **tests** instance at `http://localhost:8889` -(default login `admin` / `password`). [`global-setup.ts`](tests/e2e/global-setup.ts) authenticates once and +(default login `admin` / `password`). [`auth.setup.ts`](tests/e2e/auth.setup.ts) runs as a +Playwright setup project that every spec depends on — it authenticates once and stores the session. ### Test isolation and why the suite runs serially diff --git a/tests/e2e/fixtures.ts b/tests/e2e/fixtures.ts index ff2b317..f4601d5 100644 --- a/tests/e2e/fixtures.ts +++ b/tests/e2e/fixtures.ts @@ -21,7 +21,7 @@ import { execFileSync } from 'child_process'; /** * Delete the single shared plugin option on the wp-env *tests* instance via - * wp-cli — the same harness/auth path global-setup.ts uses. + * wp-cli — the same harness/auth path auth.setup.ts uses. * * `wp option delete` is idempotent for our purposes: when the option is already * absent (the clean baseline) wp-cli exits non-zero, which we deliberately diff --git a/tests/e2e/specs/capture-screenshots.spec.ts b/tests/e2e/specs/capture-screenshots.spec.ts index 31ae2dc..34c3e25 100644 --- a/tests/e2e/specs/capture-screenshots.spec.ts +++ b/tests/e2e/specs/capture-screenshots.spec.ts @@ -15,7 +15,7 @@ import { execFileSync } from 'child_process'; * `test:e2e` / CI run never regenerates or overwrites the committed PNGs. * * Auth: inherits the shared storageState admin session from playwright.config.ts - * (global-setup logs in once) — same path every other spec uses. No bespoke auth. + * (auth.setup.ts logs in once) — same path every other spec uses. No bespoke auth. */ const CAPTURE = Boolean( process.env.MAESTRO_CAPTURE ); @@ -26,7 +26,7 @@ const CAPTURE = Boolean( process.env.MAESTRO_CAPTURE ); * deliberately NOT in the set (CONTEXT §UAT/verification). * * Colour scheme is set via `wp user meta update` against the running wp-env - * tests-cli container (same container global-setup.ts provisions the admin + * tests-cli container (same container auth.setup.ts provisions the admin * user against) — there is no in-browser UI path to switch schemes faster * than a page reload, and the profile-screen toggle would add an unrelated * navigation to every capture. Requires Docker/wp-env; MAESTRO_CAPTURE-gated