Then it says 'h is not defined'
# vue
b
Then it says 'h is not defined'
b
Print here the code of your component
b
Sorry for my late response. I have tried a few things and now its says: "React is not defined"
Here is my component: >
Copy code
<script setup>
> import { useAuthStore } from '@/store'
> </script>
> 
> <template>
>   <el-form>
>     <el-form-item label="Username">
>       <el-input />
>     </el-form-item>
>     <el-form-item label="Password">
>       <el-input placeholder="Please input password" show-password />
>     </el-form-item>
>     <el-form-item>
>       <el-button type="primary" @click="">Login</el-button>
>     </el-form-item>
>   </el-form>
> </template>
import { mount } from '@cypress/vue' import Login from './Login.vue' describe('', () => { it('renders', () => { cy.viewport(1280, 720) mount() }) })
and thats the test
this is working:
Copy code
import { mount } from '@cypress/vue'
import Login from './Login.vue'

describe('<Login />', () => {
  it('renders', () => {
    cy.viewport(1280, 720)
    mount(Login)
  })
})
b
Do you use vite ? Is your file with extension
.jsx
?
b
I think the problem is vue 2 with composition API. In my vue 3 projects is it working fine.
6 Views