Skip to content

Add missing regression tests for CRT-1083, CRT-1078, CRT-705#6505

Merged
alantreadway merged 14 commits intolatestfrom
CRT-1083-1064-1078-705/missing-test-coverage
Mar 25, 2026
Merged

Add missing regression tests for CRT-1083, CRT-1078, CRT-705#6505
alantreadway merged 14 commits intolatestfrom
CRT-1083-1064-1078-705/missing-test-coverage

Conversation

@alantreadway
Copy link
Copy Markdown
Member

@alantreadway alantreadway commented Mar 24, 2026

Summary

Adds regression tests for four b13.2.0 fixes that shipped without test coverage. Each test creates a real chart, triggers the exact failure scenario, and asserts internal state. All four were verified with the fix-revert protocol (fails without fix, passes with fix).

  • CRT-1083 (lineSeries.test.ts): Stale _contextNodeData.visible when series hidden during animation skip — uses line series (not bar) because bar has animationAlwaysUpdateSelections: true which bypasses the affected path
  • CRT-1078 (mapMarkerSeries.test.ts): Legend hover crash when highlightedDatum.datum == null — exercises getHighlightedDatum() with an undefined datum highlight
  • CRT-705 (ranges.test.ts): isDropdown state not reset when ranges module disabled — verifies state resets to undefined on disable

Test plan

  • CRT-1083 test passes with fix, fails when fix reverted
  • CRT-1078 test passes with fix, fails when fix reverted
  • CRT-705 test passes with fix, fails when fix reverted
  • CI green on all test suites

Each test creates a real chart instance, triggers the exact failure
scenario, and asserts observed internal state. All four tests were
verified to fail with the corresponding fix reverted and pass with
the fix in place.
Comment thread packages/ag-charts-enterprise/src/series/map-marker/mapMarkerSeries.test.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

❌ Codex review complete; 1 issue found (P0: 0 | P1: 0 | P2: 1 | P3: 0)

View full review

Add missing regression tests for CRT-1083, CRT-1064, CRT-1078, CRT-705

PR: #6505
Author: alantreadway | Base: b13.2.0 ← Head: CRT-1083-1064-1078-705/missing-test-coverage
Diff: 4 files changed, +154 -1

Summary

This PR adds four targeted regression tests across community and enterprise suites for CRT-1083, CRT-705, CRT-1078, and CRT-1064. The tests mostly exercise the intended internal edge paths, but one case does not precisely match the documented null-datum scenario.

Findings

P0: 0 | P1: 0 | P2: 1 | P3: 0

1 inline comments posted.

Verdict

Assessment: incorrect
Confidence: 0.84

The PR is close, but one regression test does not faithfully reproduce the stated failure mode, leaving a coverage gap for CRT-1078.

Required Actions:

  • Update the CRT-1078 map-marker test to pass datum: null in the simulated legend highlight (optionally add an additional assertion for undefined if both are expected to be handled).

CRT-705: Use dropdown.visible:'always' option instead of directly
setting rangesModule.isDropdown = true.

CRT-1064: Override contentGroup.pickNodes to inject the line path
node (which naturally carries a boolean datum) into pick results,
instead of appending a synthetic Rect to the scene graph.
@alantreadway alantreadway changed the base branch from b13.2.0 to merge/b13.2.0-to-latest March 24, 2026 13:33
…ghlightManager call

Replaces highlightManager.updateHighlight() + getHighlightedDatum()
with hoverAction on the legend item coordinates. The hover naturally
triggers the null-datum highlight path, and without the fix the render
cycle crashes accessing point.x on the undefined datum.
…JSDOM

The typeof guard in pickNodesExactShape protects a canvas hit-testing
path that cannot be exercised through user-facing options in JSDOM.
@alantreadway alantreadway changed the title Add missing regression tests for CRT-1083, CRT-1064, CRT-1078, CRT-705 Add missing regression tests for CRT-1083, CRT-1078, CRT-705 Mar 24, 2026
@alantreadway alantreadway force-pushed the merge/b13.2.0-to-latest branch from 30d0384 to 71fb6fb Compare March 24, 2026 14:23
Base automatically changed from merge/b13.2.0-to-latest to latest March 24, 2026 14:38
…sophy

- Document preference hierarchy: user-facing options > test harness
  utilities > internal state reads > internal state writes
- Document that isPointInPath is stubbed in JSDOM and when to
  escalate to Playwright E2E tests
@alantreadway alantreadway requested a review from a team as a code owner March 24, 2026 17:43
@github-actions
Copy link
Copy Markdown
Contributor

Snapshots automatically updated, please review before merge:

2 similar comments
@github-actions
Copy link
Copy Markdown
Contributor

Snapshots automatically updated, please review before merge:

@github-actions
Copy link
Copy Markdown
Contributor

Snapshots automatically updated, please review before merge:

The CDP tracing-based test intermittently fails in CI due to timing
sensitivity, then cascades via serial mode to skip the remaining suite.
Comment thread packages/ag-charts-enterprise/src/features/ranges/ranges.test.ts Outdated
Google Font downloads intermittently timeout in CI, causing flaky failures.
…test

Address PR feedback: isDropdown is an implementation detail. Replace with
an e2e test that verifies range buttons disappear when disabled and
reappear when re-enabled, testing the user-visible behaviour.
Copy link
Copy Markdown
Member

@lsjroberts lsjroberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending snapshot updates

Use AgCharts.getInstance() + updateDelta() from the e2e test instead of
exposing chart, AgCharts, and options on window.
Add Disable/Enable Ranges buttons so human operators can reproduce the
issue manually. Simplify the e2e test to click the buttons directly.
Add @ag-skip-fws since the example uses direct DOM event listeners.
Use AgCartesianChartOptions with number axes and valid button values.
Document the convention of adding interactive buttons to e2e examples
so they serve as self-contained reproducers for human operators.
Direct DOM manipulation in e2e examples requires the @ag-skip-fws
directive to prevent framework generation failures in CI.
@alantreadway alantreadway enabled auto-merge March 25, 2026 11:34
@alantreadway alantreadway merged commit efec778 into latest Mar 25, 2026
36 checks passed
@alantreadway alantreadway deleted the CRT-1083-1064-1078-705/missing-test-coverage branch March 25, 2026 11:48
alantreadway added a commit that referenced this pull request Mar 25, 2026
The enable/disable toggle test from PR #6505 uses waitForAllChartUpdates
but the import was missing after rebase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants