positron icon indicating copy to clipboard operation
positron copied to clipboard

e2e test - histogram range rounding

Open rodrigosf672 opened this issue 1 month ago • 2 comments

This PR adds Playwright tests to verify that histogram bin ranges in the Data Explorer are correctly rounded and displayed in tooltips across different numeric scales. Each test creates a small DataFrame, opens it in the Data Explorer, hovers the histogram bins, and checks that the tooltip shows the expected range.

Test Cases

I'm focusing on quality over quantity for the test cases. If something fails in the future, we may add additional test dases. Please notice that all test cases run as a single test, to prevent excessive tests from running.

Case Data Range Expected Bins
1 0.0 → 100.0 0–33, 34–66, 67–100
2 1.10 → 3.90 1.10–2.03, 2.03–2.97, 2.97–3.90
3 -1.10 → 2.00 -1.10–0.4500, 0.4500–2.00
4 -0.0001 → 0.00009 -0.0001–-5.00E-06, -5.00E-06–9.00E-05

QA Notes

@:web @:win @:data-explorer

rodrigosf672 avatar Nov 25 '25 17:11 rodrigosf672

E2E Tests 🚀 This PR will run tests tagged with: @:critical @:web @:win @:data-explorer

readme  valid tags

github-actions[bot] avatar Nov 25 '25 17:11 github-actions[bot]

@midleman I'm curious about whether you think this should have its own file or if I should merge my test with sparklines.test.ts. Open to either, and to any feedback in general. Thanks!

rodrigosf672 avatar Nov 25 '25 17:11 rodrigosf672

@copilot open a new pull request to apply changes based on the comments in this thread

rodrigosf672 avatar Dec 01 '25 16:12 rodrigosf672

@rodrigosf672 I've opened a new pull request, #10848, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot avatar Dec 01 '25 16:12 Copilot

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

github-actions[bot] avatar Dec 01 '25 16:12 github-actions[bot]

@rodrigosf672 , I just had a chat with @dhruvisompura and it looks like we already have some related Data Explorer React component tests at src/vs/workbench/services/positronDataExplorer/test/browser/columnSummaryCell.test.tsx. They’re not testing this exact behavior, but they’re a good example of how we could cover histogram bins at a lower level instead of here at e2e. I’ll add a backlog ticket to track moving this coverage into unit tests and will link this PR to it once it’s created.

midleman avatar Dec 01 '25 23:12 midleman