In Chrome a resize event is always fired just before the screenshot
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript, playwright
- 领域
- testing-qa
调研方向
首先,在 macOS 上的 Chrome 中使用 debugWindow 和 resize handler,通过 BackstopJS v6.3.25 与 Playwright v1.52.0 重现报告的案例,然后在 Firefox 中比较相同的运行结果。完成的标准是:截图不再触发由 resize 驱动的不必要状态变化,同时不向应用程序添加仅用于测试的检查。
由索引模型根据 Issue 内容生成。
描述
...Which is a problem if there is a state on the screen that reacts to that event, e.g. a menu is open which is supposed to be on the screenshot, but it is not.
No amount of delays can help with that, because the resize event is triggered as the last thing before the image is taken.
I have looked at it with debugWindow: true numerous times, but there are no visible size change, still with window.addEventListener('resize', myHandler); myHandler always fires.
It is not critical, I've worked around it by disabling the menu closing behaviour for test runs, but it caused me substantial headache to figure out what was going on, also it is a smell to put extra checks into the main code to accommodate tests, so it'd be preferable to not have it there.
I am also running the same tests using Firefox, that does not have this issue.
Info:
backstopjs v6.3.25 + playwright v1.52.0 running natively in MacOS on Apple Silicon
- 主要语言
- JavaScript
- 星标
- 7.2k
- 派生
- 617
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
garris/BackstopJS 的其他 Issue
-
Upgrade Node Image in Docker File to LTS version可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 1/5 1 小时以内 新手友好度 62/100
garris/BackstopJS#1512 ·
-
难度 1/5 1 小时以内 新手友好度 68/100
garris/BackstopJS#576 · 6 条评论 ·
-
Security issue with "extract-zip" and outdated "puppeteer" version可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 55/100
garris/BackstopJS#1625 · 10 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 45/100
garris/BackstopJS#1619 ·
-
难度 2/5 1-3 小时 新手友好度 35/100
garris/BackstopJS#1617 · 2 条评论 ·
查看 garris/BackstopJS 的全部 Issue
相似的 Issue
-
area:ui
难度 2/5 1-3 小时 新手友好度 78/100
openfootmanager/openfootmanager#1365 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 86/100
NuSkooler/enigma-bbs#988 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
-
Thêm tệp .env未关闭
难度 1/5 1 小时以内 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 67/100
mikemccand/luceneutil#644 ·
维护者通常 4 天内回复