Skip to content

breaking change in 6.8.1 #396

@benmonro

Description

@benmonro
  • DOM Testing Library version: 6.8.1
  • node version: 10.x
  • npm (or yarn) version: 6.x

Relevant code or config:

const allFavoritesTab = within(favoritesTabContainer).getAllByRole('tabpanel')

What you did:

After updating RTL from 9.1.1 to 9.3.0 (which updated DTL from 6.0.0 to 6.8.1) we started having tests that break. I believe the failure could potentially be related to this PR: https://github.com/testing-library/dom-testing-library/pull/381/files

What happened:

our component is rendering 2 tab panels, 1 visible, 1 hidden, and our test is verifying that as you click on tabs, the tab panels are shown hidden etc. If this is an intended behavior for RTL/DTL, I totally get it, but it should be a breaking change, and thus a new major rev, not part of 8.x which works for us previously.

Reproduction:

can't provide internal code, but if you have 2 tab panels 1 hidden 1 shown and test that getAllByRole('tabpanel') using the 2 versions mentioned above you should see it.

Problem description:

Suggested solution:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions