Skip to content

Commit 095e261

Browse files
committed
Fixed e2e test
1 parent 1c7980e commit 095e261

10 files changed

+14
-14
lines changed

tests/src/end-to-end/basics/basicblocks.test.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ test.beforeEach(async ({ page }) => {
1010
test.describe("Check basic text block appearance", () => {
1111
test("Check basic text block appearance", async ({ page }) => {
1212
focusOnEditor(page);
13-
await page.waitForTimeout(100);
13+
await page.waitForTimeout(500);
14+
15+
await page.locator(`[data-content-type="audio"] .bn-file-caption`).click();
16+
await page.keyboard.press("Backspace");
17+
await page.waitForTimeout(500);
18+
19+
await page.locator(`[data-content-type="video"] .bn-file-caption`).click();
20+
await page.keyboard.press("Backspace");
21+
await page.waitForTimeout(500);
22+
1423
await page
1524
.locator(`${PARAGRAPH_SELECTOR} > p`, {
1625
hasText: "Welcome to this demo!",
1726
})
1827
.click();
1928

20-
// Scroll to top of page.
21-
await page.mouse.wheel(0, -9999);
22-
23-
await page.waitForTimeout(500);
24-
expect(await page.screenshot()).toMatchSnapshot("basic-blocks-top.png");
25-
26-
// Scroll to bottom of page.
27-
await page.mouse.wheel(0, 9999);
28-
// We have to scroll twice because Firefox gets stuck otherwise?
29-
await page.mouse.wheel(0, 9999);
30-
31-
await page.waitForTimeout(500);
32-
expect(await page.screenshot()).toMatchSnapshot("basic-blocks-bottom.png");
29+
await page.waitForTimeout(100);
30+
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(
31+
"basicblocks.png",
32+
);
3333
});
3434
});
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
460 KB
Loading
667 KB
Loading
1.47 MB
Loading

0 commit comments

Comments
 (0)