Skip to content

chore: update fillform example to use async check #949

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

VikaCep
Copy link
Contributor

@VikaCep VikaCep commented Sep 30, 2024

The browser squad now recommends using the async check polyfill in all code examples and has updated the fillform example in https://github.com/grafana/xk6-browser/tree/main/examples

In order to be consistent, the fillform example for synthetics browser checks has been updated as well.

@VikaCep VikaCep self-assigned this Sep 30, 2024
@VikaCep VikaCep requested a review from a team as a code owner September 30, 2024 16:42
@VikaCep VikaCep requested review from ckbedwell and w1kman September 30, 2024 16:43
Copy link
Contributor

@w1kman w1kman left a comment

Choose a reason for hiding this comment

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

I don't think lo is a suitable variable name in the context of being an example.

Comment on lines 38 to 39
await check(page.locator('h2'), {
header: async (lo) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would skip abbreviations in example code (with some exceptions).
I assume lo is an abbreviation for "locator" (which resolves into an element-ish).
I suggest that we change lo into element.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! changed it 👍

Copy link
Contributor

@ckbedwell ckbedwell left a comment

Choose a reason for hiding this comment

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

Do we know if the polyfill check registers for our assertions table in the dashboard correctly? I copied this new example and have had it running for an hour.

The zero state for the assertions panel in a browser dashboard scene.

@VikaCep VikaCep requested a review from w1kman October 3, 2024 18:48
@VikaCep
Copy link
Contributor Author

VikaCep commented Oct 3, 2024

Do we know if the polyfill check registers for our assertions table in the dashboard correctly? I copied this new example and have had it running for an hour.

This is odd, I'm seeing the assertions correctly for this script

image

Are they still not showing up?

@VikaCep VikaCep requested a review from ckbedwell October 3, 2024 18:51
Copy link
Contributor

@w1kman w1kman left a comment

Choose a reason for hiding this comment

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

LGTM 🥇

@VikaCep VikaCep merged commit 91b00e5 into main Oct 7, 2024
5 checks passed
@VikaCep VikaCep deleted the update-browser-examples branch October 7, 2024 11:48
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants