Andrey Antukh f27bfdf76a
♻️ Reduce the routes, viewer, theme and typography e2e specs (#13059)
* ♻️ Reduce the routes, viewer, theme and typography e2e specs

The five specs of Task 10 (routes, theme, viewer and roles) go from 14
tests to 6, and the two of Task 11 (missing font and add typography)
from 9 to 4. Nine unit tests cover rules that had none: five for the
private legacy-match and four for the viewer frame navigation. No
skipped test and no fixture removed.

The browser keeps the wiring: the known and unknown hash as two steps
of one test, the theme applied live without a reload, the viewer role
walked in two loads with the context menu counted instead of trusted,
and the typography states merged around shared fixtures. The viewer
zoom click comes back as a header step; the arrows e2e becomes unit
tests, with the Next button still clicked by the child-click test. The
missing-font test asserts the renamed, disabled typography button
instead of a hidden one it never described.

WorkspacePage gains reloadWorkspace, which clears the socket registry,
reloads and reopens the mock, and settles on the sitemap page name or
on the canvas when the restored sidebar tab hides it. layerRow matches
rows by anchored text, because a selected row's action buttons can join
its accessible name, and selectLayer accepts click options for the
shift-click steps. The font specs use both and no longer import
MockWebSocketHelper.

The viewer role asserts its two absences by testid: new-project-button
already existed and add-custom-font is new in fonts.cljs, the only
product change, with the visible side covered by dashboard.spec.
routes_test adds the path-params case for legacy-match; viewer_test
asserts the first event and the page id of the frame navigation, and
watch-events delivers asynchronously and handles the nil a watch can
return.

Measured at four workers: 23 to 10 tests; Task 10 from 141.3 to
68.5/72.3 worker-seconds and Task 11 from 150.1 to 109.0/109.3.

Closes #13058

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

* 🐛 Let the two reduced e2e steps fail when they should

The typography step selected the next layer with Shift, which in the layers
panel is a range selection: the range also brought in the text with a
typography token, so the button was hidden by the applied token and not by
the mixed values. A mod-click adds only that shape, and two new assertions
keep the token and the asset texts out of the selection.

The logo step clicked 100 px below the logo and asserted the URL, which
potok updates after the click returns, so the assertion matched the old URL
on its first poll. Probing elementFromPoint under the logo answers the
hit-area question directly.

AI-assisted-by: deepseek-v4.1-flash
2026-11-20 17:41:43 +01:00
..
2026-10-07 12:32:14 +02:00
2026-09-25 11:11:44 +02:00