test(e2e): a track plays the list it is in, not a queue of one
Build & publish Arch package / arch-package (push) Successful in 2m31s
CI / check (push) Successful in 2m46s
Search index maintenance / maintain-index (push) Failing after 5s
CI / e2e (push) Successful in 6m30s

e7748f1 made double-click and single-row Play queue the list as
displayed with startIndex on that row; this frozen spec still asserted
a queue of one, and was the only failure in both the chromium and
webkit runs on main.

It asserts the new contract instead: more than one track queued,
currentIndex on the row that was activated, and the panel showing that
queue rather than some other one.
This commit is contained in:
2026-08-16 14:51:07 -04:00
parent b98840ee37
commit 18aba34c08
+15 -7
View File
@@ -92,7 +92,7 @@ test.describe('queue', () => {
await app.getByTestId('nav-tracks').click();
});
test('playing a track populates the queue panel', async ({ app }) => {
test('playing a track queues the list it is in', async ({ app }) => {
await resetEvents(app);
await longRow(app).dblclick();
await waitForEvent(app, 'QueueChanged');
@@ -105,15 +105,23 @@ test.describe('queue', () => {
await queueToggle.click();
await expect(app.getByTestId('queue-row')).toHaveCount(1);
// Activating one row plays the list that row is in, from that row —
// the library as displayed, not a queue of one. The row's own
// position is what `currentIndex` points at.
const state = await callBinding<{
tracks: { title: string }[];
currentIndex: number;
}>(app, 'queue.Queue.GetState');
const state = await callBinding<{ tracks: unknown[] }>(
app,
'queue.Queue.GetState',
expect(state.tracks.length).toBeGreaterThan(1);
expect(state.tracks[state.currentIndex]?.title).toContain(LONG_TRACK);
// The panel shows that queue rather than some other one: every
// fixture track fits on screen, so the counts are comparable.
await expect(app.getByTestId('queue-row')).toHaveCount(
state.tracks.length,
);
expect(state.tracks).toHaveLength(1);
// Shut it again, and wait until it really is shut. These specs
// share one backend process in file order, the panel's width is
// animated, and the transport slides while it closes — a click