Open
test(statviz): add StockOverview dashboard section tests#2872
Conversation
Co-authored-by: pylipp <10617122+pylipp@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pylipp
August 19, 2026 13:49
View session
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2872 +/- ##
==========================================
+ Coverage 73.71% 73.78% +0.06%
==========================================
Files 330 330
Lines 25270 25090 -180
Branches 2479 2444 -35
==========================================
- Hits 18628 18512 -116
+ Misses 6591 6527 -64
Partials 51 51
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pylipp
force-pushed
the
copilot/test-coverage-dashboard-graphs
branch
from
August 20, 2026 11:20
c60b3fe to
7a203a1
Compare
pylipp
marked this pull request as ready for review
August 20, 2026 19:37
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
Adds integration-style UI tests for the StockOverview section in the statviz analytics dashboard, validating URL-driven filter behavior and chart output using lightweight nivo chart stubs.
Changes:
- Introduces
StockOverview.test.tsxcovering baseline rendering, per-filter narrowing, chip clearing flows, and boxes/items switching. - Mocks nivo chart primitives to assert on filtered data without relying on SVG rendering in jsdom.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
pylipp
force-pushed
the
copilot/test-coverage-dashboard-graphs
branch
from
August 20, 2026 20:40
a1db454 to
1befc29
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds integration tests for the StockOverview section of the analytics Dashboard, covering the full pipeline from mocked GraphQL responses through client-side filtering to rendered chart output.
Approach
Chart mocking —
PieChart,BarChart, andCalendarChart(nivo) are replaced with lightweight DOM stubs that render their input data as text nodes anddata-testidelements. This lets tests assert on filtered data values without SVG/ResizeObserver complexity in jsdom, while keeping all filter-container logic (the actual business logic under test) fully exercised.Filter state via URL — Filters are pre-set through the
initialUrlparameter (?sp=1,?sg=Male,?sc=1,?sl=2,?st=1,?snt=1) rather than driving react-select UIs, matching how the real components work and making tests fast and deterministic.Mock data
STOCK_QUERYCREATED_BOXES_QUERYWhat is tested (14 tests)
data-testidasserted for each filter type; excluded-tag chip verified to carrytext-decoration: line-through×, via "Clear filters (N)" button, and via the filter-panel drawer ("Clear filters" → Apply)<select>(found bygetByDisplayValue) switches chart values and headings betweenboxesCountanditemsCount