Skip to content

Platform screenshots resolve to their own platform, and a failed setup is pictured - #81

Merged
ptescher merged 3 commits into
mainfrom
platform-screenshots
Nov 12, 2026
Merged

ptescher merged 3 commits into
mainfrom
platform-screenshots

Conversation

@ptescher

Copy link
Copy Markdown
Owner

Each platform's results name its own screenshots (closes #77)

expectation-run wrote a later platform's screenshots under platforms/<name>/screenshots/, while its manual looked in the docs' shared screenshots/ under the same names the default platform uses. The manual showed a placeholder, or the default platform's picture.

  • A later platform's per-test screenshots go to screenshots/platforms/<name>/<test>/ in the shared docs directory, and its results name them so.
  • New: RunOptions::screenshots_under, Acceptance::screenshots_under() and Acceptance::run_options(dir). expectation-run --docs uses them.
  • A later platform's result that still names screenshots/<test>/… is shown as a placeholder, in its own manual and where the default manual borrows its results.
  • The default platform and content-addressed stores are unchanged.
  • The kettle demo's SwiftUI and React Native screenshots are moved to their folders (not re-captured), and their results files name them there.

Picture a start that couldn't be set up (closes #80)

  • When the reset or an arrangement fails, the runner still asks for a screenshot and keeps it as the failed start's, in the docs directory or the store.
  • The setup error and failed verdict are unchanged, later steps are skipped, and attachments are still kept.
  • With screenshots off, the driver is not asked.
  • A failed step's picture is captioned "What it looked like when this failed." in HTML and Markdown. This applies to failed actions too.

Tests

  • crates/remote/tests/platform_screenshots.rs runs the real expectation-run binary for two platforms with the same story and different images, regenerates with expectation docs, and checks old-style names give a placeholder.
  • crates/harness/tests/setup_failure.rs covers reset and arrangement failure with both destinations, a camera that also fails, and screenshots disabled.
  • cargo test --workspace and cargo clippy --workspace --all-targets pass locally.

🤖 Generated with Claude Code

ptescher and others added 3 commits November 11, 2026 09:44
When the reset or an arrangement fails, the runner still asks for a screenshot
and keeps it as the failed start's, in the docs directory or the store. The
setup's error and the failed verdict stand whether or not there is a picture,
the later steps are skipped as before, and nothing is asked of the driver when
screenshots are off.

A failed step's picture says so in the manual: "What it looked like when this
failed."

Closes #80

Co-Authored-By: Claude <noreply@anthropic.com>
expectation-run wrote a later platform's screenshots under its own tree
(platforms/<name>/screenshots/) while its manual looked in the docs' shared
screenshots/, under the same names the default platform uses. The manual showed
"No screenshot of this step", or the default platform's picture.

A later platform's per-test screenshots now go to
screenshots/platforms/<name>/<test>/ in the shared docs directory, and its
results name them so (RunOptions::screenshots_under, which
Acceptance::run_options and expectation-run set). A per-test name outside that
folder is from before this and is shown as a placeholder, in the platform's own
manual and where the default manual borrows its results. Screenshots kept by
content are unchanged.

The kettle demo's SwiftUI and React Native screenshots move to their folders,
and their results name them there.

Closes #77

Co-Authored-By: Claude <noreply@anthropic.com>
A test took a random port from 5000 to 5999. fetch refuses 5060 and 5061, so on
those the app never reached the runner and the test failed after 20 seconds.

Co-Authored-By: Claude <noreply@anthropic.com>
@ptescher
ptescher merged commit cbfe103 into main Nov 12, 2026
3 checks passed
@ptescher
ptescher deleted the platform-screenshots branch November 12, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runner: capture a best-effort screenshot when reset or arrangement fails Runner screenshots disappear or cross platforms in multi-platform manuals

1 participant