🔧 Fix and update text use cases

This commit is contained in:
Elena Torro
2025-08-22 09:53:50 +02:00
parent 3f93b0d44b
commit 503d431d8e
9 changed files with 2325 additions and 1060 deletions

View File

@@ -68,10 +68,7 @@ test("Updates a text font", async ({ page }) => {
await workspace.waitForFirstRender({ hideUI: false });
await workspace.clickLeafLayer("this is a text");
const fontStyle = workspace.page.getByTitle("Font Style");
await fontStyle.click();
const boldOption = fontStyle.getByText("bold").first();
await boldOption.click();
await page.keyboard.press("Control+b");
await workspace.hideUI();
@@ -197,6 +194,21 @@ test("Renders a file with text decoration", async ({ page }) => {
await expect(workspace.canvas).toHaveScreenshot();
});
test("Renders a file with emoji and text decoration", async ({ page }) => {
const workspace = new WasmWorkspacePage(page);
await workspace.setupEmptyFile();
await mockGetEmojiFont(workspace);
await workspace.mockGetFile("render-wasm/get-file-emoji-and-text-decoration.json");
await workspace.goToWorkspace({
id: "82d128e1-d3b1-80a5-8006-ae60fedcd5e7",
pageId: "82d128e1-d3b1-80a5-8006-ae60fedcd5e8",
});
await workspace.waitForFirstRender();
await expect(workspace.canvas).toHaveScreenshot();
});
test("Renders a file with multiple emoji", async ({ page }) => {
const workspace = new WasmWorkspacePage(page);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 KiB

After

Width:  |  Height:  |  Size: 523 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 119 KiB