diff --git a/frontend/playwright/data/render-wasm/get-multiple-texts-base.json b/frontend/playwright/data/render-wasm/get-multiple-texts-base.json new file mode 100644 index 0000000000..353ddd4552 --- /dev/null +++ b/frontend/playwright/data/render-wasm/get-multiple-texts-base.json @@ -0,0 +1,1858 @@ +{ + "~:features": { + "~#set": [ + "fdata/path-data", + "plugins/runtime", + "design-tokens/v1", + "layout/grid", + "styles/v2", + "fdata/pointer-map", + "fdata/objects-map", + "render-wasm/v1", + "components/v2", + "fdata/shape-data-type" + ] + }, + "~:team-id": "~u6bd7c17d-4f59-815e-8006-5c1f6882469a", + "~:permissions": { + "~:type": "~:membership", + "~:is-owner": true, + "~:is-admin": true, + "~:can-edit": true, + "~:can-read": true, + "~:is-logged": true + }, + "~:has-media-trimmed": false, + "~:comment-thread-seqn": 0, + "~:name": "text_base", + "~:revn": 32, + "~:modified-at": "~m1750756543053", + "~:vern": 0, + "~:id": "~uf8b42814-8653-81cf-8006-638aacdc3ffa", + "~:is-shared": false, + "~:migrations": { + "~#ordered-set": [ + "legacy-2", + "legacy-3", + "legacy-5", + "legacy-6", + "legacy-7", + "legacy-8", + "legacy-9", + "legacy-10", + "legacy-11", + "legacy-12", + "legacy-13", + "legacy-14", + "legacy-16", + "legacy-17", + "legacy-18", + "legacy-19", + "legacy-25", + "legacy-26", + "legacy-27", + "legacy-28", + "legacy-29", + "legacy-31", + "legacy-32", + "legacy-33", + "legacy-34", + "legacy-36", + "legacy-37", + "legacy-38", + "legacy-39", + "legacy-40", + "legacy-41", + "legacy-42", + "legacy-43", + "legacy-44", + "legacy-45", + "legacy-46", + "legacy-47", + "legacy-48", + "legacy-49", + "legacy-50", + "legacy-51", + "legacy-52", + "legacy-53", + "legacy-54", + "legacy-55", + "legacy-56", + "legacy-57", + "legacy-59", + "legacy-62", + "legacy-65", + "legacy-66", + "legacy-67", + "0001-remove-tokens-from-groups", + "0002-normalize-bool-content", + "0002-clean-shape-interactions", + "0003-fix-root-shape", + "0003-convert-path-content", + "0004-clean-shadow-and-colors", + "0005-deprecate-image-type", + "0006-fix-old-texts-fills", + "0007-clear-invalid-strokes-and-fills-v2", + "0008-fix-library-colors-opacity", + "0009-add-partial-text-touched-flags" + ] + }, + "~:version": 67, + "~:project-id": "~u6bd7c17d-4f59-815e-8006-5c1f68846e43", + "~:created-at": "~m1750754545523", + "~:data": { + "~:pages": [ + "~uf8b42814-8653-81cf-8006-638aacdc3ffb" + ], + "~:pages-index": { + "~uf8b42814-8653-81cf-8006-638aacdc3ffb": { + "~:objects": { + "~u00000000-0000-0000-0000-000000000000": { + "~#shape": { + "~:y": 0, + "~:hide-fill-on-export": false, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:name": "Root Frame", + "~:width": 0.01, + "~:type": "~:frame", + "~:points": [ + { + "~#point": { + "~:x": 0, + "~:y": 0 + } + }, + { + "~#point": { + "~:x": 0.01, + "~:y": 0 + } + }, + { + "~#point": { + "~:x": 0.01, + "~:y": 0.01 + } + }, + { + "~#point": { + "~:x": 0, + "~:y": 0.01 + } + } + ], + "~:r2": 0, + "~:proportion-lock": false, + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:r3": 0, + "~:r1": 0, + "~:id": "~u00000000-0000-0000-0000-000000000000", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:strokes": [], + "~:x": 0, + "~:proportion": 1, + "~:r4": 0, + "~:selrect": { + "~#rect": { + "~:x": 0, + "~:y": 0, + "~:width": 0.01, + "~:height": 0.01, + "~:x1": 0, + "~:y1": 0, + "~:x2": 0.01, + "~:y2": 0.01 + } + }, + "~:fills": [ + { + "~:fill-color": "#FFFFFF", + "~:fill-opacity": 1 + } + ], + "~:flip-x": null, + "~:height": 0.01, + "~:flip-y": null, + "~:shapes": [ + "~u2d36f842-6329-801b-8006-638c5e8808cd", + "~u2d36f842-6329-801b-8006-638c578d864d", + "~u2d36f842-6329-801b-8006-638c4b1765cb", + "~u2d36f842-6329-801b-8006-638c35c32b39", + "~u2d36f842-6329-801b-8006-638aedf61630", + "~u2d36f842-6329-801b-8006-638ae53d4e66", + "~u2d36f842-6329-801b-8006-638ad618c609", + "~u2d36f842-6329-801b-8006-638aceecaf72", + "~u2d36f842-6329-801b-8006-638aca630922", + "~u2d36f842-6329-801b-8006-638ac5d4c21d", + "~u2d36f842-6329-801b-8006-638abd13d5b9", + "~u2d36f842-6329-801b-8006-638aaee1355f" + ] + } + }, + "~u2d36f842-6329-801b-8006-638aceecaf72": { + "~#shape": { + "~:y": 350, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 5" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "0", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 5", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 97.00000238418582, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 510.0000147819519, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 510.0000147819519, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 97.00000238418582, + "~:y": 474 + } + } + ], + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638aceecaf72", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 97.00000238418579, + "~:selrect": { + "~#rect": { + "~:x": 97.00000238418579, + "~:y": 350, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 97.00000238418579, + "~:y1": 350, + "~:x2": 510.0000147819519, + "~:y2": 474 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + }, + "~u2d36f842-6329-801b-8006-638aedf61630": { + "~#shape": { + "~:y": 350, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 8" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "0", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 8", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 1410.9999947547913, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 1824.0000071525574, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 1824.0000071525574, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 1410.9999947547913, + "~:y": 474 + } + } + ], + "~:layout-item-h-sizing": "~:fix", + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638aedf61630", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 1410.9999947547913, + "~:selrect": { + "~#rect": { + "~:x": 1410.9999947547913, + "~:y": 350, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 1410.9999947547913, + "~:y1": 350, + "~:x2": 1824.0000071525574, + "~:y2": 474 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + }, + "~u2d36f842-6329-801b-8006-638abd13d5b9": { + "~#shape": { + "~:y": 226, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 2" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "0", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 2", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 534.9999947547913, + "~:y": 226 + } + }, + { + "~#point": { + "~:x": 948.0000071525574, + "~:y": 226 + } + }, + { + "~#point": { + "~:x": 948.0000071525574, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 534.9999947547913, + "~:y": 350 + } + } + ], + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638abd13d5b9", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 534.9999947547913, + "~:selrect": { + "~#rect": { + "~:x": 534.9999947547913, + "~:y": 226, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 534.9999947547913, + "~:y1": 226, + "~:x2": 948.0000071525574, + "~:y2": 350 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + }, + "~u2d36f842-6329-801b-8006-638c35c32b39": { + "~#shape": { + "~:y": 474, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 9" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "0", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 9", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 97.00000238418582, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 510.0000147819519, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 510.0000147819519, + "~:y": 598 + } + }, + { + "~#point": { + "~:x": 97.00000238418582, + "~:y": 598 + } + } + ], + "~:layout-item-h-sizing": "~:fix", + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638c35c32b39", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 97.00000238418579, + "~:selrect": { + "~#rect": { + "~:x": 97.00000238418579, + "~:y": 474, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 97.00000238418579, + "~:y1": 474, + "~:x2": 510.0000147819519, + "~:y2": 598 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + }, + "~u2d36f842-6329-801b-8006-638aaee1355f": { + "~#shape": { + "~:y": 226, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 1" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 1", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 97.00000238418582, + "~:y": 226 + } + }, + { + "~#point": { + "~:x": 510.0000147819519, + "~:y": 226 + } + }, + { + "~#point": { + "~:x": 510.0000147819519, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 97.00000238418582, + "~:y": 350 + } + } + ], + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638aaee1355f", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 97.00000238418579, + "~:selrect": { + "~#rect": { + "~:x": 97.00000238418579, + "~:y": 226, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 97.00000238418579, + "~:y1": 226, + "~:x2": 510.0000147819519, + "~:y2": 350 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + }, + "~u2d36f842-6329-801b-8006-638ac5d4c21d": { + "~#shape": { + "~:y": 226, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 3" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "0", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 3", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 972.9999947547913, + "~:y": 226 + } + }, + { + "~#point": { + "~:x": 1386.0000071525574, + "~:y": 226 + } + }, + { + "~#point": { + "~:x": 1386.0000071525574, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 972.9999947547913, + "~:y": 350 + } + } + ], + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638ac5d4c21d", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 972.9999947547913, + "~:selrect": { + "~#rect": { + "~:x": 972.9999947547913, + "~:y": 226, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 972.9999947547913, + "~:y1": 226, + "~:x2": 1386.0000071525574, + "~:y2": 350 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + }, + "~u2d36f842-6329-801b-8006-638aca630922": { + "~#shape": { + "~:y": 226, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 4" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "0", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 4", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 1410.9999947547913, + "~:y": 226 + } + }, + { + "~#point": { + "~:x": 1824.0000071525574, + "~:y": 226 + } + }, + { + "~#point": { + "~:x": 1824.0000071525574, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 1410.9999947547913, + "~:y": 350 + } + } + ], + "~:layout-item-h-sizing": "~:fix", + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638aca630922", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 1410.9999947547913, + "~:selrect": { + "~#rect": { + "~:x": 1410.9999947547913, + "~:y": 226, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 1410.9999947547913, + "~:y1": 226, + "~:x2": 1824.0000071525574, + "~:y2": 350 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + }, + "~u2d36f842-6329-801b-8006-638ae53d4e66": { + "~#shape": { + "~:y": 350, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 7" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "0", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 7", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 972.9999947547913, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 1386.0000071525574, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 1386.0000071525574, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 972.9999947547913, + "~:y": 474 + } + } + ], + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638ae53d4e66", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 972.9999947547913, + "~:selrect": { + "~#rect": { + "~:x": 972.9999947547913, + "~:y": 350, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 972.9999947547913, + "~:y1": 350, + "~:x2": 1386.0000071525574, + "~:y2": 474 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + }, + "~u2d36f842-6329-801b-8006-638c578d864d": { + "~#shape": { + "~:y": 474, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 11" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "0", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 11", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 972.9999947547913, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 1386.0000071525574, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 1386.0000071525574, + "~:y": 598 + } + }, + { + "~#point": { + "~:x": 972.9999947547913, + "~:y": 598 + } + } + ], + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638c578d864d", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 972.9999947547913, + "~:selrect": { + "~#rect": { + "~:x": 972.9999947547913, + "~:y": 474, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 972.9999947547913, + "~:y1": 474, + "~:x2": 1386.0000071525574, + "~:y2": 598 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + }, + "~u2d36f842-6329-801b-8006-638c5e8808cd": { + "~#shape": { + "~:y": 474, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 12" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "0", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 12", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 1410.9999947547913, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 1824.0000071525574, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 1824.0000071525574, + "~:y": 598 + } + }, + { + "~#point": { + "~:x": 1410.9999947547913, + "~:y": 598 + } + } + ], + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638c5e8808cd", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 1410.9999947547913, + "~:selrect": { + "~#rect": { + "~:x": 1410.9999947547913, + "~:y": 474, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 1410.9999947547913, + "~:y1": 474, + "~:x2": 1824.0000071525574, + "~:y2": 598 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + }, + "~u2d36f842-6329-801b-8006-638ad618c609": { + "~#shape": { + "~:y": 350, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 6" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "0", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 6", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 534.9999947547913, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 948.0000071525574, + "~:y": 350 + } + }, + { + "~#point": { + "~:x": 948.0000071525574, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 534.9999947547913, + "~:y": 474 + } + } + ], + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638ad618c609", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 534.9999947547913, + "~:selrect": { + "~#rect": { + "~:x": 534.9999947547913, + "~:y": 350, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 534.9999947547913, + "~:y1": 350, + "~:x2": 948.0000071525574, + "~:y2": 474 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + }, + "~u2d36f842-6329-801b-8006-638c4b1765cb": { + "~#shape": { + "~:y": 474, + "~:transform": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:rotation": 0, + "~:grow-type": "~:fixed", + "~:content": { + "~:type": "root", + "~:key": "18iiwe28c8", + "~:children": [ + { + "~:type": "paragraph-set", + "~:children": [ + { + "~:line-height": "1.2", + "~:font-style": "normal", + "~:children": [ + { + "~:line-height": "", + "~:font-style": "normal", + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:font-id": "sourcesanspro", + "~:key": "189wz0cyaiq", + "~:font-size": "36", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro", + "~:text": "text 10" + } + ], + "~:typography-ref-id": null, + "~:text-transform": "none", + "~:text-align": "left", + "~:font-id": "sourcesanspro", + "~:key": "pu0nozn04k", + "~:font-size": "0", + "~:font-weight": "400", + "~:typography-ref-file": null, + "~:text-direction": "ltr", + "~:type": "paragraph", + "~:font-variant-id": "regular", + "~:text-decoration": "none", + "~:letter-spacing": "0", + "~:fills": [ + { + "~:fill-color": "#000000", + "~:fill-opacity": 1 + } + ], + "~:font-family": "sourcesanspro" + } + ] + } + ], + "~:vertical-align": "top" + }, + "~:hide-in-viewer": false, + "~:name": "Text 10", + "~:width": 413.0000123977661, + "~:type": "~:text", + "~:points": [ + { + "~#point": { + "~:x": 534.9999947547913, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 948.0000071525574, + "~:y": 474 + } + }, + { + "~#point": { + "~:x": 948.0000071525574, + "~:y": 598 + } + }, + { + "~#point": { + "~:x": 534.9999947547913, + "~:y": 598 + } + } + ], + "~:transform-inverse": { + "~#matrix": { + "~:a": 1, + "~:b": 0, + "~:c": 0, + "~:d": 1, + "~:e": 0, + "~:f": 0 + } + }, + "~:id": "~u2d36f842-6329-801b-8006-638c4b1765cb", + "~:parent-id": "~u00000000-0000-0000-0000-000000000000", + "~:frame-id": "~u00000000-0000-0000-0000-000000000000", + "~:x": 534.9999947547913, + "~:selrect": { + "~#rect": { + "~:x": 534.9999947547913, + "~:y": 474, + "~:width": 413.0000123977661, + "~:height": 124, + "~:x1": 534.9999947547913, + "~:y1": 474, + "~:x2": 948.0000071525574, + "~:y2": 598 + } + }, + "~:flip-x": null, + "~:height": 124, + "~:flip-y": null + } + } + }, + "~:id": "~uf8b42814-8653-81cf-8006-638aacdc3ffb", + "~:name": "Page 1" + } + }, + "~:id": "~uf8b42814-8653-81cf-8006-638aacdc3ffa", + "~:options": { + "~:components-v2": true, + "~:base-font-size": "16px" + } + } +} \ No newline at end of file diff --git a/frontend/playwright/ui/render-wasm-specs/texts.spec.js b/frontend/playwright/ui/render-wasm-specs/texts.spec.js index 9827661f4d..b007ba4089 100644 --- a/frontend/playwright/ui/render-wasm-specs/texts.spec.js +++ b/frontend/playwright/ui/render-wasm-specs/texts.spec.js @@ -158,7 +158,6 @@ test("Renders a file with multiple emoji", async ({ page }) => { pageId: "6bd7c17d-4f59-815e-8006-5e999f38f211", }); - await workspace.waitForFirstRender(); await expect(workspace.canvas).toHaveScreenshot(); }); @@ -175,3 +174,142 @@ test("Renders a file with texts with different alignments", async ({ page }) => await workspace.waitForFirstRender(); await expect(workspace.canvas).toHaveScreenshot(); }); + +test("Updates text alignment edition - part 1", async ({ page }) => { + const workspace = new WasmWorkspacePage(page); + await workspace.setupEmptyFile(); + await workspace.mockGetFile("render-wasm/get-multiple-texts-base.json"); + + await workspace.goToWorkspace({ + id: "6bd7c17d-4f59-815e-8006-5c1f68846e43", + pageId: "f8b42814-8653-81cf-8006-638aacdc3ffb", + }); + await workspace.waitForFirstRender({ hideUI: false }); + await workspace.clickLeafLayer("Text 1"); + + const textOptionsButton = workspace.page.getByTestId("text-align-options-button"); + const autoWidthButton = workspace.page.getByTitle("Auto width"); + const autoHeightButton = workspace.page.getByTitle("Auto height"); + const alignMiddleButton = workspace.page.getByTitle("Align middle"); + const alignBottomButton = workspace.page.getByTitle("Align bottom"); + const alignRightButton = workspace.page.getByTitle("Align right (Ctrl+Alt+R)"); + + await textOptionsButton.click(); + + await workspace.clickLeafLayer("Text 1"); + await autoWidthButton.click(); + + await workspace.clickLeafLayer("Text 2"); + await autoHeightButton.click(); + + await workspace.clickLeafLayer("Text 3"); + await alignMiddleButton.click(); + await alignRightButton.click(); + + await workspace.clickLeafLayer("Text 4"); + await alignBottomButton.click(); + + await workspace.page.keyboard.press("Escape"); + await workspace.hideUI(); + + await expect(workspace.canvas).toHaveScreenshot({timeout: 10000}); +}); + +test("Updates text alignment edition - part 2", async ({ page }) => { + const workspace = new WasmWorkspacePage(page); + await workspace.setupEmptyFile(); + await workspace.mockGetFile("render-wasm/get-multiple-texts-base.json"); + + await workspace.goToWorkspace({ + id: "6bd7c17d-4f59-815e-8006-5c1f68846e43", + pageId: "f8b42814-8653-81cf-8006-638aacdc3ffb", + }); + await workspace.waitForFirstRender({ hideUI: false }); + await workspace.clickLeafLayer("Text 1"); + + const textOptionsButton = workspace.page.getByTestId("text-align-options-button"); + const alignTopButton = workspace.page.getByTitle("Align top"); + const alignMiddleButton = workspace.page.getByTitle("Align middle"); + const alignBottomButton = workspace.page.getByTitle("Align bottom"); + const alignCenterButton = workspace.page.getByTitle("Align center (Ctrl+Alt+T)"); + const alignJustifyButton = workspace.page.getByTitle("Justify (Ctrl+Alt+J)"); + const LTRButton = workspace.page.getByTitle("LTR"); + const RTLButton = workspace.page.getByTitle("RTL"); + + await textOptionsButton.click(); + + await workspace.clickLeafLayer("Text 5"); + await alignBottomButton.click(); + await alignTopButton.click(); + await alignCenterButton.click(); + + await workspace.clickLeafLayer("Text 6"); + await alignJustifyButton.click(); + await RTLButton.click(); + + await workspace.clickLeafLayer("Text 7"); + await alignJustifyButton.click(); + await RTLButton.click(); + await LTRButton.click(); + + await workspace.clickLeafLayer("Text 8"); + await alignMiddleButton.click(); + await alignJustifyButton.click(); + await RTLButton.click(); + + await workspace.page.keyboard.press("Escape"); + await workspace.hideUI(); + + await expect(workspace.canvas).toHaveScreenshot({timeout: 10000}); +}); + +test("Updates text alignment edition - part 3", async ({ page }) => { + const workspace = new WasmWorkspacePage(page); + await workspace.setupEmptyFile(); + await workspace.mockGetFile("render-wasm/get-multiple-texts-base.json"); + + await workspace.goToWorkspace({ + id: "6bd7c17d-4f59-815e-8006-5c1f68846e43", + pageId: "f8b42814-8653-81cf-8006-638aacdc3ffb", + }); + await workspace.waitForFirstRender({ hideUI: false }); + await workspace.clickLeafLayer("Text 1"); + + const textOptionsButton = workspace.page.getByTestId("text-align-options-button"); + const autoWidthButton = workspace.page.getByTitle("Auto width"); + const autoHeightButton = workspace.page.getByTitle("Auto height"); + const alignMiddleButton = workspace.page.getByTitle("Align middle"); + const alignBottomButton = workspace.page.getByTitle("Align bottom"); + const alignLeftButton = workspace.page.getByTitle("Align left (Ctrl+Alt+L)"); + const alignCenterButton = workspace.page.getByTitle("Align center (Ctrl+Alt+T)"); + const alignJustifyButton = workspace.page.getByTitle("Justify (Ctrl+Alt+J)"); + const RTLButton = workspace.page.getByTitle("RTL"); + + await textOptionsButton.click(); + + await workspace.clickLeafLayer("Text 9"); + await autoHeightButton.click(); + await alignBottomButton.click(); + await alignJustifyButton.click(); + await RTLButton.click(); + + await workspace.clickLeafLayer("Text 10"); + await alignBottomButton.click(); + await alignJustifyButton.click(); + await RTLButton.click(); + await autoWidthButton.click(); + + await workspace.clickLeafLayer("Text 11"); + await alignCenterButton.click(); + await alignBottomButton.click(); + + await workspace.clickLeafLayer("Text 12"); + await alignCenterButton.click(); + await alignLeftButton.click(); + await alignMiddleButton.click(); + + await workspace.page.keyboard.press("Escape"); + await workspace.hideUI(); + + await expect(workspace.canvas).toHaveScreenshot({timeout: 10000}); +}); \ No newline at end of file diff --git a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-text-alignment-edition---part-1-1.png b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-text-alignment-edition---part-1-1.png new file mode 100644 index 0000000000..6925ea8fa8 Binary files /dev/null and b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-text-alignment-edition---part-1-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-text-alignment-edition---part-2-1.png b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-text-alignment-edition---part-2-1.png new file mode 100644 index 0000000000..d364d1e16b Binary files /dev/null and b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-text-alignment-edition---part-2-1.png differ diff --git a/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-text-alignment-edition---part-3-1.png b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-text-alignment-edition---part-3-1.png new file mode 100644 index 0000000000..30d418f85e Binary files /dev/null and b/frontend/playwright/ui/render-wasm-specs/texts.spec.js-snapshots/Updates-text-alignment-edition---part-3-1.png differ diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs index d5c36f08d8..84bf713ae0 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs @@ -324,6 +324,7 @@ [:> grow-options opts] [:> icon-button* {:variant "ghost" :aria-label (tr "labels.options") + :data-testid "text-align-options-button" :on-click toggle-more-options :icon "menu"}]] diff --git a/render-wasm/src/wasm/text.rs b/render-wasm/src/wasm/text.rs index 6619bf0cf8..a7b0b2c078 100644 --- a/render-wasm/src/wasm/text.rs +++ b/render-wasm/src/wasm/text.rs @@ -49,10 +49,17 @@ pub extern "C" fn get_text_dimensions() -> *mut u8 { if let Type::Text(content) = &shape.shape_type { let paragraphs = content.get_skia_paragraphs(font_col); - height = auto_height(¶graphs).ceil(); m_width = max_width(¶graphs); - if content.grow_type() == GrowType::AutoWidth { - width = auto_width(¶graphs).ceil(); + + match content.grow_type() { + GrowType::AutoHeight => { + height = auto_height(¶graphs).ceil(); + } + GrowType::AutoWidth => { + width = auto_width(¶graphs).ceil(); + height = auto_height(¶graphs).ceil(); + } + GrowType::Fixed => {} } } });