vuejs / vue-test-utils

Component Test Utils for Vue 2
https://vue-test-utils.vuejs.org
MIT License
3.57k stars 669 forks source link

`isVisible()` is not a function #436

Closed Prior99 closed 6 years ago

Prior99 commented 6 years ago

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().

38elements commented 6 years ago

425 will resolve this.

eddyerburgh commented 6 years ago

This is fixed in beta.12

saintplay commented 6 years ago

There is no type for isVisible

eddyerburgh commented 6 years ago

Are you able to make a PR?

ntraykov commented 6 years ago

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

TheDeveloperTom commented 6 years ago

I still have the problem. The last version.

Where is the "isVisible" method at all?

Look at my wrapper prototype.

image

eddyerburgh commented 6 years ago

@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

TheDeveloperTom commented 6 years ago

@eddyerburgh thank you

gkatsanos commented 6 years ago

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

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