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
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 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
-
難度 2/5 1-3 小時 新手友好度 84/100
PrestaShopCorp/ps_accounts#666 ·
-
難度 1/5 1 小時以內 新手友好度 92/100
維護者通常 6 天內回覆
-
Security SecurityBundle
難度 2/5 1-3 小時 新手友好度 68/100
symfony/symfony-docs#23173 ·
維護者通常 3 天內回覆
-
incomplete
難度 2/5 1-3 小時 新手友好度 75/100
opnsense/plugins#5763 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
fossology/fossology#3893 · 1 則留言 ·
維護者通常 2 天內回覆