Skip to content
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

Codegen guide #1224

Merged
merged 6 commits into from
Feb 21, 2025
Merged

Codegen guide #1224

merged 6 commits into from
Feb 21, 2025

Conversation

serverless-mom
Copy link
Contributor

Affected Components

  • Content & Marketing
  • Pricing
  • Test
  • Docs
  • Learn
  • Other

Copy link

vercel bot commented Feb 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
checklyhq-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 7:07pm


### Step 5: Add Assertions to your tests

Every action in the script above has implicit assertions about the elements we interact with. Playwright will expect these elements are stable, visible, and enabled and if one isn’t then the test will will fail we could call this done, but we generally want our tests to contain assertions beyond just navigating. There are a few reasons why you should have assertions in your test: It makes it clearer to future coders what your test was checking for, and the error message is more useful from a failed assertion rather than just failing to find an element. Right now all we’ll get if the test above fails is a timeout and a line which failed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes it clearer to future coders what your test was checking for, and the error message is more useful from a failed assertion rather than just failing to find an element. Right now all we’ll get if the test above fails is a timeout and a line which failed.

A comparison screenshot showing the failed actionability check and a failed assertion would be great to hit this point home.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

working on this, I'm struggling a bit to make a nice readable screenshot, so will push v1 without it but it will be something I'll add next week.

@serverless-mom serverless-mom marked this pull request as ready for review February 21, 2025 18:59
@serverless-mom serverless-mom merged commit b8133fe into main Feb 21, 2025
6 checks passed
@serverless-mom serverless-mom deleted the codegenGuide branch February 21, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants