Fix Vue 2 cleanup gaps from Vue-3-only beforeUnmount hooks
What does this MR do and why?
Several Vue components define only beforeUnmount, the Vue 3 lifecycle hook name. Real Vue 2 does not recognize it, so on pages without a vue3_migration.yml — where the component always runs on real Vue 2, never on the @vue/compat-based Vue 3 build — the cleanup registered in that hook silently never ran: polling loops and timers kept going, event listeners stayed attached, and in-flight requests were never aborted.
Two of these were already known locally: their own specs called wrapper.vm.$options.beforeUnmount.call(wrapper.vm) instead of a real destroy(), with a comment explicitly saying beforeUnmount does not fire under Vue 2. This MR fixes the components directly instead of continuing to work around it in the tests:
app/assets/javascripts/observability/components/app.vueee/app/assets/javascripts/orbit/components/namespace_index_card.vue
The other five have the identical shape (only beforeUnmount, no test exercising unmount at all, and no vue3_migration.yml on their page entrypoints), so they have the same bug without a test to show it:
app/assets/javascripts/super_sidebar/components/super_sidebar_toggle.vueapp/assets/javascripts/super_sidebar/components/feature_library/feature_library_modal.vueee/app/assets/javascripts/orbit/components/app.vueee/app/assets/javascripts/orbit/components/orbit_main_page.vueee/app/assets/javascripts/orbit/components/schema_data_tab.vue
The fix renames beforeUnmount to beforeDestroy in each component. I confirmed with a small Jest check that a lone beforeDestroy fires exactly once on both real Vue 2 and Vue 3 (via @vue/compat) — so no second hook, no double-invocation, and no extra guard is needed. ee/app/assets/javascripts/orbit/components/graph_canvas.vue defines both hook names side by side; that's unnecessary too (and would run its cleanup twice under @vue/compat), but it's out of scope for this MR since it's not one of the reachable-bugs found in the earlier investigation — happy to fold it in if preferred.
Also added basic destroy-behavior coverage for the five components that had none, and fixed the two spec workarounds to call a real wrapper.destroy().
How to set up and validate locally
yarn jest <changed spec file>— passes under the default (Vue 2) config.VUE_VERSION=3 yarn jest <changed spec file>— passes under@vue/compattoo, confirming the renamed hook fires there as well.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.