Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Log from .logTestingPlaygroundURL is to big and not working

未关闭
#974 18 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

@kito-arch 已经在做这个了。

开始于 2025年1月25日。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript, react
领域
testing

调研方向

首先,在大型 React 组件上使用 screen.logTestingPlaygroundURL() 重现该问题,并比较重复测试运行中生成的 URL 大小。调查 playground 有时仍为空的原因,并在大型组件的输出能够持续生成可用的 playground URL 时,视为该问题已完成。

由索引模型根据 Issue 内容生成。

描述

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!

主要语言
JavaScript
星标
19.7k
派生
1.2k
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

testing-library/react-testing-library 的其他 Issue

查看 testing-library/react-testing-library 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。