5 Commits

Author SHA1 Message Date
Andrey Antukh
52750d14de
♻️ Reduce the frontend e2e suite by merging equivalent specs (#13094)
* ♻️ Merge duplicated e2e loads and harden ten spec groups

Collapse multi-case Playwright specs into one test with a named step per
case, so the app or document loads once per group instead of once per
case. No case is dropped. In scope, the affected cases fall from 85 to
52 tests and from about 1300 to 760 worker-seconds.

- stroke-to-path and toolbar (15 to 2 tests, -80%): each step anchors a
  layer row to its exact name, checks the count grows by one and that the
  clicked row is selected before the context menu. The skipped path case
  now uses the tool's click-per-node and Enter gesture. The curve step
  counts exact Path rows; the update-file override that returned a whole
  file is gone; the toolbar test runs on the DOM renderer because the
  prebuilt WASM bundle creates no text.
- dimension tokens and colorpicker (12 to 6, -45%): steps assert the
  resolved pill value, not just the pill; the width/height step detaches
  the extra pill. HSB now awaits isVisible on real labels, gradient steps
  count stops and the radial case switches its own type.
- export frames and multiselection (11 to 3, -70%): rows use aria-checked
  instead of a 500 ms sleep, and steps wait for the sidebar before editing
  so a stale render cannot write to the previous selection. The frames
  entry is checked by row count and the "file" item by id.
- variants and workspace (41 to 37, -29%): waits now follow rendered
  state, the duplicated setupEmptyFile is gone, and the layer tree derives
  its children container from the row's own id. The copy/paste flake is
  fixed with a selectRow retry, Escape to deselect, hover instead of
  clicks and idempotent container expansion.
- grid editor and sidebar scroll (6 to 4, -24%): the editor opens once and
  blind 200/500 ms waits are gone; hover checks computed opacity because
  the button is hidden with opacity: 0. Only the second scroll test stays;
  the store has nine unit tests in ui/sidebar_scroll_test.cljs.

Also drop a dead binding, restore two Taiga links and fix comments that
cited the wrong drawing.cljs ranges and cancel-drawing's docstring.

AI-assisted-by: deepseek-v4.1-flash

* ♻️ Close the e2e merge review findings

Restore the renderer coverage the merge lost and make the merged steps
measure their own work.

The five shape tools run under WASM again, and the text tool runs there
too with the v2 editor flag: WasmWorkspacePage already enables it, so
the toolbar gesture keeps its drag and typing assertions. Curve now
compares the exact Path rows with their own baseline.

WorkspacePage gains layerRows, and layerRow delegates to it; toolbar,
stroke-to-path and export-frames use them instead of local copies. The
variants setup waits for the component icon and the variant rows
instead of two fixed sleeps, selectRow clicks once, and the cut/paste
step asserts its own delta. The stale comments lose their line numbers,
Path is no longer called the pencil, the orphan fixture is deleted, and
the sidebar smoke regains the Assets round trip.

Document the local e2e bundle prerequisite in the frontend testing
memory.

Closes #13093

AI-assisted-by: deepseek-v4.1-flash

* 🐛 Wait for the layer selection in the token spec

The dimension-token test clicked a layer row and went back to the Tokens
tab without proving the selection. A lost click left the previous shape
selected, and the border-radius step could pass on that shape. The
selection now goes through WorkspacePage.selectRow, which clicks once and
waits for aria-checked.

selectRow moves from variants.spec.js into the page object, and
selectLayer delegates to it, so the click-and-wait selection lives in one
place.

AI-assisted-by: deepseek-v4.1-flash
2026-11-20 18:55:19 +01:00
Eva Marco
ac08e38c1a
♻️ Use DS buttons and icons in the export assets modal (#12517)
* ♻️ Use DS buttons and icons in the export assets modal

The export modal close button becomes a ghost DS icon button and the
progress toast close button an action one, which fits its 24px grid
column; both are labelled "Close". Cancel and Export become DS buttons.
The checkbox ticks and the toast icons use DS icons. The selection rows
stay raw buttons, since they are list rows, and so does the link-styled
retry/cancel button of the toast.

The export frames e2e spec now finds the Export button by role, and a
visual test covers the modal with all, some and no rows selected.

AI-assisted-by: claude-opus-5-5

* ♻️ Make the export progress ring a button

The export progress ring in the header opens the export details, but it
was a div with a click handler. It is now a button named after the
export status, with aria-expanded, and keeps its look.

AI-assisted-by: claude-opus-5-5

* ♻️ Move export assets modal styles off the deprecated styles

Spacing, sizes, borders, typographies and color aliases move to DS
tokens and logical properties, and the button placeholders go away.
The classes left without use are removed: the old modal buttons, the
old close icon, and the file export entries, which live in files.scss.

The refactor/ import stays only for the shared modal and checkbox
placeholders, which move to the DS with the modals and the checkboxes.
The checkbox placeholder shrinks a ticked icon to 12px, which pushed
the DS tick off center: the tick keeps its 16px box now, and does not
shrink inside the 14px flex box either.

AI-assisted-by: claude-opus-5-5
2026-10-26 10:31:34 +01:00
Alejandro Alonso
434ac0556a 🔧 Migrate straightforward tests to user the wasm viewport 2026-02-12 13:29:13 +01:00
Andrey Antukh
122d3bc41c 💄 Add code formatting for js on frontend 2025-11-19 18:23:44 +01:00
Alejandro Alonso
f120cf82d3 ✨ Select boards to export to PDF 2025-10-22 13:19:10 +02:00