From 7d1b1520de79011bb3390351a9543a3df78b8944 Mon Sep 17 00:00:00 2001 From: soulgalore Date: Mon, 7 Jan 2019 21:08:31 +0100 Subject: [PATCH] use latest alpha of Browsertime --- package-lock.json | 6 +++--- package.json | 2 +- test/prepostscripts/multi.js | 10 ++++++---- test/prepostscripts/preSample.js | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index ad39af820..ff16f7c56 100644 --- a/package-lock.json +++ b/package-lock.json @@ -678,9 +678,9 @@ "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=" }, "browsertime": { - "version": "4.0.0-alpha.10", - "resolved": "https://registry.npmjs.org/browsertime/-/browsertime-4.0.0-alpha.10.tgz", - "integrity": "sha512-aX7jPHcu4Z5w6RAyw+r2SaJxOqmgXQvTZZL1+U455dyMYl5ADlxp8bgcF9meaTlKnKHm383PtFLxyubKdtaIIg==", + "version": "4.0.0-alpha.13", + "resolved": "https://registry.npmjs.org/browsertime/-/browsertime-4.0.0-alpha.13.tgz", + "integrity": "sha512-8yVZVUq8bkTYpc8/lL109acm8/v2YmNSLgngX17m+Gi5Bj6isF7XH3I+FBcgxfdb12yACYD7RQLYcLxJpZfXEA==", "requires": { "@cypress/xvfb": "1.2.4", "@sitespeed.io/chromedriver": "2.44.1", diff --git a/package.json b/package.json index 971f1e701..accd9eba9 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "main": "./lib/sitespeed.js", "dependencies": { "aws-sdk": "2.361.0", - "browsertime": "4.0.0-alpha.10", + "browsertime": "4.0.0-alpha.13", "cli-color": "1.4.0", "concurrent-queue": "7.0.2", "dayjs-ext": "2.2.0", diff --git a/test/prepostscripts/multi.js b/test/prepostscripts/multi.js index 3b3d0c6a0..6462184a4 100644 --- a/test/prepostscripts/multi.js +++ b/test/prepostscripts/multi.js @@ -1,5 +1,7 @@ -module.exports = async function(context) { - await context.h.measure('https://www.sitespeed.io'); - await context.h.measure('https://www.sitespeed.io/examples/'); - return context.h.measure('https://www.sitespeed.io/documentation/'); +module.exports = async function(context, commands) { + await commands.measure.startAndNavigate('https://www.sitespeed.io'); + await commands.measure.startAndNavigate('https://www.sitespeed.io/examples/'); + return commands.measure.startAndNavigate( + 'https://www.sitespeed.io/documentation/' + ); }; diff --git a/test/prepostscripts/preSample.js b/test/prepostscripts/preSample.js index 08c9f0ab6..25e5bed3a 100644 --- a/test/prepostscripts/preSample.js +++ b/test/prepostscripts/preSample.js @@ -1,5 +1,5 @@ -module.exports = async function(context) { +module.exports = async function(context, commands) { context.log.info('In pretask!!!'); - await context.h.navigate('https://www.sitespeed.io/'); + await commands.navigate('https://www.sitespeed.io/'); context.taskData.loadedSitespeed = true; };