browsertime 16.11.3 → 16.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/lib/support/preURL.js +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Browsertime changelog (we do [semantic versioning](https://semver.org))
|
|
2
2
|
|
|
3
|
+
## 16.11.4 - 2022-07-17
|
|
4
|
+
### Fixed
|
|
5
|
+
* Automatically add white nbackground between --preURL and the URL that you wanna test. This makes visual metrics usable when using preURL. [#1819](https://github.com/sitespeedio/browsertime/pull/1819)
|
|
6
|
+
|
|
3
7
|
## 16.11.3 - 2022-07-14
|
|
4
8
|
|
|
5
9
|
### Fixed
|
package/lib/support/preURL.js
CHANGED
|
@@ -6,5 +6,12 @@ const delay = ms => new Promise(res => setTimeout(res, ms));
|
|
|
6
6
|
module.exports = async function (browser, options) {
|
|
7
7
|
log.info('Accessing preURL %s', options.preURL);
|
|
8
8
|
await browser.loadAndWait(options.preURL);
|
|
9
|
-
|
|
9
|
+
if (!options.preURLDisableWhiteBackground) {
|
|
10
|
+
await browser.runScript(
|
|
11
|
+
'document.body.innerHTML = ""; document.body.style.backgroundColor = "white";',
|
|
12
|
+
'WHITE_BACKGROUND'
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return delay(options.preURLDelay ? options.preURLDelay : 1500);
|
|
10
17
|
};
|