Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

isVisible doesn't check visibility due to CSS classes #1456

Copy link
Copy link
Closed
@bbones

Description

@bbones
Issue body actions

What problem does this feature solve?

Making test for components like this

<template>
    <div>
        <h1>Header</h1>
        <button class="hidden">Test</button>
    </div>
</template>

<script>
  export default {
    name: "Foo"
  }
</script>

<style scoped>
    .hidden {
        display: none;
    }
</style>
describe('Foo.vue', () => {
  test('Button', () => {
    const wrapper = shallowMount(Foo, {});
    console.log(wrapper.isVisible());
    const but = wrapper.find('button');
    console.log(window.getComputedStyle(but.element).display);
    console.log(but.isVisible());
  });
});

What does the proposed API look like?

Call of isVisible will be the same as before

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.