Skip to content

Update writing-your-first-test.md #2043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ Cypress自动回溯到该命令解析之时的快照. 此外, 因为{% url `cy.c

当一个命令在我们的应用程序里面造成一个立即的视觉变化, 在之前和之后间切换将更新我们的快照. 我们可以通过在命令日志里面点击`TYPE`命令来查看这个动作. 现在, 点击**之前**将向我们展示默认状态下的输入值, 也就是占位符的文本. 点击**之后**将向我们展示完成了`TYPE`命令之后的情况(也就是我们输入在输入框中的值).

## 页面时间
## 页面事件

注意还有一个看起来很有趣的日志: `(PAGE LOAD)`后面紧跟着另一个入口`(NEW URL)`. 这些都不是我们发出的命令 - 相反, Cypress本身将在重要的事件发生的时候在你的应用程序注销(*****感觉这里翻译的有问题*****). 请注意它们会看起来不同(它们是灰色的, 并且没有数字).
注意还有一个看起来很有趣的日志: `(PAGE LOAD)`后面紧跟着另一个入口`(NEW URL)`. 这些都不是我们主动发出的命令 - Cypress会记录下程序关键事件的发生,请注意它们会看起来不同(它们是灰色的, 并且没有数字).

{% imgTag /img/guides/first-test-page-load.png "Command log shows 'Page load --page loaded--' and 'New url https://example.cypress.io/'" %}

Expand Down