Skip to content

Commit

Permalink
refactor: add more time to show result
Browse files Browse the repository at this point in the history
  • Loading branch information
tcsola authored and tcsola committed Sep 13, 2024
1 parent 1c650c2 commit 4042d4b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions web/e2e/editorMapAddLayer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test("create project and add layer", async ({ page }) => {

// take screenshot
const canvas = page.locator("canvas");
expect(await canvas.screenshot()).toMatchSnapshot("before-action.png", {
expect.soft(await canvas.screenshot()).toMatchSnapshot("before-action.png", {
maxDiffPixels: 100
});

Expand All @@ -47,10 +47,12 @@ test("create project and add layer", async ({ page }) => {
await mapPage.createCircleToEarthByLocator(x, y);

//wait result for stateble
await page.waitForTimeout(5 * 1000);
await page.waitForTimeout(10 * 1000);

expect(await canvas.screenshot()).not.toMatchSnapshot("before-action.png");
expect(await canvas.screenshot()).toMatchSnapshot("after-action.png");
expect
.soft(await canvas.screenshot())
.not.toMatchSnapshot("before-action.png");
expect.soft(await canvas.screenshot()).toMatchSnapshot("after-action.png");

//delete created project
await dashboardPage.goto();
Expand Down

0 comments on commit 4042d4b

Please sign in to comment.