wrolpi/app/cypress
Roland c8afc0e059 test: stop the search-modal test depending on an unrelated error toast
The other half of CI's cypress-e2e failure: `clicking search icon opens modal` failed with
`expected '<input.wrolpi-searchbox-input>' to be 'visible'`, covered by a danger toast.

Toasts paint above modals on purpose -- z-index 400 against the modal stack's 200 -- so an
error raised while a modal is open stays visible.  The search modal is tall, so it sits near
the top of the window, and a top-right toast covers the right-hand 192px of its 365px input.
Cypress occlusion-checks a `position: fixed` element, so the assertion failed.

Measured at both scales, because the question was whether the interface scale caused it:
130px of a 330px input before, 192px of 365px after.  The overlap is PRE-EXISTING; the scale
widened it from 39% of the input to 53%, which is what pushed CI over the line.  Roland's
call was to accept the overlap -- an error toast belongs on top -- and fix the test.

It passed locally and failed in CI because CI serves the React app with no API behind it.
The endpoints this spec leaves unmocked are `/api/tag`, `/api/events/feed`,
`/api/files/search` and `/api/files/worker_status` -- note that the spec's existing mocks say
`/api/tags` and `/api/events`, neither of which the app calls -- so they fail and api.js
raises "Unexpected server response".

The toast container is removed before the assertion rather than clicked away, because a click
races the next failing call.  A blanket `/api/**` 200 stub was tried first and does not work:
a 200 with the wrong shape fails the same way, which is what "Unexpected server response"
means.

Verified by reproducing CI's condition locally (`forceNetworkError` on every unmocked
endpoint): 12 passing with the removal, 11 passing and 1 failing without it.  All 50 e2e
specs pass under normal conditions.
2026-08-03 19:46:42 -06:00
..
e2e test: stop the search-modal test depending on an unrelated error toast 2026-08-03 19:46:42 -06:00
fixtures Updating cypress tests for new file group routes. 2026-03-21 16:26:08 -06:00
support style: spell it "color" everywhere 2026-08-02 18:36:47 -06:00