Repository navigation
test(frontend): cover the single-session Tavus flows end to end - #90
Merged
Merged
Conversation
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.
What
FE-07 of
tavus-single-session-interview: Playwright route-mocked flows for the single-session Tavus path. One commit.app/providers/factory.ts: the inline mock provider gainssendBoundary, which appends the same two messagesbuildAdvancePayloadproduces, in order, towindow.__mockSteeringLogand acknowledges at once. It sits behind the same mock flag as before; no production behaviour change.tests/e2e/interview-single-session.spec.ts: a small stateful route mock (3 competencies, one Tavus conversation) and five flows: (1) one fresh/startthen two continuations, append then respond recorded in order at each boundary, session ids 1, 2, 3; (2) a paraphrased closing line advances viaboundary_due: true, one/end, and the next/startnames the live conversation; (3) reload issues a fresh/startwithoutlive_conversation_id; (4) exit then resume issues a fresh conversation, no continuation, nothing steered; (5) the ceiling handover keeps the competency (conversation_ttl_seconds130,page.clock.fastForward): a fresh/starton the samesession_id, no/end, no steering.Gap (stated, not faked)
The echo filter (the respond trigger text never reaches
/utterance) lives insideTavusProviderbehind Daily's data channel, which a browser test cannot reach without a real conversation; asserting it against the mock would prove nothing. The Vitest provider tests own it, and the spec header says so.Verification
The code under test was already merged, so the specs were green on first run; a mutation (removing the
live_conversation_idbody and the age-timer arming) fails flows 1, 2, 3 and 5 (flow 4 passes by design) and was reverted. Pinned container,--workers=1, chromium + webkit over the new spec plusinterview-flow,interview-chromeandembed: 83 passed, 1 skipped (the skip was not attributed per browser). Vitest 119 files / 3012 tests, typecheck and lint pass.