Skip to content

BootstrapVue component is not stubbed when changing order of localVue.use()  #754

Closed
@Trainmaster

Description

@Trainmaster

Version

1.0.0-beta.20

Reproduction link

https://github.com/Trainmaster/vue-sandbox/tree/components-not-being-stubbed

Steps to reproduce

First run yarn && yarn test and the following output will be displayed:

LOG: '<div><div id="collapse" class="collapse" style="display: none;"></div> <custom-component-stub></custom-component-stub></div>'

Then change the order of the localVue.use() statements in tests/CollapseTest.js to:

localVue.use(Vuex);
localVue.use(BootstrapVue);

Now the output is:

LOG: '<div><a-stub id="collapse"></a-stub> <custom-component-stub></custom-component-stub></div>'

What is expected?

The html of the rendered component should not depend on the order of localVue.use().

What is actually happening?

The html of the rendered component differs when changing the order of localVue.use().


This also causes some weird errors such as

ERROR: '[Vue warn]: Error in callback for watcher "visible": "TypeError: Cannot read property '_transitionClasses' of undefined"

found in

---> <BCollapse>
       <Settings> at xxx.vue
         <Root>'
ERROR: TypeError: Cannot read property '_transitionClasses' of undefined
TypeError: Cannot read property '_transitionClasses' of undefined
    at Array.updateClass (http://localhost:9876/absolute/home/xxx/ComponentTest.js?70538298638acedc293906d3e2725d00bed9286f:29658:28)
    at patchVnode (http://localhost:9876/absolute/home/xxx/ComponentTest.js?70538298638acedc293906d3e2725d00bed9286f:29161:62)
    at updateChildren (http://localhost:9876/absolute/home/xxx/ComponentTest.js?70538298638acedc293906d3e2725d00bed9286f:29052:9)
    at patchVnode (http://localhost:9876/absolute/home/xxx/ComponentTest.js?70538298638acedc293906d3e2725d00bed9286f:29166:29)
    at updateChildren (http://localhost:9876/absolute/home/xxx/ComponentTest.js?70538298638acedc293906d3e2725d00bed9286f:29052:9)
    at patchVnode (http://localhost:9876/absolute/home/xxx/ComponentTest.js?70538298638acedc293906d3e2725d00bed9286f:29166:29)
    at updateChildren (http://localhost:9876/absolute/home/xxx/ComponentTest.js?70538298638acedc293906d3e2725d00bed9286f:29052:9)
    at patchVnode (http://localhost:9876/absolute/home/xxx/ComponentTest.js?70538298638acedc293906d3e2725d00bed9286f:29166:29)
    at updateChildren (http://localhost:9876/absolute/home/xxx/ComponentTest.js?70538298638acedc293906d3e2725d00bed9286f:29052:9)
    at patchVnode (http://localhost:9876/absolute/home/xxx/ComponentTest.js?70538298638acedc293906d3e2725d00bed9286f:29166:29)

in our test suite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions