test(explore): cover annotation layer link app-root prefix in subdire…#41997
test(explore): cover annotation layer link app-root prefix in subdire…#41997massucattoj wants to merge 1 commit into
Conversation
…ctory deployments
Code Review Agent Run #ee76deActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
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:
|
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/listand 404'd. It was fixed as part of #33508 (which routed this href throughensureAppRoot) and later refactored by #39925, but no test pinned the behavior, so either historical regression path (droppingensureAppRoot, or hardcoding a prefix) would ship silently. The new test mocksapplicationRoot()as/superset(same seam asMenu.subdirectory.test.tsx), renders the real component, and asserts the anchor's href is/superset/annotationlayer/list. Verified the test fails whenensureAppRootis removed from the link.TESTING INSTRUCTIONS
npm run test -- src/explore/components/controls/AnnotationLayerControl/