Run the e2e suite in CI and cover the plugin's core behaviour - #214
Merged
Conversation
The suite from #198 wasn't wired to anything, so this runs it on pull requests, under xvfb because Obsidian is an Electron app. Adds coverage for the parts a plugin upgrade is most likely to disturb: creating a drawing, editing it, and reading it back from disk; the canvas background matching the Obsidian theme and following a theme change; and the plugin's own canvas chrome and main menu rendering. The existing load-plugin spec asserts the plugin appears in app.plugins.plugins, which Obsidian populates before onload() finishes — so it passes even when the plugin is broken. Each spec creates its own drawing rather than opening a committed fixture, so nothing here depends on the schema version of a file on disk and the suite stays valid across tldraw upgrades.
Whitespace-only churn from running prettier across the test folder; the file's behaviour is untouched by this branch.
View mode is the plugin's own machinery rather than anything tldraw provides: a drawing stored in markdown can be shown as a canvas or as the note it really is, and the plugin swaps the leaf's view between them. Embedding takes a different path again — the embed registry and a TldrawImage rather than a full editor — and is the path the TldrawImage patch exists for, so the test asserts an image actually rendered rather than just that the container appeared. The embed loads lazily and needs a shape to draw, so the drawing gets one first and is scrolled into view.
frolic
marked this pull request as ready for review
July 27, 2026 14:09
This was referenced Jul 27, 2026
Merged
frolic
added a commit
that referenced
this pull request
Jul 29, 2026
Bumps the version so 1.30.0 can be released to everyone, rather than only to BRAT users as `1.30.0-alpha.1` was. What ships in it: - **tldraw 5.2.5** (#212), so `.tldr` files saved by a current version of tldraw open instead of failing with `Incompatible schema?` and an empty tab — likely closing #184, #138, and the "corrupted file" report on #193 - **`.tldraw` messaging** (#211): opening one from tldraw offline explains why it can't be opened yet and links to the export instructions, rather than landing on Obsidian's unknown-file screen - the e2e suite now running in CI (#214) and a one-click release (#215) `npm version` cascades the version into `release/manifest.json` and `release/versions.json` on its own — the repo has a `version` lifecycle script — so those changes are mechanical. ### One thing that isn't mechanical This drops a `"1.29.1"` entry from `release/versions.json`. That version was staged in b48442c and never released — there's no tag and no GitHub release for it. It matters here because releasing a non-prerelease copies `release/versions.json` over the root `versions.json`, which is the file the plugin registry reads, so the phantom entry would have been published. Everything in that file shares the same `minAppVersion`, so it was unlikely to misresolve anyone's install, but it shouldn't go out either way. After this, `release/versions.json` matches the published file exactly apart from the new `1.30.0` line. ### Release plan Merge, then Actions → Manual Release → Run workflow with `ref: main`. Unlike the alpha, this path adds the `versions.json` entry and pushes the manifest commit back, which is what makes it visible to everyone on the community plugin list. ### Worth knowing before merging `1.30.0-alpha.1` was published but, as far as I know, never installed and exercised through BRAT. So the evidence behind this release is the CI suite (8 behaviours, including opening a current `.tldr`, the theme, the edit round trip, view mode and embeds) plus manual checks in a scratch vault — not a soak on a real vault. Mobile is untested by anything.
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.
The e2e suite from #198 has never run anywhere — the repo only has
manual-release.yml— and the one spec in it can't tell a working plugin from a broken one. It asserts the plugin appears inapp.plugins.plugins, which Obsidian populates beforeonload()finishes, so it passes even when registration has failed and no file will open.This runs the suite on pull requests and covers the behaviour an SDK upgrade is most likely to disturb, so there's a baseline to upgrade against rather than a leap of faith. It's the groundwork for #212, which bumps tldraw across a major version.
What's covered:
Two decisions worth knowing about:
element.click(). tldraw's menus open on pointer events, which a synthetic in-page click doesn't produce — it silently opens nothing and the assertion passes against an empty string.The workflow runs under
xvfbbecause Obsidian is an Electron app and needs a display.Test plan
Everything here is the test. Verified locally against the plugin as it stands today — 6 tests across 4 specs, ~22s:
Not covered
Visual correctness — these assert elements exist, not that they look right. Also markdown view mode, embeds in reading view, and mobile.