Skip to content

test(chart-list): cover custom tag filtering - #45695

Open
shchun wants to merge 2 commits into
apache:masterfrom
shchun:test/chart-list-tag-filtering
Open

shchun wants to merge 2 commits into
apache:masterfrom
shchun:test/chart-list-tag-filtering

Conversation

@shchun

@shchun shchun commented Oct 24, 2026

Copy link
Copy Markdown

SUMMARY

The previous tests removed system tags, such as type:chart, before rendering TagsList. As a result, they could still pass if the actual ChartList filtering regressed and started displaying system tags. This change passes unfiltered tag data through ChartList and checks the rendered result so that the tests can catch that regression.

The new cases cover numeric custom tags, legacy custom tags, tags without a type, system-only tags, empty or missing tags, and truncation after filtering. TagsList retains unit coverage for sorting and truncation. Application code is unchanged.

AI assistance: I used Codex to help implement, review, and validate the tests, and to translate my explanation into English.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Not applicable: tests only; no UI changes.

TESTING INSTRUCTIONS

From superset-frontend, run:

npm run test -- --runInBand src/pages/ChartList/ChartList.listview.test.tsx src/components/TagsList/TagsList.test.tsx
  • Both suites passed: 30 tests total, using Node 24 in a Linux Docker container.
  • All applicable pre-commit hooks passed, including frontend type checking, against the two staged test files in a Linux validation copy verified to match the working branch. Referenced core package declarations were built first.
  • Regression check: in the isolated validation copy, temporarily replacing ChartList's tags.filter(...) with tags caused four of the six new cases to fail. The production source was restored, and both suites passed again.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags: TAGGING_SYSTEM, enabled in the test mocks.
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codeant-ai-for-open-source

codeant-ai-for-open-source Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: 39b016f820e7

@sadpandajoe
sadpandajoe self-requested a review October 27, 2026 17:17
@sadpandajoe

Copy link
Copy Markdown
Member

@shchun code looks good but you have a failing CI. Can you take a look? Your branch may just need a rebase/merge master.

@shchun
shchun force-pushed the test/chart-list-tag-filtering branch from 613edbc to 8cba05e Compare October 28, 2026 03:04
@shchun

shchun commented Oct 28, 2026

Copy link
Copy Markdown
Author

Rebased onto the latest master. All 52 related tests and pre-commit checks pass locally. The workflows appear to be awaiting approval.

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.61%. Comparing base (0a92706) to head (39b016f).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #45695       +/-   ##
===========================================
+ Coverage   65.27%   84.61%   +19.34%     
===========================================
  Files        3069     3069               
  Lines      205483   205417       -66     
  Branches    48295    48284       -11     
===========================================
+ Hits       134128   173823    +39695     
+ Misses      68269    28300    -39969     
- Partials     3086     3294      +208     
Flag Coverage Δ
javascript 80.78% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sadpandajoe sadpandajoe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM thanks for getting CI green

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants