Make MR widget approvals summary spec compatible w/ BootstrapVue 2
Prepare MR Widget for bv upgrade
This MR lays the groundwork for the BootstrapVue upgrade that will be done in this MR: !18913 (merged). Due to some changes in the BTooltip and BPopover components, some related tests started failing after the upgrade. Those tests need to be updated accordingly:
- Migrate specs to use vue-test-utils
-
syncneeds to be set tofalse -
attachToDocumentmust betrue
This MR focuses on upgrading the tests located in ee/spec/frontend/vue_mr_widget/components/approvals/approvals_summary_optional_spec.js:
Why are these changes necessary?
- The reason to migrate the tests to
vue-test-utilsis that it allows us to set thesyncandattachToDocumentproperties. - The reason to set
attachDocumenttotrueis that the BTooltip and BPopover directives expect to be attached to a document object. - The reason to set
synctofalseis that otherwise, specs for components that useBTooltiporBPopoverwill fail with the following error:
TypeError: Cannot read property 'sync' of null
Screenshots
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
Edited by Vitaly Slobodin