chore: update EdgeEver from v2.15.0
EdgeEver-Upstream-Commit: e052ac3b54bdcba4b2c452e6b06c091b1e2c70f4
This commit is contained in:
1 parent
d04350db18
commit
d78620caaa
31 files changed
+1603
-1242
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
test("deleting the last gallery image removes its node view and Markdown (#707)", async ({ page }) => {
|
||||
test("deleting gallery images unwraps the last one and then removes it (#707, #728)", async ({ page }) => {
|
||||
const fixturePath = fileURLToPath(new URL("./fixtures/image-gallery-deletion.html", import.meta.url));
|
||||
await page.goto(`/@fs${fixturePath}`);
|
||||
const images = page.getByRole("button", { name: "Delete image", exact: true });
|
||||
@@ -9,18 +9,28 @@ test("deleting the last gallery image removes its node view and Markdown (#707)"
|
||||
await expect(images).toHaveCount(2);
|
||||
await images.first().click();
|
||||
await expect(images).toHaveCount(1);
|
||||
// The remaining image is unwrapped instead of staying in a one-image gallery (#728).
|
||||
await expect(gallery).toHaveCount(0);
|
||||
await expect(page.locator("#markdown")).toHaveText("");
|
||||
// Separate deliberate deletion actions into individual history events.
|
||||
await page.waitForTimeout(550);
|
||||
await images.click();
|
||||
await expect(gallery).toHaveCount(0);
|
||||
await expect(images).toHaveCount(0);
|
||||
await expect(page.locator("#markdown")).toHaveText("");
|
||||
await expect(page.locator("#document")).toHaveText('{"type":"doc","content":[{"type":"paragraph"}]}');
|
||||
await page.getByRole("button", { name: "Undo", exact: true }).click();
|
||||
await expect(images).toHaveCount(1);
|
||||
await expect(gallery).toHaveAttribute("data-image-gallery-layout", "2");
|
||||
await expect(page.locator("#markdown")).toContainText("");
|
||||
await page.getByRole("button", { name: "Redo", exact: true }).click();
|
||||
await expect(gallery).toHaveCount(0);
|
||||
await expect(page.locator("#markdown")).toHaveText("");
|
||||
// One more undo restores the gallery together with the deleted image.
|
||||
await page.getByRole("button", { name: "Undo", exact: true }).click();
|
||||
await expect(images).toHaveCount(2);
|
||||
await expect(gallery).toHaveAttribute("data-image-gallery-layout", "2");
|
||||
await page.getByRole("button", { name: "Redo", exact: true }).click();
|
||||
await expect(images).toHaveCount(1);
|
||||
await expect(gallery).toHaveCount(0);
|
||||
await page.getByRole("button", { name: "Redo", exact: true }).click();
|
||||
await expect(images).toHaveCount(0);
|
||||
await expect(page.locator("#markdown")).toHaveText("");
|
||||
await page.locator(".tiptap").fill("still editable");
|
||||
await expect(page.locator("#markdown")).toHaveText("still editable");
|
||||
|
||||
Reference in new issue
Block a user