You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow configuring a custom query so that screen.get... can be changed.
For that, I would create two new fields in the settings panel: selector object with the default value screen query prefix with the default value get
Examples 🌈
If the user can change the value to for example query prefix = getAll, then the testing-playground shows the query as screen.getAllBy...
If the user can change the value to for example selector object = await page, then the testing-playground shows the query as await page.getBy...
Motivation 🔦
Now with playwright using the testing-library queries, I need to rewrite the screen.getBy... to await page.getBy. I would like to automatize this task so that I need only to copy paste what test-playground gives me.
Also, when I know that I have many components using Jest, I need to rewrite screen.getBy... to screen.getAllBy...
If you like this proposal, I can submit a PR for that
The text was updated successfully, but these errors were encountered:
Summary 💡
Allow configuring a custom query so that
screen.get...
can be changed.For that, I would create two new fields in the settings panel:
selector object
with the default valuescreen
query prefix
with the default valueget
Examples 🌈
If the user can change the value to for example
query prefix = getAll
, then the testing-playground shows the query asscreen.getAllBy...
If the user can change the value to for example
selector object = await page
, then the testing-playground shows the query asawait page.getBy...
Motivation 🔦
Now with playwright using the
testing-library
queries, I need to rewrite thescreen.getBy...
toawait page.getBy
. I would like to automatize this task so that I need only to copy paste whattest-playground
gives me.Also, when I know that I have many components using Jest, I need to rewrite
screen.getBy...
toscreen.getAllBy...
If you like this proposal, I can submit a PR for that
The text was updated successfully, but these errors were encountered: