--- name: e2e-driving description: Drive the real Obsidian GUI from the CLI for SystemSculpt plugin testing — click, type, submit, attach files, change settings, run scripted scenarios, and read live UI state deterministically via data-testid targets. Use whenever testing plugin UI behavior, verifying a UI change in the live app, reproducing a user journey, debugging ChatView/settings/Studio interactions, or authoring E2E scenarios. Replaces Computer Use for this plugin. --- # E2E driving: CLI control of the live Obsidian GUI Every action is a synthesized user event (pointer, keyboard, input, file-picker change) on the real DOM — never a service shortcut — so a scripted run exercises exactly what a human's clicks would. Round trips are 1–10ms. Full docs: "CLI E2E driving" in docs/development.md. ## Preconditions - Obsidian must be running a development/staging build. Release builds exclude the driver (`__SS_TEST_DRIVER__` define; artifact-gated both directions). - The dev watcher builds, syncs, and hot-reloads automatically on source changes; the driver reconnects within ~1s. Verify the loop is alive with `npm run e2e -- status` (shows vault, version, build stamp). - If the driver never connects: the loaded bundle predates the driver, or the watcher process predates a build-config change — `npm run dev:watch:install` restarts it from the canonical checkout, then check `~/Library/Logs/SystemSculpt/obsidian-plugin-dev.log` for the sync+reload. - A plugin reload (every watcher sync) resets in-flight UI state — sequence scenarios after the reload settles, and never mid-edit of driver source. ## Targets Canonical addressing is `data-testid`: dot-namespaced, product-shaped ids stamped by the UI factories (`chat.composer.send`, `chat.turn.edit-resubmit`, `settings.tab.chat`, `studio.node.run`). - `npm run e2e -- targets` — full generated catalog (174+ ids). - `npm run e2e -- targets --live` — what is in the DOM right now, with per-element visibility. Zero results usually means the surface isn't open. - Escape hatches: `css:`, `chat:` (chat view scope), `label:`, `setting:` (any Obsidian settings row by its visible name — resolves to the row's toggle/dropdown/input), and `settings.tab: