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

tests(viewer): upgrade pptr to handle new CSSOM use in the report #5191

Merged
merged 2 commits into from
May 12, 2018
Merged
Show file tree
Hide file tree
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: 6 additions & 0 deletions lighthouse-core/report/html/renderer/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ class Logger {
*/
error(msg) {
this.log(msg);

// Rethrow to make sure it's auditable as an error, but in a setTimeout so page
// recovers gracefully and user can try loading a report again.
setTimeout(_ => {
throw new Error(msg);
}, 0);
}

/**
Expand Down
4 changes: 4 additions & 0 deletions lighthouse-viewer/test/viewer-test-pptr.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ describe('Lighthouse Viewer', function() {
});

after(async function() {
// Log any page load errors encountered in case before() failed.
// eslint-disable-next-line no-console
console.error(pageErrors);

await Promise.all([
new Promise(resolve => server.close(resolve)),
browser && browser.close(),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"npm-run-posix-or-windows": "^2.0.2",
"nyc": "^11.6.0",
"postinstall-prepare": "^1.0.1",
"puppeteer": "^1.1.1",
"puppeteer": "1.4.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the version be more flexible?

Copy link
Member Author

Choose a reason for hiding this comment

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

Should the version be more flexible?

I have no strong feelings, but with the yarn.lock file we pretty much have to manually rev anyways, so not sure if it matters

"sinon": "^2.3.5",
"typescript": "2.9.0-dev.20180323",
"vscode-chrome-debug-core": "^3.23.8",
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3481,9 +3481,9 @@ mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7:
dependencies:
mime-db "~1.24.0"

mime@^1.3.4:
version "1.6.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
mime@^2.0.3:
version "2.3.1"
resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369"

mimic-fn@^1.0.0:
version "1.1.0"
Expand Down Expand Up @@ -4043,14 +4043,14 @@ punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"

puppeteer@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.1.1.tgz#adbf25e49f5ef03443c10ab8e09a954ca0c7bfee"
puppeteer@1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.4.0.tgz#437f0f3450d76e437185c0bf06f446e80f184692"
dependencies:
debug "^2.6.8"
debug "^3.1.0"
extract-zip "^1.6.5"
https-proxy-agent "^2.1.0"
mime "^1.3.4"
mime "^2.0.3"
progress "^2.0.0"
proxy-from-env "^1.0.0"
rimraf "^2.6.1"
Expand Down