Skip to content

Commit 378ccf9

Browse files
committed
fix: flaky tests
1 parent a83f960 commit 378ccf9

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

playwright/ai-docs/ARCHITECTURE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ After setting an agent to Available, the agent may not immediately appear in the
398398

399399
Conference helpers should verify target-agent state is `Available` before opening consult/transfer popovers, and verify consult control visibility/enabled state on the source agent before launching consult.
400400

401+
After transferring a consult lobby leg, participant states can settle asynchronously. Tests should wait for `Engaged` via state polling before strict equality assertions.
402+
401403
### resetCallerPage workaround
402404

403405
After a call ends, the Make Call button on the caller page may stay disabled. Clicking `#sd-get-media-streams` re-enables it. This is a known workaround (marked with TODO).

playwright/tests/multiparty-conference-set-8-test.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ export default function createMultipartyConferenceSet8Tests() {
325325
await consultAndAccept(1, 3);
326326
await transferConsultInteraction(1);
327327

328+
// Transfer handoff settles asynchronously; wait for both participants to reflect engaged state.
329+
await waitForState(getAgentPage(2), USER_STATES.ENGAGED);
330+
await waitForState(getAgentPage(3), USER_STATES.ENGAGED);
328331
await verifyCurrentState(getAgentPage(2), USER_STATES.ENGAGED);
329332
await verifyCurrentState(getAgentPage(3), USER_STATES.ENGAGED);
330333
});

0 commit comments

Comments
 (0)