Commit 0ad49f7
committed
test(e2e): correctly await model_change event concurrently
The previous fix attempted to await the `session.model_change` event
after `switchTo` resolved, which caused a timeout because the event
was often already emitted during the `switchTo` execution. Additionally,
hardcoding 'gpt-4.1' in the event listener caused timeouts on environments
that gracefully fall back to default models when auth is missing.
This commit starts the event listener concurrently with the `switchTo`
call, and asserts that the resulting model IDs match what the server actually resolved.1 parent 867e78c commit 0ad49f7
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | | - | |
68 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
| |||
0 commit comments