spreed
spreed copied to clipboard
feat(vue3): fix automated tests
☑️ Resolves
- Ref #9448
- Fix #12363
- Migrate to vue-test-utils v2 (https://test-utils.vuejs.org/migration/)
- Disable tests for
@nextcloud/dialogsandnextcloud/upload - Rest tests are working
🖌️ UI Checklist
🖼️ Screenshots / Screencasts
🚧 Tasks
- [ ] Bring back tests for components when
nextcloud/vuelib is migrated - [ ] Uninstall
flush-promises
Note, you don't need to always import t in components for tests, it is not required. We can setup component's globals in the mount function, including installing plugins:
See:
mountOptions.global.pluginsto install plugins: https://test-utils.vuejs.org/api/#globalconfig.globalto make it globally: https://test-utils.vuejs.org/api/#config-global
Can you describe the fix(vue3): fix double emitting commit?
Can you describe the
fix(vue3): fix double emittingcommit?
As was discussed in the office: Vue2 and Vue3 behave differently at this moment:
- in Vue 2 component is destroyed before bubbling event is triggered
- in Vue 3 event bubbles, (and fires twice), then got destroyed