Skip to content

Spike: e2e driver harness (wdio Phase 0) for investigation trace runs #118

Description

@RE-codes

Story

As the developer running the native event investigation (Epic #32), I want a small WebdriverIO + wdio-obsidian-service harness that can drive Obsidian deterministically — switch Reading/Live Preview/Source, toggle the plugin, and dispatch trusted gestures — so the trace runs in #34 and #35 are clean, repeatable, and multi-sample instead of hand-performed and noisy.

This is the driver. Issue #33 (nativeEventTracer.ts) is the logger. They are complementary: the spike performs gestures; the tracer records them.

It is also the e2e PRD's Phase 0: it validates the four load-bearing assumptions before any full e2e suite is built. Building it here, where the investigation already needs a deterministic driver, earns that validation for free.

References

Scope — the four unknowns to prove

  • Drive Reading / Live Preview / Source via leaf.setViewState({ type: "markdown", state: { file, mode, source } }) and read the mode back.
  • Dispatch trusted middle-click and Ctrl/Cmd-click via the WDIO Actions API and confirm Obsidian's native handlers run (e.g. a new tab opens).
  • Toggle the plugin off/on at runtime (app.plugins.disablePlugin / enablePlugin) — the tracer's required plugin-disabled mode (procedure step 2).
  • Distinguish Live Preview rendered vs unrendered link by caret position (editor.setCursor).

Definition of Done

  • A throwaway spec demonstrates all four unknowns on a real sandboxed Obsidian (earliest + latest).
  • The harness can open a fixture, set a mode, dispatch a gesture, and run with the plugin disabled — enough to drive a trace capture for Capture baseline native + plugin-disabled GFM event traces #34 / Run gesture matrix traces with plugin enabled #35.
  • Findings recorded (which unknowns held, any surprises), and any that failed flagged before committing further to the e2e approach.
  • Committed test/vaults/parity/ + wdio.conf.mts exist (the foundation the later full suite reuses).

Out of scope

Caveat

Drive ordering-sensitive rows freely (event order is Obsidian's, not the driver's). Cross-check absolute timing-magnitude rows (e.g. the middle-click delay) against a manual gesture, since automated input dispatch can perturb latency. If the spike snags, #34 / #35 can fall back to manual driving — drop the blocker if so.

Relationships

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:editorEditor mode handler / CodeMirror extensionarea:investigationTracing or measurement; produces findings, not featuresmvpPersonal-use MVP scope

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions