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

This commit is contained in:
Maurice
2026-11-05 14:18:04 +01:00
parent 6ee540d5e4
commit 91f6430762
+2 -4
View File
@@ -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.