Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions pkgs/id/e2e/tests/editor-features.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,9 @@ test.describe("Image Upload", () => {
await waitForEditorReady(page);

// Assert an <img> tag is visible inside the ProseMirror editor with the correct src
const img = page.locator("#editor .ProseMirror img");
// Scope to img.pm-image: a bare "img" locator also matches ProseMirror's internal
// <img class="ProseMirror-separator">, which fails toBeVisible strict mode (#1228)
const img = page.locator("#editor .ProseMirror img.pm-image");
await expect(img).toBeVisible({ timeout: 15_000 });
const src = await img.getAttribute("src");
expect(src).toContain(uploadResult.url);
Expand Down Expand Up @@ -1607,10 +1609,12 @@ test.describe("Image Alt-Text", () => {
data: { name: mdName },
});
expect(newResp.ok()).toBeTruthy();
const { hash } = (await newResp.json()) as { hash: string; name: string };

// Save with an image node that has alt text
// Save with an image node that has alt text (doc_id is required by SaveRequest, #1228)
const saveResp = await page.request.post(`${baseURL}/api/save`, {
data: {
doc_id: hash,
name: mdName,
doc: {
type: "doc",
Expand Down Expand Up @@ -1670,10 +1674,12 @@ test.describe("Image Resize", () => {
data: { name: mdName },
});
expect(newResp.ok()).toBeTruthy();
const { hash } = (await newResp.json()) as { hash: string; name: string };

// Save with an image node that has explicit dimensions
// Save with an image node that has explicit dimensions (doc_id is required by SaveRequest, #1228)
const saveResp = await page.request.post(`${baseURL}/api/save`, {
data: {
doc_id: hash,
name: mdName,
doc: {
type: "doc",
Expand Down
Loading