Skip to content

Commit

Permalink
Add more delay when taking snapshots in VRT
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-weindel committed Dec 12, 2023
1 parent c1271f5 commit a07aa68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ async function runAutomation(driverName: string, logFps: boolean) {
const snapshot = (window as any).snapshot as
| ((testName: string) => Promise<void>)
| undefined;
// Allow at least a frame to render for any existing RaF pause to
// resume and finish rendering the scene before taking the snapshot
await delay(17);
// Allow some time for all images to load and the RaF to unpause
// and render if needed.
await delay(200);
if (snapshot) {
console.log(`Calling snapshot(${testName})`);
await snapshot(testName);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a07aa68

Please sign in to comment.