You’re browsing the documentation for Vue Test Utils for Vue v2.x and earlier.
To read docs for Vue Test Utils for Vue 3, click here.
O método isVisible
Afirma que todo Wrapper (envolvedor) dentro do WrapperArray está visível.
Retorna false se pelo menos elemento ancestral tiver o estilo display: none, visibility: hidden, opacity: 0, estiver localizado dentro tag <details> colapsada ou tiver o atributo hidden.
Isto pode ser usado para afirmar que o componente está oculto pelo v-show.
Retorna:
{boolean}Exemplo:
import { mount } from '@vue/test-utils'
import Foo from './Foo.vue'
const wrapper = mount(Foo)
expect(wrapper.isVisible()).toBe(true)
expect(wrapper.findAll('.is-not-visible').isVisible()).toBe(false)
expect(wrapper.findAll('.is-visible').isVisible()).toBe(true)