chore(e2e): adopt shared createPluginHarness#287
Merged
Conversation
Deploying podnotes with
|
| Latest commit: |
c68b9a3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e6235951.podnotes.pages.dev |
| Branch Preview URL: | https://chore-shared-harness.podnotes.pages.dev |
Owner
Author
|
Ready for your merge. All CI green (Test, both CodeQL analyses, Graphite AI review, Cloudflare Pages) and no outstanding review threads. Live |
The factory defaults symlinkRepoRoot to process.cwd(), so the dev-vault symlink preflight compared against <caller-cwd>/main.js and rejected correct symlinks when Vitest was launched from an IDE or parent directory. Derive the repo root from import.meta.url like the old harness did. (Adversarial review finding on this PR.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates PodNotes' hand-rolled E2E harness onto
obsidian-e2e@^0.8.1's sharedcreatePluginHarnessfactory. This is the PodNotes consumer of the same deduplication already merged for MetaEdit (chhoumann/MetaEdit#180).tests/e2e/harness.tsdrops from 338 to ~160 lines. The removed code is plumbing the factory now owns: the vault lock + marker lifecycle, sandbox creation, per-test diagnostics reset, data restore, plugin reload, failure-artifact capture, and the dev-vault symlink preflight. What stays is only PodNotes-specific: the ready predicate (API + protocol handler attached), the detach-views -> flush-saves ordering before data restore, and the plugin-ready command sentinel.evalJsonAsyncnow delegates to the factory's serializer. For every value current tests exchange (plain JSON data) behavior is identical; the envelope contract itself is intentionally the factory's, which differs at the edges (a returnedDateis rejected as non-plain instead of silently becoming an ISO string,undefinedround-trips via sentinel instead of being dropped, and remote failures throwDevEvalErrorinstead of plainError). Adversarial review confirmed no current call site depends on the old edge behavior.Review follow-ups applied:
symlinkRepoRootis passed module-relative; the factory'sprocess.cwd()default broke IDE-launched runs.