react-native-testing-library icon indicating copy to clipboard operation
react-native-testing-library copied to clipboard

feat: ...byRole type queries accepts second arg

Open kiranjd opened this issue 3 years ago • 8 comments

Closes #827

  • accepts a 'name' property to refine query

Summary

Test plan

kiranjd avatar Dec 02 '21 14:12 kiranjd

@kiranjd is it something you're still interested in getting in? This is a feature that is clearly lacking for our current API, and I'd love to help you getting that in a mergeable state.

AugustinLF avatar Mar 28 '22 15:03 AugustinLF

@AugustinLF Missed following up on this. I remember I had a few questions. I'll post the questions and follow it up to finish within this week. Thank you 🙏

kiranjd avatar Mar 28 '22 15:03 kiranjd

@kiranjd Do you need any help, is there anything I can do to help you getting that in? :)

AugustinLF avatar Apr 25 '22 09:04 AugustinLF

Let's pause this PR for couple of days till we get a11y query reorganisation from #325 done. This should allow for easy separate query options type per each query, so that the name options will be allowed only for byRole queries and not all a11y queries.

mdjastrzebski avatar May 04 '22 10:05 mdjastrzebski

Yes, those changes caused lot of conflicts

On Wed, 4 May 2022 at 3:58 PM, Maciej Jastrzebski @.***> wrote:

Let's pause this PR for couple of days till we get a11y query reorganisation from #325 https://github.com/callstack/react-native-testing-library/issues/325 done. This should allow for easy separate query options type per each query, so that the name options will be allowed only for byRole queries and not all a11y queries.

— Reply to this email directly, view it on GitHub https://github.com/callstack/react-native-testing-library/pull/875#issuecomment-1117156054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGFANA3PQMXZBXCJ744WUCDVIJGMTANCNFSM5JHKFNKQ . You are receiving this because you were mentioned.Message ID: @.***>

-- Kiran JD

kiranjd avatar May 05 '22 17:05 kiranjd

@mdjastrzebski is this a good time to take this PR further? If so, should I raise a separate PR to continue the work?

kiranjd avatar Jul 25 '22 13:07 kiranjd

@kiranjd I feel like yes we should be able to start working on that once again. I'd however wait for the go from @mdjastrzebski who might have something else planned before that. Nonetheless, feel free to let me know if you need any help on that, I'm very keen in getting this one in.

AugustinLF avatar Jul 28 '22 09:07 AugustinLF

@kiranjd go ahead 👍🏻 Now is the right time to work on this PR, as we've got a11y properly refactored.

mdjastrzebski avatar Aug 01 '22 10:08 mdjastrzebski

@kiranjd is there anything we can do to help you to get that in? It'd bring so much value, I'm really looking to get that one in <3

AugustinLF avatar Aug 25 '22 13:08 AugustinLF

@AugustinLF Thanks for the support. I will work on this and hopefully get this in a mergeable state by this weekend 🤞🏻

kiranjd avatar Aug 25 '22 19:08 kiranjd

@kiranjd if you're short on time to finish this PR I can definitely help fixing the last few things to get it merged, let me know if you want help :)

AugustinLF avatar Sep 14 '22 11:09 AugustinLF

@AugustinLF Have tried to redo the changes from the last state when it was working. There seems to be a lot of refactoring undergone in the meanwhile. I would really appreciate your help in taking this further. Thank you for understanding :)

kiranjd avatar Sep 15 '22 16:09 kiranjd

@kiranjd yeah RNTL codebase did move a lot since the original PR submission :-)

@AugustinLF I would be great if you could help to move this forward, as byRole query with name option has a huge potential to be one of the top recommended queries as in the case of RTL: https://kentcdodds.com/blog/common-mistakes-with-react-testing-library#not-using-byrole-most-of-the-time

mdjastrzebski avatar Sep 16 '22 12:09 mdjastrzebski

This PR has been rebased and updated by @AugustinLF as #1127. Thank you @kiranjd 👏🏻 for the initial implementation!

mdjastrzebski avatar Sep 22 '22 12:09 mdjastrzebski