Vue-test-utils: `isVisible()` is not a function

Created on 20 Feb 2018  路  9Comments  路  Source: vuejs/vue-test-utils

Version

1.0.0-beta.11

Reproduction link

https://codesandbox.io/s/mo2r2y6j09

Steps to reproduce

Use the function isVisible() according to the documentation.

What is expected?

The test utilities check whether an element in the wrapper is visible.

What is actually happening?

A TypeError occurs:

TypeError: el.find(...).visible is not a function

This is related to #327, the method indeed exists but is called visible() and not isVisible().

Most helpful comment

@TheDeveloperTom Are you using @vue/test-utils?

The old vue-test-utils package is deprecated, and the latest version there is 11, which doesn't include isVisible

All 9 comments

425 will resolve this.

This is fixed in beta.12

There is no type for isVisible

Are you able to make a PR?

Hey, guys! What is the status of this issue? Is it released? I have the same issue

I still have the problem. The last version.

Where is the "isVisible" method at all?

Look at my wrapper prototype.

image

@TheDeveloperTom Are you using @vue/test-utils?

The old vue-test-utils package is deprecated, and the latest version there is 11, which doesn't include isVisible

@eddyerburgh thank you

expect(wrapper.find('.panel').isVisible()).to.be(false);// isVisible

Object is not a constructor (evaluating 'expect(wrapper.find('.panel').isVisible()).to.be(false)')

Was this page helpful?
0 / 5 - 0 ratings