mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 08:37:49 +00:00
test(e2e): sample the delete dialog until it has enough frames (#28323)
* test(e2e): sample the delete dialog until it has a full frame floor * test(e2e): drop the frame-count assertion the sampling loop now guarantees
This commit is contained in:
@@ -120,7 +120,8 @@ for (const scenario of ['single', 'children', 'batch', 'known-dirty'] as const)
|
||||
confirmFocused: boolean
|
||||
}[] = []
|
||||
const started = performance.now()
|
||||
while (performance.now() - started < 2400) {
|
||||
// Why a frame floor too: a loaded runner paints fewer than 21 frames in 2.4 s.
|
||||
while (performance.now() - started < 2400 || samples.length <= 20) {
|
||||
const dialog = document.querySelector('[data-slot="dialog-content"]')
|
||||
// Why not the last button: force delete is a split button whose menu chevron comes last.
|
||||
const button = Array.from(
|
||||
@@ -167,7 +168,6 @@ for (const scenario of ['single', 'children', 'batch', 'known-dirty'] as const)
|
||||
}
|
||||
await page.screenshot({ path: testInfo.outputPath('loaded.png') })
|
||||
await dialog.screenshot({ path: testInfo.outputPath('loaded-dialog.png') })
|
||||
expect(frames.length).toBeGreaterThan(20)
|
||||
expect(frames[0]?.confirmFocused).toBe(true)
|
||||
for (const frame of frames) {
|
||||
expect(frame).toEqual(frames[0])
|
||||
|
||||
Reference in New Issue
Block a user