Skip to content

test(monitor): follow the trajectory preview and the toast in the exp… - #10

Merged
kingfs merged 1 commit into
mainfrom
fix-github-build-errors-8cd00
Oct 14, 2026
Merged

kingfs merged 1 commit into
mainfrom
fix-github-build-errors-8cd00

Conversation

@kingfs

@kingfs kingfs commented Oct 14, 2026

Copy link
Copy Markdown
Owner

…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.

Description

Linked Issues

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring

Verification Performed

Screenshots (if applicable)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

…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.
@kingfs
kingfs merged commit 5e047e3 into main Oct 14, 2026
1 check failed
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.

1 participant