Skip to content

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

Open
massucattoj wants to merge 1 commit 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 1 commit 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.04%. Comparing base (f7b7bad) to head (63f509d).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #41997   +/-   ##
=======================================
  Coverage   65.04%   65.04%           
=======================================
  Files        2742     2742           
  Lines      153422   153422           
  Branches    35198    35198           
=======================================
+ Hits        99788    99796    +8     
+ Misses      51727    51719    -8     
  Partials     1907     1907           
Flag Coverage Δ
javascript 70.33% <ø> (+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.

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