gui tests: routing-model-rest waits for the frame that rests the Opus row (#2115)
The test read the Opus row's rest class as soon as the row was in the list. render() marks it on the next frame, so under a full Routing run (112 files, concurrency 6) it once read false: "old@x.test: the Opus row doesn't rest" (webkit zh 1100px). It now waits, a frame at a time, for up to 5 s for the class, then asserts as before; a row that never rests still fails, 5 s later. Run: routing-model-rest alone, 20 pass, 0 fail. The race was not reproduced by injecting a delay; the failure was seen once, in the full run of the previous commit.
This commit is contained in:
@@ -111,6 +111,9 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
for (const user of ["old@x.test", "me@x.test"]) {
|
||||
const opus = stage(user, "claude-opus-5.5"), flash = stage(user, "gemini-3.8-flash");
|
||||
await opus.first().waitFor({ state: "attached" });
|
||||
// a row is in before the frame that says how it rests: under load
|
||||
// the class was read before that frame came (#2115)
|
||||
await opus.first().evaluate((e) => new Promise((done) => { const ok = () => e.classList.contains("rest") ? done() : requestAnimationFrame(ok); setTimeout(done, 5000); ok(); }));
|
||||
assert.equal(await opus.count(), 1, `${user}: one Opus row`);
|
||||
assert.equal(await flash.count(), 1, `${user}: one gemini-3.8-flash row`);
|
||||
assert(!(await flash.evaluate((e) => e.classList.contains("rest"))), `${user}: gemini-3.8-flash rests with Opus`);
|
||||
|
||||
Reference in New Issue
Block a user