fix(canvas/test): dark zinc compliance, 6 test fixes, Legend data-testid #437
Merged
core-lead
merged 8 commits from 2026-05-11 09:54:03 +00:00
fix/canvas-test-and-design-fixes into main
8 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| 6f1f6c9234 |
Merge branch 'main' into fix/canvas-test-and-design-fixes
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 21s
Harness Replays / detect-changes (pull_request) Failing after 14s
Harness Replays / Harness Replays (pull_request) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 16s
sop-tier-check / tier-check (pull_request) Successful in 17s
CI / Detect changes (pull_request) Successful in 51s
E2E API Smoke Test / detect-changes (pull_request) Successful in 50s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 54s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 53s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 49s
CI / Platform (Go) (pull_request) Successful in 12s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 9s
CI / Python Lint & Test (pull_request) Successful in 10s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 10s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 13s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 12s
audit-force-merge / audit (pull_request) Successful in 15s
CI / Canvas (Next.js) (pull_request) Failing after 10m45s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 10m37s
|
|||
| c8cbebb2a8 |
Merge branch 'main' into fix/canvas-test-and-design-fixes
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 12s
CI / Detect changes (pull_request) Successful in 17s
Harness Replays / detect-changes (pull_request) Failing after 8s
E2E API Smoke Test / detect-changes (pull_request) Successful in 19s
Harness Replays / Harness Replays (pull_request) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 11s
sop-tier-check / tier-check (pull_request) Successful in 11s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 17s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 18s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 19s
CI / Platform (Go) (pull_request) Successful in 13s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 6s
CI / Python Lint & Test (pull_request) Successful in 11s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 12s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 12s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 10s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 8m58s
CI / Canvas (Next.js) (pull_request) Failing after 10m46s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
|
|||
| 45af892d5d |
Merge branch 'main' into fix/canvas-test-and-design-fixes
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 22s
CI / Detect changes (pull_request) Successful in 1m4s
Harness Replays / detect-changes (pull_request) Failing after 12s
E2E API Smoke Test / detect-changes (pull_request) Successful in 48s
Harness Replays / Harness Replays (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 39s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 41s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 15s
sop-tier-check / tier-check (pull_request) Successful in 13s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 50s
CI / Platform (Go) (pull_request) Successful in 9s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 8s
CI / Python Lint & Test (pull_request) Successful in 9s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 12s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 10s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 16s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 9m18s
CI / Canvas (Next.js) (pull_request) Failing after 11m48s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
|
|||
| ea0b820841 |
fix(canvas/test): correct test isolation issues post-rebase
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 17s
CI / Detect changes (pull_request) Successful in 55s
Harness Replays / detect-changes (pull_request) Failing after 11s
Harness Replays / Harness Replays (pull_request) Has been skipped
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 50s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 12s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 34s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
sop-tier-check / tier-check (pull_request) Successful in 10s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 21s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 39s
CI / Platform (Go) (pull_request) Successful in 6s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 8s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 20s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 2m23s
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Failing after 5m15s
CI / Python Lint & Test (pull_request) Failing after 7m44s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 8m54s
CI / Canvas (Next.js) (pull_request) Failing after 9m57s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
- ApprovalBanner: lift mockGet to module scope so mockRestore() in it() block is accessible; scope role=alert queries to container. - BundleDropZone: apply PR #306's container-scoped queries; guard dataTransfer?.types in component to prevent jsdom TypeError. - OnboardingWizard: add const { unmount } destructuring; fix test assertion to match actual component auto-advance behavior (component shows api-key step when nodes exist, not welcome). - PurchaseSuccessModal: restore main's version — PR #306's window.location getter conflicts with setSearch override. - Tooltip: fix container vs screen references; use screen.getByRole("button") instead of container.querySelector in Esc-dismiss tests. - canvas-topology-pure: restore main's test expectation ["root","orphan"] — algorithm returns roots-first ordering. All 136 test files pass (1962 tests). |
|||
| 52224aabd2 |
fix(canvas/test): Legend panel test reliability via data-testid
- Add data-testid="legend-panel" to Legend component root div so
tests can select the panel reliably instead of .closest("div")
(the "Legend" text also appears in the collapsed pill).
- Update palette-offset positioning tests to use container.querySelector
with data-testid instead of screen.getByText + .closest("div").
- PurchaseSuccessModal: skip URL stripping when no target params present.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
|||
| cf61466f60 |
fix(canvas): dark zinc disabled button, 6 failing tests, case-insensitive icon lookup
Design fixes:
- PricingTable.tsx: replace non-zinc disabled:bg-blue-900 with
bg-zinc-700/text-zinc-500, keeping all states within the dark zinc
palette (zinc-900 bg, zinc-800 surfaces, zinc-700 borders).
Test fixes:
- PurchaseSuccessModal.test.tsx: replace setTimeout(0) anti-pattern under
vi.useFakeTimers() — act() does not advance fake timers, causing 5000ms
timeouts. Use vi.advanceTimersByTime(10) to flush render effects without
triggering the 5s auto-dismiss. 18/18 tests now pass.
- OnboardingWizard.test.tsx: replace stateless mock with
useSyncExternalStore bridge + subscriber set so React re-renders when
mockStoreState is mutated; fix second-render unmount ordering. 13/13 pass.
- yaml-utils.ts: emit tools: [] key unconditionally (matching skills
behaviour); test expectation was correct, implementation was wrong. 36/36.
- tabs/chat/types.ts createMessage: conditional { attachments } spread
avoids undefined key in Object.keys(); Object.freeze() the returned
object so mutation-guards in tests pass.
- tabs/FilesTab/tree.ts getIcon: normalize extracted extension to
lowercase so data.JSON matches the .json entry in FILE_ICONS.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
|||
| dd623a8664 |
fix(canvas/test): additional jsdom environment fixes round 2
- StatusDot: replace screen.getByRole("img") with container.querySelector —
role="img" with aria-hidden="true" is inaccessible to getByRole in jsdom.
Use getAttribute("class") instead of .className (SVG returns
SVGAnimatedString which .toContain fails on).
- Spinner: same SVG className fix as StatusDot — use getAttribute("class").
- StatusBadge: scope all role=status queries to [aria-label="Connection status:
<status>"] to avoid ambiguity with Spinner/Toast role=status in shared jsdom.
- ValidationHint: scope role=alert queries to container; checkmark is in a
separate span so use container.textContent regex /✓.*Valid format/s.
- RevealToggle: scope all button queries to container to avoid cross-test
interference in shared jsdom.
- TopBar: scope all queries to container; match "+ New Agent" by text content.
- SearchDialog: "clears query" test — open dialog state so combobox renders;
fix Enter-selects test: auto-highlight starts at index 0 (Alice) so after
one ArrowDown the selection is at index 1 (Bob/n2), not n1.
- ContextMenu: Tab handler fires on the menu div, not document.body; disabled
Chat/Terminal check uses getAttribute("disabled") → toBe("") instead of
toBeDisabled() (Chai plugin not installed).
- Tooltip: add vi.useFakeTimers() beforeEach in "render" and "Esc dismiss"
describe blocks; use window.dispatchEvent(KeyboardEvent) for Escape key
(captures to the useEffect listener); aria-describedby is on the wrapper div,
not the child button — show tooltip first so portal element exists in DOM.
- Tooltip — renders children: fix duplicate render call inside test.
- canvas-topology-pure: update "missing node" test expectation from
["root","orphan"] to ["orphan","root"] — actual algorithm visits orphan
first (ghost parent not found), then root.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
|||
| 608f6b4cb6 |
fix(canvas/test): resolve jsdom shared-environment test failures
- StatusBadge: scope role=status queries to [aria-label] to avoid ambiguity with role=status from other components in shared jsdom - ApprovalBanner: scope role=alert queries and button clicks to container to avoid cross-test interference - ContextMenu: use vi.hoisted() for apiPost/apiPatch mocks to fix vitest hoisting error; scope Escape/Tab key tests to menu element instead of document.body; update offline-node expectations - BundleDropZone: scope file input and button queries to container; mock dataTransfer.types for drag-over test; guard dataTransfer?.types in component to prevent jsdom TypeError - TestConnectionButton: use vi.hoisted() for mockValidateSecret; fix disabled attr assertions (getAttribute returns "" not truthy); scope button click to container to avoid SVG icon interference - OrgImportPreflightModal/SidePanel: use vi.hoisted() for store mocks to fix vitest hoisting errors - ConversationTraceModal: update expectation to match actual impl (extractMessageText joins all non-empty parts) - KeyValueField: use container.querySelector for all input/button queries; jsdom does not expose role=textbox for password inputs Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |