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 2 commits 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 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
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/