Dom-testing-library: findAllBy ignore same tag name

Created on 28 Jun 2020  路  3Comments  路  Source: testing-library/dom-testing-library

In this test case findAllBy* ignore same tag and failed test

const page = render(<div><p class="a">this is test</p><p class="b">this is test</p><div />)
expect(
      await page.findAllByText("this is test")
).toHaveLength(2);

Most helpful comment

Adding to this comment, it would help if you could fork the sandbox and link to your fork with the issue reproduced.

All 3 comments

Hi @eliyaomid thanks for opening this issue 馃槃

I have created a sandbox but I have no issue.
Can you please add more details ?
Which version of testing-library are you using?

Adding to this comment, it would help if you could fork the sandbox and link to your fork with the issue reproduced.

I think that we can close this for now. @eliyaomid if you need further help you can add a comment here 馃槃

Was this page helpful?
0 / 5 - 0 ratings