diff --git a/harness/tests/contract.spec.js b/harness/tests/contract.spec.js index fc4c5f70..8da1d071 100644 --- a/harness/tests/contract.spec.js +++ b/harness/tests/contract.spec.js @@ -73,7 +73,7 @@ test.describe("every field the render model projects reaches the screen", () => // The axis line is the shared `view_axis_summary`; its absence would mean // a second derivation had crept in. await expect(page.locator("#views li").nth(0).locator(".axes")).toHaveText( - "R:Product C:Quarter", + "R:Product P:Quarter", ); await page.keyboard.press("Escape"); @@ -196,21 +196,21 @@ test.describe("a pointer event reaches the client and its answer is painted", () // A view row (improvise-iioi). The activation must read the CLICKED index, // not `view_panel_cursor` — so the cursor must not already be on the row - // clicked, or both readings give the same answer. `Default` is index 0 and - // holds the cursor by default, so move to it and click `Plan`. + // clicked, or both readings give the same answer. `Plan` is index 0 and + // holds the cursor by default, so move to it and click `Season`. await page.keyboard.press("Shift+V"); - await expect(page.locator("#views li.selected")).toContainText("Default"); - // Switch to Default by KEYBOARD, leaving the cursor on it. The click then + await expect(page.locator("#views li.selected")).toContainText("Plan"); + // Switch to Plan by KEYBOARD, leaving the cursor on it. The click then // names a different row than the cursor does, which is the whole point. await page.keyboard.press("Enter"); - await expect(page.locator("#view-name")).toHaveText("Default"); - - const plan = page.locator("#views li").filter({ hasText: "Plan" }).first(); - await plan.click(); - // Reading the cursor instead of the index re-selects Default and fails. await expect(page.locator("#view-name")).toHaveText("Plan"); - await expect(page.locator("#views li.active")).toContainText("Plan"); - await expect(page.locator("#views li.selected")).toContainText("Plan"); + + const season = page.locator("#views li").filter({ hasText: "Season" }).first(); + await season.click(); + // Reading the cursor instead of the index re-selects Plan and fails. + await expect(page.locator("#view-name")).toHaveText("Season"); + await expect(page.locator("#views li.active")).toContainText("Season"); + await expect(page.locator("#views li.selected")).toContainText("Season"); // A formula row: navigation only, because FormulaPanel binds no Enter and // a click mirrors Enter. The Rust guard is on the KEYMAP — clients.md. diff --git a/web/demo.improv b/web/demo.improv index b2eb845b..b1e14a28 100644 --- a/web/demo.improv +++ b/web/demo.improv @@ -10,6 +10,14 @@ _Index: none _Dim: none format: ,.0 +## View: Season +Quarter: row +_Measure: column +Product: page, Latte +_Index: none +_Dim: none +format: ,.0 + ## Formulas - Profit = Revenue - Cost