cypress-io / cypress-documentation

Cypress Documentation for the Cypress App, API, Cypress Cloud, UI Coverage and Cypress Accessibility.
https://docs.cypress.io
MIT License
948 stars 1.05k forks source link

Documentation has not been updated for Vuetify 3 #4958

Open skamansam opened 1 year ago

skamansam commented 1 year ago

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.)

moritz-baecker-integra commented 1 day 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

image

moritz-baecker-integra commented 1 day ago

@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);
});