Deflake e2e tests (#316)
This commit is contained in:
@@ -99,7 +99,7 @@ class PageObject {
|
|||||||
async snapshotPreview() {
|
async snapshotPreview() {
|
||||||
const iframe = this.getPreviewIframeElement();
|
const iframe = this.getPreviewIframeElement();
|
||||||
await expect(iframe.contentFrame().locator("body")).toMatchAriaSnapshot({
|
await expect(iframe.contentFrame().locator("body")).toMatchAriaSnapshot({
|
||||||
timeout: 15_000,
|
timeout: 30_000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,6 @@ test("create next.js app", async ({ po }) => {
|
|||||||
await po.clickRestart();
|
await po.clickRestart();
|
||||||
|
|
||||||
// This can be pretty slow because it's waiting for the app to build.
|
// This can be pretty slow because it's waiting for the app to build.
|
||||||
await expect(po.getPreviewIframeElement()).toBeVisible({ timeout: 25_000 });
|
await expect(po.getPreviewIframeElement()).toBeVisible({ timeout: 50_000 });
|
||||||
await po.snapshotPreview();
|
await po.snapshotPreview();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const config: PlaywrightTestConfig = {
|
|||||||
workers: 1,
|
workers: 1,
|
||||||
retries: process.env.CI ? 1 : 0,
|
retries: process.env.CI ? 1 : 0,
|
||||||
// maxFailures: 1,
|
// maxFailures: 1,
|
||||||
timeout: process.env.CI ? 60_000 : 30_000,
|
timeout: process.env.CI ? 75_000 : 30_000,
|
||||||
// Use a custom snapshot path template because Playwright's default
|
// Use a custom snapshot path template because Playwright's default
|
||||||
// is platform-specific which isn't necessary for Dyad e2e tests
|
// is platform-specific which isn't necessary for Dyad e2e tests
|
||||||
// which should be platform agnostic (we don't do screenshots; only textual diffs).
|
// which should be platform agnostic (we don't do screenshots; only textual diffs).
|
||||||
|
|||||||
Reference in New Issue
Block a user