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

fix(playwright): Add missing await on page.evaluate #1063

Merged
merged 2 commits into from
May 15, 2024
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
6 changes: 3 additions & 3 deletions packages/playwright/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default class AxeBuilder {
const context = normalizeContext(this.includes, this.excludes);
const { page } = this;

page.evaluate(this.script());
await page.evaluate(this.script());
const runPartialDefined = await page.evaluate<boolean>(
'typeof window.axe.runPartial === "function"'
);
Expand Down Expand Up @@ -295,8 +295,8 @@ export default class AxeBuilder {
'Please make sure that you have popup blockers disabled.'
);

blankPage.evaluate(this.script());
blankPage.evaluate(await this.axeConfigure());
await blankPage.evaluate(this.script());
await blankPage.evaluate(await this.axeConfigure());

// evaluate has a size limit on the number of characters so we'll need
// to split partialResults into chunks if it exceeds that limit.
Expand Down
Loading