testing-library / testing-library/react-testing-library

Log from .logTestingPlaygroundURL is to big and not working

Open
#974 18 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
19.7k
Forks
1.2k
Avg merge
3d 16h
Merged PRs (30d)
1

Description

Hello everybody.

When using
screen.logTestingPlaygroundURL()

Sometimes the generated URL is to big and when you paste it in the browser. the playground just stays empty, I found it to be random aswell, sometimes the same component generates a really big URL, and other times a smaller one, wich works, but it's kinda luck related on that one, sometimes i have to re-run my test for 5 to 10 times to get a URL that works.

I use this feature for making easier to find elements on the screen that will be used on my test, and the best queries to get to them, since the playground is great for that.

My component for the related test that this issue occurs is quite big, maybe thats the problem?
Any idea on how to make it work on bigger components, or should i try a diferent aproach?

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with screen.logTestingPlaygroundURL() on a large React component, comparing generated URL sizes across repeated test runs. Investigate why the playground sometimes remains empty, and consider the issue complete when large-component output consistently produces a usable playground URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.