Skip to content

Commit

Permalink
Add a bit of a timeout before checking for console history scroll
Browse files Browse the repository at this point in the history
- WebKit seems to glitch out sometimes...
  • Loading branch information
mofojed committed Dec 31, 2024
1 parent 73c62c9 commit a67797b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/console.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ test.describe('console scroll tests', () => {
state: 'attached',
});

// Wait for the scroll to complete, since it starts on the next available animation frame
await page.waitForTimeout(500);

// Expect the console to be scrolled to the bottom
const scrollPane = await scrollPanelLocator(page);
expect(
Expand Down Expand Up @@ -130,6 +133,9 @@ test.describe('console scroll tests', () => {
// Switch back to the console, and expect it to be scrolled to the bottom
await panelTabLocator(page, 'Console').click();

// Wait for the scroll to complete, since it starts on the next available animation frame
await page.waitForTimeout(500);

const scrollPane = await scrollPanelLocator(page);
expect(
await scrollPane.evaluate(el =>
Expand Down

0 comments on commit a67797b

Please sign in to comment.