improvise-6qet: the grouped harness spec expects the collapsed group's row
grouped.spec.js asserted a collapsed group contributes no rows (8 data rows). It now contributes one per Store (10), labelled Upland, and its cells are not editable. The editable assertion was checked against cell_id without folds_a_group: it fails with 6 editable cells where 0 are expected. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
@@ -146,18 +146,21 @@ test.describe("a grouped, multi-level document", () => {
|
||||
expect(await groupRows.locator("td").count()).toBe(0);
|
||||
await expect(groupRows.first().locator("th")).toHaveCount(1);
|
||||
|
||||
// The collapse is the document's, and it must have REMOVED rows: Upland's
|
||||
// two regions are absent while Inland's two are here. Without this, a
|
||||
// page that drew the indicator and ignored the frame would pass.
|
||||
// The collapse is the document's: Upland's two regions are gone and the
|
||||
// group is ONE row in their place (improvise-6qet, core.md §14).
|
||||
const labels = await page.locator("#grid tbody tr th[scope=row]").allTextContents();
|
||||
expect(labels).toContain("East");
|
||||
expect(labels).toContain("West");
|
||||
expect(labels).toContain("Upland");
|
||||
expect(labels).not.toContain("Ridge");
|
||||
expect(labels).not.toContain("Valley");
|
||||
// 4 regions visible x 2 stores. Stated as a count as well, because a row
|
||||
// drawn with empty labels would satisfy the four assertions above.
|
||||
await expect(page.locator("#grid tbody tr").filter({ hasNot: page.locator("th.group") })).toHaveCount(
|
||||
8,
|
||||
);
|
||||
// (4 regions + the Upland fold) x 2 stores. A count too, because a row
|
||||
// drawn with empty labels would satisfy the assertions above.
|
||||
const dataRows = page.locator("#grid tbody tr").filter({ hasNot: page.locator("th.group") });
|
||||
await expect(dataRows).toHaveCount(10);
|
||||
// The fold is an aggregate: no record carries Region=Upland, so nothing
|
||||
// in its rows may open an editor, where a stored row beside it does.
|
||||
await expect(dataRows.first().locator("td.editable")).not.toHaveCount(0);
|
||||
await expect(dataRows.last().locator("td.editable")).toHaveCount(0);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user