I am getting this error that vue() custom method i...
# vue
l
I am getting this error that vue() custom method is not available, I am looking to test emitted events... anyone have an idea what I have missed?
Looks like I can create the custom command myself
r
cy.vue()
isn't a default cypress command, yeah. What are you expecting it to do?
Is it defined somewhere else in your project that you were expecting it to work?
Sorry, just catching up on context here. Are you using
Copy code
Cypress.Commands.add('vue', () => {
  return cy.wrap(Cypress.vueWrapper);
});
like the blog post mentions?
l
I've seen it used already in some tutorials by Jessica Sachs and another documentation/tutorial I have been viewing/reading...didn't quite understand what they meant by custom command until now
r
Ah, yeah. You can add commands to the
cy
object with
Cypress.add()
l
what blog post are you referring to, and yes that's what I want is the vueWrapper... thanks for replying back
r
https://css-tricks.com/testing-vue-components-with-cypress/ was linked just up the channel a little ways.
I assumed that's where you got it. 🙂
l
ah actually I got it from the vuetify repo in their cypress folder, but they alias to
@wrapper
using a cy.get() in their vue command.. so I started investigating that.. LOL..
@best-toothbrush-1100 ☝🏻
2 Views