Assert the altitude prefill from /api/elevation in the E2E suite - #34
Merged
Merged
Conversation
The form looks elevation up as soon as coordinates are typed and writes the answer into the altitude field (SearchForm.tsx, the auto-lookup effect). Nothing asserted that: the unit tests and this suite both stub /api/elevation, the stub's own comment says it exists only so the request cannot reject noisily, and the deploy smoke only proves the route is up. The one test that did cover the behaviour lived in retina-server's suite and was deleted there in offworldlabs/retina-server#387, since that repo no longer serves this UI. This is that test, rehomed and made deterministic: the file-level mock answers 43, so the field must read 43. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Claude finished @Babissimo's task in 1m 15s —— View job Review: PR #34 — Assert altitude prefill from
|
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.
Why
SearchForm.tsxlooks elevation up as soon as coordinates are typed and writes the answer into the altitude field. Nothing in this repo asserted that behaviour:SearchForm.test.tsxand this suite both stub/api/elevation, the stub's own comment says it is there so the request cannot reject noisily, anddeploy/smoke-test.shonly proves the route answers. The one test that covered it lived in retina-server's Playwright suite (auto-fetches elevation when lat/lon are entered) and was deleted there in offworldlabs/retina-server#387, because since the Origin Rule flip that repo no longer serves this UI.What
One test in
frontend/e2e/tower-finder.spec.ts, in the search-form group: fill latitude and longitude, expect the altitude field to read43, the value the file-levelbeforeEachmock returns. Stronger than the original, which ran unmocked and accepted either a populated field or a request having fired.Verified
npm run test:e2eagainst the builtdist: 15 passed (the 14 existing tests plus this one).99the test fails withExpected: "43", Received: "99", so the assertion is live.npm run typecheckclean.ClickUp: Playwright's frontend host points at the rule-captured towers hostnames.
🤖 Generated with Claude Code