Skip to content

test(explore): cover annotation layer link app-root prefix in subdire…#41997

Open
massucattoj wants to merge 2 commits into
apache:masterfrom
massucattoj:test/annotation-layer-link-app-root
Open

test(explore): cover annotation layer link app-root prefix in subdire…#41997
massucattoj wants to merge 2 commits into
apache:masterfrom
massucattoj:test/annotation-layer-link-app-root

Conversation

@massucattoj

Copy link
Copy Markdown
Contributor

SUMMARY

Adds subdirectory (SUPERSET_APP_ROOT) regression coverage for the "Add an annotation layer here" link shown in the annotation layer chart selector when the search finds no results.

Under a subdirectory deployment this link used to point to the un-prefixed /annotationlayer/list and 404'd. It was fixed as part of #33508 (which routed this href through ensureAppRoot) and later refactored by #39925, but no test pinned the behavior, so either historical regression path (dropping ensureAppRoot, or hardcoding a prefix) would ship silently. The new test mocks applicationRoot() as /superset (same seam as Menu.subdirectory.test.tsx), renders the real component, and asserts the anchor's href is /superset/annotationlayer/list. Verified the test fails when ensureAppRoot is removed from the link.

TESTING INSTRUCTIONS

npm run test -- src/explore/components/controls/AnnotationLayerControl/

@dosubot dosubot Bot added change:frontend Requires changing the frontend explore:annotation Related to annotations in Explore labels Jul 13, 2026
@bito-code-review

bito-code-review Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #ee76de

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 63f509d..63f509d
    • superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.subdirectory.test.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.06%. Comparing base (5bf26f7) to head (dd3d108).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #41997      +/-   ##
==========================================
+ Coverage   56.18%   65.06%   +8.88%     
==========================================
  Files        2758     2758              
  Lines      155197   155197              
  Branches    35563    35563              
==========================================
+ Hits        87200   100985   +13785     
+ Misses      67168    52297   -14871     
- Partials      829     1915    +1086     
Flag Coverage Δ
javascript 70.74% <ø> (+<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 self-requested a review July 16, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend explore:annotation Related to annotations in Explore size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant