Skip to content

Commit

Permalink
fix(πŸ“Œ): Unpin puppeteer (#572)
Browse files Browse the repository at this point in the history
* fix(πŸ“Œ): Unpin puppeteer

* build(πŸ”–): v0.28.3

* test(βœ…): Update deprecated waitFor in tests

* types(πŸ™ˆ): Ignore missing types
  • Loading branch information
Wil Wilsman authored Oct 7, 2020
1 parent 9b2ed8e commit d3b8c43
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@percy/agent",
"description": "An agent process for integrating with Percy.",
"version": "0.28.2",
"version": "0.28.3",
"author": "Perceptual Inc",
"bin": {
"percy": "./bin/run"
Expand Down Expand Up @@ -36,7 +36,7 @@
"image-size": "^0.8.2",
"js-yaml": "^3.13.1",
"percy-client": "^3.2.0",
"puppeteer": "5.0.0",
"puppeteer": "^5.3.1",
"retry-axios": "^1.0.1",
"which": "^2.0.1",
"winston": "^3.0.0"
Expand Down
12 changes: 7 additions & 5 deletions test/integration/agent-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('Integration test', () => {

it('snapshots a site with redirected assets', async () => {
await page.goto('https://sdk-test.percy.dev/redirects/')
await page.waitFor('h2')
await page.waitForSelector('h2')
const domSnapshot = await snapshot(page, 'Redirects snapshot')

// This will fail the test if the redirected JS fails to work
Expand Down Expand Up @@ -237,10 +237,11 @@ describe('Integration test', () => {
describe('canvas', () => {
it('captures canvas elements', async () => {
await page.goto(`http://localhost:${PORT}/serialize-canvas.html`)
await page.waitFor('#webgl canvas')
await page.waitForSelector('#webgl canvas')
// I cannot think of a nicer way to let the canvas animations/drawing settle
// so sadly, use a timeout
await page.waitFor(1000)
// @ts-ignore - this type doesn't exist, but the method does
await page.waitForTimeout(1000)
const domSnapshot = await snapshot(page, 'Canvas elements')
const $ = cheerio.load(domSnapshot)

Expand All @@ -249,8 +250,9 @@ describe('Integration test', () => {

it("doesn't serialize with JS enabled", async () => {
await page.goto(`http://localhost:${PORT}/serialize-canvas.html`)
await page.waitFor('#webgl canvas')
await page.waitFor(1000)
await page.waitForSelector('#webgl canvas')
// @ts-ignore - this type doesn't exist, but the method does
await page.waitForTimeout(1000)
const domSnapshot = await snapshot(page, 'Canvas elements -- with JS', { enableJavaScript: true })
const $ = cheerio.load(domSnapshot)

Expand Down
23 changes: 11 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3368,6 +3368,11 @@ detective@^5.0.2:
defined "^1.0.0"
minimist "^1.1.1"

devtools-protocol@0.0.799653:
version "0.0.799653"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.799653.tgz#86fc95ce5bf4fdf4b77a58047ba9d2301078f119"
integrity sha512-t1CcaZbvm8pOlikqrsIM9GOa7Ipp07+4h/q9u0JXBWjPCjHdBl9KkddX87Vv9vBHoBGtwV79sYQNGnQM6iS5gg==

di@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c"
Expand Down Expand Up @@ -6229,7 +6234,7 @@ mime@1.6.0, mime@^1.2.9, mime@^1.4.1:
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==

mime@^2.0.3, mime@^2.3.1, mime@^2.4.2:
mime@^2.3.1, mime@^2.4.2:
version "2.4.4"
resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5"
integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==
Expand Down Expand Up @@ -6305,11 +6310,6 @@ mississippi@^3.0.0:
stream-each "^1.1.0"
through2 "^2.0.0"

mitt@^2.0.1:
version "2.1.0"
resolved "https://registry.yarnpkg.com/mitt/-/mitt-2.1.0.tgz#f740577c23176c6205b121b2973514eade1b2230"
integrity sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg==

mixin-deep@^1.2.0:
version "1.3.2"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
Expand Down Expand Up @@ -7347,16 +7347,15 @@ punycode@^2.1.0, punycode@^2.1.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==

puppeteer@5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.0.0.tgz#7cf1b1a5c5b6ce5d7abe4d9c9f206d4c52e214ff"
integrity sha512-JnZcgRQnfowRSJoSHteKU7G9fP/YYGB/juPn8m4jNqtzvR0h8GOoFmdjTBesJFfzhYkPU1FosHXnBVUB++xgaA==
puppeteer@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.3.1.tgz#324e190d89f25ac33dba539f57b82a18553f8646"
integrity sha512-YTM1RaBeYrj6n7IlRXRYLqJHF+GM7tasbvrNFx6w1S16G76NrPq7oYFKLDO+BQsXNtS8kW2GxWCXjIMPvfDyaQ==
dependencies:
debug "^4.1.0"
devtools-protocol "0.0.799653"
extract-zip "^2.0.0"
https-proxy-agent "^4.0.0"
mime "^2.0.3"
mitt "^2.0.1"
pkg-dir "^4.2.0"
progress "^2.0.1"
proxy-from-env "^1.0.0"
Expand Down

0 comments on commit d3b8c43

Please sign in to comment.