Suggestion: Make `amOnPage()` wait for JavaScript to finish by default
还没有人认领这个 Issue。
评估
调研方向
从 amOnPage() 入口点开始,将其当前的导航行为与 issue 中的 waitForJS() 示例进行比较。在更改默认行为之前,解决所提议的向后兼容性破坏,并定义可选参数应如何工作;当约定的行为已实现,并且已验证导航在等待和不等待两种情况下均正常时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Starting point: Everybody always wants JavaScript to finish, before performing any action/assertion on the page, right?
At least my usual pattern is:
$I->amOnPage('/');
$I->waitForJS('return document.readyState === "complete";', 5); // https://gist.github.com/pastuhov/43674b195dc293ffd847
So I thought about ways to simplify this. My first idea was to introduce a new method, something like waitForJSToComplete().
But now, I think it's even better to include this in amOnPage(), by introducing a second parameter:
public function amOnPage($page, bool $waitTillJSIsComplete = true): void
This would be a BC break.
- 主要语言
- PHP
- 星标
- 39
- 派生
- 25
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Codeception/module-webdriver 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
Codeception/module-webdriver#135 ·
-
难度 2/5 1-3 小时 新手友好度 38/100
Codeception/module-webdriver#130 ·
-
难度 3/5 1-2 天 新手友好度 35/100
Codeception/module-webdriver#128 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
Codeception/module-webdriver#126 ·
-
难度 3/5 1-2 天 新手友好度 35/100
Codeception/module-webdriver#122 ·
查看 Codeception/module-webdriver 的全部 Issue
相似的 Issue
-
priority: p3
难度 2/5 1-3 小时 新手友好度 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
难度 2/5 1-3 小时 新手友好度 78/100
nextcloud/fulltextsearch#1011 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 78/100
phpstan/phpstan-doctrine#794 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
Automattic/static-site-importer#1767 ·