mirror of
https://github.com/mvschwarz/openrig.git
synced 2026-11-07 22:58:42 -10:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e0152f0ee |
No files matched your search
@@ -311,7 +311,13 @@ describe("P5.3 ActivityRing and HotPotatoEdge", () => {
|
||||
expect(css).not.toMatch(/background-color: rgba\(255, 255, 255, 0\.96\)/);
|
||||
expect(rigGraph).toMatch(/activityRing/);
|
||||
expect(table).toMatch(/ActivityRing/);
|
||||
expect(table).toMatch(/group-hover:opacity-100/);
|
||||
// 0.3.1 slice 14 walk-item 16 deliberately removed the hover-
|
||||
// gated `opacity-0` + `group-hover:opacity-100` pattern from
|
||||
// action-column buttons — operators kept missing the cmux
|
||||
// launcher when it was hidden off-mouse. The test now asserts
|
||||
// the action button is wired in (data-testid present) instead
|
||||
// of asserting the rejected hover-reveal chain.
|
||||
expect(table).toMatch(/data-testid=\{`topology-table-cmux-/);
|
||||
expect(ring).not.toMatch(/StatusPip/);
|
||||
expect(edge).toMatch(/animateMotion/);
|
||||
expect(activity).toMatch(/TOPOLOGY_NODE_ACTIVITY_TTL_MS/);
|
||||
|
||||
@@ -149,16 +149,25 @@ describe("SliceScopePage P5-2 tab content piping", () => {
|
||||
expect(await findByTestId("slice-scope-error")).toBeTruthy();
|
||||
});
|
||||
|
||||
it("default landing tab is 'story'; mounts TimelineTab with events + phaseDefinitions", async () => {
|
||||
it("default landing tab is 'overview' (slice 12 walk-item 1: README before metric grid); story tab still mounts TimelineTab when activated", async () => {
|
||||
const { container, findByTestId } = renderSliceScope({
|
||||
sliceId: "idea-ledger",
|
||||
detail: makeDetail(),
|
||||
});
|
||||
// ScopeShell mounts; project-tab-nav rendered.
|
||||
await findByTestId("project-tab-nav");
|
||||
// Story is the default active tab.
|
||||
const storyTab = container.querySelector("[data-testid='project-tab-story']");
|
||||
expect(storyTab?.getAttribute("data-active")).toBe("true");
|
||||
// V0.3.1 slice 12 walk-item 1 — default tab was changed from
|
||||
// 'story' to 'overview' so the first thing the operator sees on
|
||||
// a slice is its README (current step + readiness), not a metric
|
||||
// grid. Test now reflects the deliberate landing-tab choice.
|
||||
const overviewTab = container.querySelector("[data-testid='project-tab-overview']");
|
||||
const storyTabBefore = container.querySelector("[data-testid='project-tab-story']");
|
||||
expect(overviewTab?.getAttribute("data-active")).toBe("true");
|
||||
expect(storyTabBefore?.getAttribute("data-active")).toBe("false");
|
||||
// Clicking the story tab still activates the TimelineTab panel.
|
||||
fireEvent.click(storyTabBefore!);
|
||||
const storyTabAfter = container.querySelector("[data-testid='project-tab-story']");
|
||||
expect(storyTabAfter?.getAttribute("data-active")).toBe("true");
|
||||
});
|
||||
|
||||
it("progress tab mounts AcceptanceTab (FOLDED per code-map)", async () => {
|
||||
|
||||
@@ -272,8 +272,17 @@ describe("globals.css pulsing-ring CSS contract (ritual #7 pseudo-element-paint)
|
||||
const src = readFileSync(cssPath, "utf8");
|
||||
// Reduced-motion block must include .terminal-card-active so the pulse
|
||||
// animation is suppressed for users with motion-sensitivity preferences.
|
||||
const reducedMotion = src.match(/@media \(prefers-reduced-motion: reduce\)\s*\{[\s\S]*?\}\s*\}/);
|
||||
expect(reducedMotion).not.toBeNull();
|
||||
expect(reducedMotion![0]).toMatch(/\.terminal-card-active/);
|
||||
//
|
||||
// globals.css has multiple @media (prefers-reduced-motion: reduce)
|
||||
// blocks (one per animation cluster — vellum drift, activity rings,
|
||||
// terminal cards, etc). Scan ALL of them — the prior single-match
|
||||
// regex picked the first block (vellum-scroll-x) which doesn't
|
||||
// include .terminal-card-active even though a later block does.
|
||||
const blocks = Array.from(
|
||||
src.matchAll(/@media \(prefers-reduced-motion: reduce\)\s*\{[\s\S]*?\}\s*\}/g),
|
||||
);
|
||||
expect(blocks.length).toBeGreaterThan(0);
|
||||
const anyBlockHasTerminal = blocks.some((m) => /\.terminal-card-active/.test(m[0]));
|
||||
expect(anyBlockHasTerminal).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user