Top Tweets for #reactnativetestinglibrary
๐ฆ Using @jotaijs state management and want to test it with #ReactNativeTestingLibrary? Weโve got you covered!
@vanGalilea has written a Cookbook recipe just for this case ๐
Check it out and make your testing smoother!
https://t.co/2yFGsTJezv
๐ฆ I've just published the 2nd recipe for the #ReactNativeTestingLibrary Cookbook ๐
๐ก It explain when, why and how to use async tests when using RNTL
https://t.co/j7p2QDF3uG

The 1๏ธโฃst #ReactNativeTestingLibrary Cookbook recipe is here: custom render functions. ๐โจ
Join the effort and share your favourite recipes through our GH repo. ๐๐ฉโ๐ป๐จโ๐ป
๐ Read more: https://t.co/57Cs1ibmz9
๐ Announcing the #ReactNativeTestingLibrary Cookbook initiative! ๐โจ
We're compiling best practices, tips & tricks, and ready-to-use recipes for the RNTL community. ๐ฒ๐ฉโ๐ป๐จโ๐ง
Got a recipe to share? Contribute and help us create something amazing! ๐
๐ More details: https://t.co/EYO4TcA3Ii
โ๏ธ๐ฆ When using #ReactNativeTestingLibrary, I use this query as a default:
getByRole("role", { name: "name" })
Here's why:
๐น get - I want exactly one matching element
๐น byRole + name - I want to get an element matching both a role (e.g., "button") and a name (e.g., "Next")

โ๏ธ๐ฆ #ReactNativeTestingLibrary with ver. 12.4.0 has achieved its main dev goals:
๐น Introduction of User Event API
๐น Migration of Jest matchers to RNTL
๐ We do not plan more large features in v12.
๐ Our next focus will be improving the documentation and examples.
โ๏ธ๐ฆ #ReactNativeTestingLibrary tip.
If your query cannot find an element:
1๏ธโฃ Use screen.debug() to inspect the element tree
2๏ธโฃ Use `includeHiddenElements: true` query option to detect hidden elements.
https://t.co/PM2N2ZL3Kn
โ๏ธ๐ฆ In #ReactNativeTestingLibrary each query consists of two key components:
๐น Variant: `get`, `query`, ...
๐น Predicate: `*ByRole`, `*ByText`, ...
๐กPredicate describes the specific criteria used to find matching elements.
๐ Quick summary of available predicates:

โ๏ธ๐ฆ Using proper #ReactNativeTestingLibrary query variants helps to better express the test's intent.
๐ก Query variants also serve as implicit assertions on number of matched elements.
๐ General guidelines for idiomatic query variants:


โ๏ธ #ReactNativeTestingLibrary v12.3.1 is out!
Highlights:
๐ UserEvent scrollBy API for better simulation of ScrollView interaction
๐ฆ Improved fake timer handling for UserEvent press and other interactions
https://t.co/VFKqBy1nGe
BTW We've released #ReactNativeTestingLibrary v12.3.0 yesterday, just in time for #ReactNativeEU โค๏ธ๐ซถ
It provides support ARIA web accessibility props (role & aria-*) ๐
https://t.co/2s7i81xFkz

๐ก #ReactNativeTestingLibrary #TipOfTheDay
Most of RNTL queries accept TextMatch = string | RegExp as first argument.
RegExp is the flexible option while string matcher uses case-sensitive full string equality by default. You can enable case-insensitive substring matching using the { exact: false } option.
This is relevant for most of the RNTL queries:
- getByRole
- getByText
- getByLabelText
- getByHintText
- getByPlaceholderText
- getByDisplayValue
- getByTestId

Despite summer heat โ๏ธ๐ฅ #ReactNativeTestingLibrary is more active than ever ๐
I've just landed a new API proposal for Jest Native matches migration to RNTL repo. Join the discussion and learn about issue we plan to solve ๐ฌ๐
https://t.co/lLgpVHJ3tJ
๐ช Ever wanted to contribute to an Open Source project?
I've created some relatively easy tasks for #ReactNativeTestingLibrary Jest Native matchers migration that could get you on track with that:
https://t.co/KoIjP2a1Fj
I've create a #ReactNativeTestingLibrary API proposal for User Event scroll interaction.
๐ฌ Join the discussion to help us decide on the best API ๐
https://t.co/eqV9aLwFDy
๐ก๐ป Just released #ReactNativeTestingLibrary v12.2.1!
It fixes a small omission from the initial User Event API:
โณ๏ธ clear() function for clearing the content of a TextInput
๐ก UserEvent type() function appends text to given TextInput, so you need to call clear() to actually replace it.

๐ก #ReactNativeTestingLibrary #TipOfTheDay:
In order for *ByRole queries to work, the matched element needs to be an accessibility element.
When element is accessibility element?
1. Text, TextInput and Switch are these by default
2. Host View needs to have accessible prop set
3. Some RN components like Pressable & TouchableOpacity automatically render host View with accessible prop
This matches RN + iOS/Android runtime behavior, where Views without accessible prop are ignored by screen reader.
๐

๐๐ User Event VC pitch ๐
- Question for you: what's a better than Fire Event API sending only one event?
- Answer for you: User Event API sending a sequence of 20 events for one user action.
#ReactNativeTestingLibrary #SiliconValley

โQ: Why should you use the new #UserEvent API in #ReactNativeTestingLibrary?
๐คฏ A: Fire Event vs User Event invoked events

Last Seen Hashtags on Sotwe
Most Popular Users

Elon Musk 
@elonmusk
240.5M followers

Barack Obama 
@barackobama
118.7M followers

Cristiano Ronaldo 
@cristiano
114.4M followers

Donald J. Trump 
@realdonaldtrump
111.8M followers

Narendra Modi 
@narendramodi
107M followers

Rihanna 
@rihanna
98.7M followers

NASA 
@nasa
92.2M followers

Justin Bieber 
@justinbieber
91.8M followers

KATY PERRY 
@katyperry
90M followers

Taylor Swift 
@taylorswift13
84M followers

Lady Gaga 
@ladygaga
75.5M followers

Virat Kohli 
@imvkohli
73.4M followers

Kim Kardashian 
@kimkardashian
70.8M followers

YouTube 
@youtube
68.7M followers

Neymar Jr 
@neymarjr
66.4M followers

Bill Gates 
@billgates
65.2M followers

Selena Gomez 
@selenagomez
63M followers

The Ellen Show
@theellenshow
62.1M followers

CNN 
@cnn
61.7M followers

X 
@x
60.6M followers
