Skip to content

Commit

Permalink
fix(puppeteer,playwright): wait for finishRun to complete before clos…
Browse files Browse the repository at this point in the history
…ing the page (#496)

Co-authored-by: jpveooys <66470099+jpveooys@users.noreply.github.com>
  • Loading branch information
Zidious and jpveooys committed Apr 4, 2022
1 parent af77177 commit 7dc6a03
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ jobs:
- restore_dependency_cache
# Re-build packages, ensuring packages/webdriverjs/dist exists.
- run: npx lerna run prepare
- run: npx browser-driver-manager@1.0.4 install chrome chromedriver
- run: cd packages/cli && npx browser-driver-manager@1.0.4 install chrome chromedriver --verbose
# lerna link after installing the latest version of chromedriver, as we depend on webdriverJS
- run: cd packages/cli && npx lerna link
- run: npm run coverage --prefix=packages/cli

puppeteer:
Expand All @@ -143,15 +145,15 @@ jobs:
- checkout
- restore_dependency_cache
- run: npm run build --prefix=packages/puppeteer
- run: npx browser-driver-manager@1.0.4 install chrome chromedriver
- run: cd packages/puppeteer && npx browser-driver-manager@1.0.4 install chrome chromedriver --verbose
- run: npm run coverage --prefix=packages/puppeteer

webdriverjs:
<<: *defaults
steps:
- checkout
- restore_dependency_cache
- run: npx browser-driver-manager@1.0.4 install chrome chromedriver
- run: cd packages/webdriverjs && npx browser-driver-manager@1.0.4 install chrome chromedriver --verbose
- run: npm --prefix=packages/webdriverjs run build
- run: npm run coverage --prefix=packages/webdriverjs

Expand All @@ -170,7 +172,7 @@ jobs:
steps:
- checkout
- restore_dependency_cache
- run: npx browser-driver-manager@1.0.4 install chrome chromedriver
- run: cd packages/webdriverio && npx browser-driver-manager@1.0.4 install chrome chromedriver --verbose
- run: npm run coverage --prefix=packages/webdriverio

reporter-earl:
Expand Down
4 changes: 2 additions & 2 deletions packages/playwright/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ export default class AxeBuilder {
partialResults,
options
})
.finally(() => {
blankPage.close();
.finally(async () => {
await blankPage.close();
});
}
}
4 changes: 2 additions & 2 deletions packages/puppeteer/src/axePuppeteer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ export class AxePuppeteer {
partialResults as JSONArray,
axeOptions as JSONObject
)
.finally(() => {
blankPage.close();
.finally(async () => {
await blankPage.close();
});
}

Expand Down

0 comments on commit 7dc6a03

Please sign in to comment.