Suggestion: Make `amOnPage()` wait for JavaScript to finish by default

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

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
php
领域
testing

调研方向

从 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

贡献指南

这个仓库没有索引到贡献指南

从这里开始

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

Codeception/module-webdriver 的其他 Issue

查看 Codeception/module-webdriver 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

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