Skip to content

Prepare registry specs for BootstrapVue upgrade

Nick Kipling requested to merge upgrade-bootstrap-vue/specs-update-registry into master

Prepare registry specs for BootstrapVue 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
  • sync needs to be set to false
  • attachToDocument must be true

This MR focuses on upgrading the tests located in:

  • spec/frontend/registry/components/app_spec.js
  • spec/frontend/registry/components/collapsible_container_spec.js
  • spec/frontend/registry/components/project_empty_state_spec.js
  • spec/frontend/registry/components/table_registry_spec.js

Why are these changes necessary?

  • The reason to migrate the tests to vue-test-utils is that it allows us to set the sync and attachToDocument properties.
  • The reason to set attachDocument to true is that the BTooltip and BPopover directives expect to be attached to a document object.
  • The reason to set sync to false is that otherwise, specs for components that use BTooltip or BPopover will fail with the following error:

TypeError: Cannot read property 'sync' of null

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Merge request reports