Skip to content

Commit

Permalink
test(hmr): bump hmr timeouts to fix test flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed Apr 22, 2023
1 parent 669056c commit f17ceb8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions integration/hmr-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ test("HMR", async ({ page }) => {
// detect HMR'd content and style changes
await page.waitForLoadState("networkidle");
let h1 = page.getByText("Changed");
await h1.waitFor({ timeout: 2000 });
await h1.waitFor({ timeout: 5000 });
expect(h1).toHaveCSS("color", "rgb(255, 255, 255)");
expect(h1).toHaveCSS("background-color", "rgb(0, 0, 0)");

Expand All @@ -296,7 +296,7 @@ test("HMR", async ({ page }) => {
// undo change
fs.writeFileSync(indexPath, originalIndex);
fs.writeFileSync(cssModulePath, originalCssModule);
await page.getByText("Index Title").waitFor({ timeout: 2000 });
await page.getByText("Index Title").waitFor({ timeout: 5000 });
expect(await page.getByLabel("Root Input").inputValue()).toBe("asdfasdf");
await page.waitForSelector(`#root-counter:has-text("inc 1")`);

Expand All @@ -317,7 +317,7 @@ test("HMR", async ({ page }) => {
}
`;
fs.writeFileSync(indexPath, withLoader1);
await page.getByText("Hello, world").waitFor({ timeout: 2000 });
await page.getByText("Hello, world").waitFor({ timeout: 5000 });
expect(await page.getByLabel("Root Input").inputValue()).toBe("asdfasdf");
await page.waitForSelector(`#root-counter:has-text("inc 1")`);

Expand All @@ -339,7 +339,7 @@ test("HMR", async ({ page }) => {
}
`;
fs.writeFileSync(indexPath, withLoader2);
await page.getByText("Hello, planet").waitFor({ timeout: 2000 });
await page.getByText("Hello, planet").waitFor({ timeout: 5000 });
expect(await page.getByLabel("Root Input").inputValue()).toBe("asdfasdf");
await page.waitForSelector(`#root-counter:has-text("inc 1")`);

Expand Down

0 comments on commit f17ceb8

Please sign in to comment.