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

Add async check helper #125

Closed
3 of 4 tasks
Tracked by #428
inancgumus opened this issue May 22, 2024 · 1 comment
Closed
3 of 4 tasks
Tracked by #428

Add async check helper #125

inancgumus opened this issue May 22, 2024 · 1 comment
Assignees
Labels

Comments

@inancgumus
Copy link
Member

inancgumus commented May 22, 2024

What

Add a helper that supports asynchronous check functionality.

Example (currently, it does not work):

check(page, {
    'checked': async p => await p.locator('.checked').isChecked(),
});

We use the following code until we add async check support:

const isChecked = await p.locator('.checked').isChecked();
check(page, {
    'checked': p => isChecked,
});

Why

We're converting the browser's sync methods to async. We noticed that check intentionally does not allow async methods in it. This issue isn't great for user experience (also considering the browser's 150ish methods will be async). Can we find a way to make this more user-friendly?

Tasks

@inancgumus
Copy link
Member Author

Updating k6-docs will be tackled in another issue: grafana/k6-docs#1725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants