test: a list key waits for the list's registration, not only its rows
gate / frontend (push) Successful in 6m5s
gate / backend (push) Successful in 7m10s

The server gate's frontend job went red on 0.96.0: PlexPlaylistView's j/Delete
test pressed j after the rows painted but before useListNav's passive effect
registered the list, so the key did nothing on the slower runner. Every test
that presses a list key after an async load now waits for [data-nav-list] on
its list first (PlexPlaylistView, Playlists, Home, PlexDiscover). Checked
against a 30 ms delayed registration: the old tests fail, the new ones pass.
This commit is contained in:
2026-09-27 23:01:57 +02:00
parent ffcea0cb07
commit 0f9ed7cdbf
4 changed files with 20 additions and 7 deletions
+3 -1
View File
@@ -796,7 +796,9 @@ describe("Home · keyboard", () => {
],
});
mount();
await screen.findByText("Comfort thing");
// The rail's keys are live once its effect registers it, which can land after the cards paint.
const first = await screen.findByText("Comfort thing");
await waitFor(() => expect(first.closest("[data-nav-list]")).not.toBeNull());
const titles = ["Comfort thing", "Pinned channel", "Second thing", "Third thing"];
const seen: (string | undefined)[] = [];
for (let i = 0; i < titles.length; i++) {