Open skamansam opened 1 year ago
I got the same problem. The documentation doesn't work for Vuetify. It doesnt seem to work at all. VApp whats that supposed to be? It got never defined. Also nearly everything else here doesn't work https://docs.cypress.io/app/component-testing/vue/examples#Replicating-Plugins
@skamansam It only worked for me like this:
import { createVuetify } from 'vuetify'
import * as vuetifycomponents from 'vuetify/components/VDataTable'
Cypress.Commands.add('mount', (component, options = {}) => {
const vuetify = createVuetify( {components: vuetifycomponents});
options.global = {
plugins: [vuetify],
...options.global,
};
return mount(component, options);
});
The documentation at https://docs.cypress.io/guides/component-testing/vue/examples#Replicating-the-expected-Component-Hierarchy has not been updated for Vuetify 3 and as such, it does not work for the current version of Vuetify.
(I can't for the life of me figure out how to display anything in component testing for Vue 3 + Vuetify 3. My repo is at https://github.com/BizziQuest/QuestListsFB. Components just aren't mounting, so I'm not sure if it's a documentation error or something on my end.)