Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

test(collections): read a row's +N without waiting for one

Maurice91f64307624d
diff --git a/client/e2e/collection-row-names-2981.spec.ts b/client/e2e/collection-row-names-2981.spec.ts
index 8d384f680..67072f9da 100644
--- a/client/e2e/collection-row-names-2981.spec.ts
+++ b/client/e2e/collection-row-names-2981.spec.ts
@@ -85,10 +85,8 @@ for (const viewport of [
await expectInside(row);
// Every label is either on the row or counted by its "+N" chip.
const shown = await row.locator('.col-lrow-label:not(.is-over)').count();
- const more = await row
- .locator('.col-lrow-more')
- .textContent()
- .catch(() => null);
+ // Read without waiting: a row whose labels all fit has no "+N".
+ const [more] = await row.locator('.col-lrow-more').allTextContents();
expect(shown + (more ? Number(more.replace('+', '')) : 0)).toBe(place.labels.length);
}
// The map's label strip stays inside the map: whole, or folded into its button.