feat: add BaseCheckbox tests
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
006c0259e5
commit
5bf738ceef
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<div class="base-checkbox" v-cy="'checkbox'">
|
||||
<input
|
||||
data-cy="base-checkbox"
|
||||
type="checkbox"
|
||||
:id="checkboxId"
|
||||
class="is-sr-only"
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
import { describe, it, expect } from 'vitest'
|
||||
|
||||
import { mount } from '@vue/test-utils'
|
||||
import BaseCheckbox from '../BaseCheckbox.vue'
|
||||
|
||||
describe('BaseCheckbox', () => {
|
||||
it('renders properly', () => {
|
||||
const wrapper = mount(BaseCheckbox, { props: {
|
||||
checked: true,
|
||||
} })
|
||||
cy.get('[data-cy="base-checkbox"]').should('exist')
|
||||
|
||||
// expect(wrapper.text()).toContain('Hello Vitest')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
describe('BaseCheckbox', () => {
|
||||
it('renders the checkbox (invisible)', () => {
|
||||
mount(BaseCheckbox, {
|
||||
checked: true,
|
||||
})
|
||||
cy.get('[data-cy="base-checkbox"]').should('exist')
|
||||
|
||||
})
|
||||
|
||||
// it('contains the correct number of todos', () => {
|
||||
// const todos = [
|
||||
// { text: 'Buy milk', id: 1 },
|
||||
// { text: 'Learn Component Testing', id: 2 },
|
||||
// ]
|
||||
|
||||
// mount(<TodoList todos={todos} />)
|
||||
|
||||
// cy.get('[data-testid=todos]').should('have.length', todos.length)
|
||||
// })
|
||||
})
|
Reference in New Issue