Skip to content

Commit d3b8c43

Browse files
author
Wil Wilsman
authored
fix(πŸ“Œ): Unpin puppeteer (#572)
* fix(πŸ“Œ): Unpin puppeteer * build(πŸ”–): v0.28.3 * test(βœ…): Update deprecated waitFor in tests * types(πŸ™ˆ): Ignore missing types
1 parent 9b2ed8e commit d3b8c43

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

β€Žpackage.jsonβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@percy/agent",
33
"description": "An agent process for integrating with Percy.",
4-
"version": "0.28.2",
4+
"version": "0.28.3",
55
"author": "Perceptual Inc",
66
"bin": {
77
"percy": "./bin/run"
@@ -36,7 +36,7 @@
3636
"image-size": "^0.8.2",
3737
"js-yaml": "^3.13.1",
3838
"percy-client": "^3.2.0",
39-
"puppeteer": "5.0.0",
39+
"puppeteer": "^5.3.1",
4040
"retry-axios": "^1.0.1",
4141
"which": "^2.0.1",
4242
"winston": "^3.0.0"

β€Žtest/integration/agent-integration.test.tsβ€Ž

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('Integration test', () => {
8686

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

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

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

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

β€Žyarn.lockβ€Ž

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3368,6 +3368,11 @@ detective@^5.0.2:
33683368
defined "^1.0.0"
33693369
minimist "^1.1.1"
33703370

3371+
devtools-protocol@0.0.799653:
3372+
version "0.0.799653"
3373+
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.799653.tgz#86fc95ce5bf4fdf4b77a58047ba9d2301078f119"
3374+
integrity sha512-t1CcaZbvm8pOlikqrsIM9GOa7Ipp07+4h/q9u0JXBWjPCjHdBl9KkddX87Vv9vBHoBGtwV79sYQNGnQM6iS5gg==
3375+
33713376
di@^0.0.1:
33723377
version "0.0.1"
33733378
resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c"
@@ -6229,7 +6234,7 @@ mime@1.6.0, mime@^1.2.9, mime@^1.4.1:
62296234
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
62306235
integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
62316236

6232-
mime@^2.0.3, mime@^2.3.1, mime@^2.4.2:
6237+
mime@^2.3.1, mime@^2.4.2:
62336238
version "2.4.4"
62346239
resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5"
62356240
integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==
@@ -6305,11 +6310,6 @@ mississippi@^3.0.0:
63056310
stream-each "^1.1.0"
63066311
through2 "^2.0.0"
63076312

6308-
mitt@^2.0.1:
6309-
version "2.1.0"
6310-
resolved "https://registry.yarnpkg.com/mitt/-/mitt-2.1.0.tgz#f740577c23176c6205b121b2973514eade1b2230"
6311-
integrity sha512-ILj2TpLiysu2wkBbWjAmww7TkZb65aiQO+DkVdUTBpBXq+MHYiETENkKFMtsJZX1Lf4pe4QOrTSjIfUwN5lRdg==
6312-
63136313
mixin-deep@^1.2.0:
63146314
version "1.3.2"
63156315
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
@@ -7347,16 +7347,15 @@ punycode@^2.1.0, punycode@^2.1.1:
73477347
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
73487348
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
73497349

7350-
puppeteer@5.0.0:
7351-
version "5.0.0"
7352-
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.0.0.tgz#7cf1b1a5c5b6ce5d7abe4d9c9f206d4c52e214ff"
7353-
integrity sha512-JnZcgRQnfowRSJoSHteKU7G9fP/YYGB/juPn8m4jNqtzvR0h8GOoFmdjTBesJFfzhYkPU1FosHXnBVUB++xgaA==
7350+
puppeteer@^5.3.1:
7351+
version "5.3.1"
7352+
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.3.1.tgz#324e190d89f25ac33dba539f57b82a18553f8646"
7353+
integrity sha512-YTM1RaBeYrj6n7IlRXRYLqJHF+GM7tasbvrNFx6w1S16G76NrPq7oYFKLDO+BQsXNtS8kW2GxWCXjIMPvfDyaQ==
73547354
dependencies:
73557355
debug "^4.1.0"
7356+
devtools-protocol "0.0.799653"
73567357
extract-zip "^2.0.0"
73577358
https-proxy-agent "^4.0.0"
7358-
mime "^2.0.3"
7359-
mitt "^2.0.1"
73607359
pkg-dir "^4.2.0"
73617360
progress "^2.0.1"
73627361
proxy-from-env "^1.0.0"

0 commit comments

Comments
Β (0)