Skip to content

Commit 376e496

Browse files
committed
chore: add more test on rich text
1 parent 9dbc868 commit 376e496

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/pluggableWidgets/rich-text-web/e2e/RichText.spec.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,23 @@ test.describe("RichText", () => {
127127
threshold: 0.4
128128
});
129129
});
130+
131+
test("compares with a screenshot for rich text inside modal popup layout", async ({ page }) => {
132+
await page.goto("/");
133+
await page.waitForLoadState("networkidle");
134+
135+
await page.click(".mx-navbar-item [title='Demo']");
136+
await expect(page.locator(".mx-name-customWidget1").first()).toHaveScreenshot(`richTextModal.png`);
137+
138+
await page.click(".mx-name-customWidget1 .ql-toolbar button.ql-video");
139+
await expect(page.locator(".widget-rich-text .widget-rich-text-modal-body").first()).toHaveScreenshot(
140+
`richTextDialogInsidePopup.png`
141+
);
142+
143+
await page.click(".widget-rich-text .widget-rich-text-modal-body #rich-text-video-src-input");
144+
await page.locator(".mx-name-comboBox2 .widget-combobox-input").fill("https://www.mendix.com");
145+
await expect(page.locator(".widget-rich-text .widget-rich-text-modal-body").first()).toHaveScreenshot(
146+
`richTextDialogInsidePopupEdit.png`
147+
);
148+
});
130149
});

0 commit comments

Comments
 (0)