Skip to content

Details summary content not visible when open is set to false #2034

Open
@mrozbarry

Description

@mrozbarry

Subject of the issue

<summary> tag should be considered visible in a <details> tag, even when open is false.

Steps to reproduce

Given:

<template>
  <details>
    <summary>Test</summary>
  </details>
</template>

wrapper.find('details summary').isVisible() will return false, even though the spec for details says that summary should always be visible. Content other than <summary> should toggle visibility, following the open property.

Expected behaviour

isVisible should return true for the contents of the summary tag

Actual behaviour

isVisible returns false.

Possible Solution

If I query the <summary> tag or anything in it, it should report as visible. For now, I can just use the exists() method, but asserting against this doesn't convey the same intention as isVisible().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions