Repository navigation
test(monitor): follow the trajectory preview and the toast in the exp… - #10
Merged
Merged
Conversation
…ort spec
tests/trajectory-export.spec.js was written when the export was the first read
of `/api/sessions/{id}/trajectory` and a failed export printed one line into
the page, and both of those stopped being true without the spec being updated.
The session page previews the reconstructed trajectory on mount, over the same
URL the export downloads, so `expect(calls).toBe(0)` before the click now sees
the panel's own read. The export's outcome is a toast rather than page state,
so the 404 message lands twice - in the trajectory panel and in the
notification - which strict mode rejects as an ambiguous locator.
The spec waits for the preview read, asserts the one request the click adds
instead of a count from zero, keeps the authentication assertion on every
request, and names the page for the failure text so it does not collide with
the notification.
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.
…ort spec
tests/trajectory-export.spec.js was written when the export was the first read of
/api/sessions/{id}/trajectoryand a failed export printed one line into the page, and both of those stopped being true without the spec being updated.The session page previews the reconstructed trajectory on mount, over the same URL the export downloads, so
expect(calls).toBe(0)before the click now sees the panel's own read. The export's outcome is a toast rather than page state, so the 404 message lands twice - in the trajectory panel and in the notification - which strict mode rejects as an ambiguous locator.The spec waits for the preview read, asserts the one request the click adds instead of a count from zero, keeps the authentication assertion on every request, and names the page for the failure text so it does not collide with the notification.
Description
Linked Issues
Type of Change
Verification Performed
Screenshots (if applicable)
Checklist