hash change
I couldn't tell any differences between chromium 110 and 111, so I'm not sure what changed
This commit is contained in:
parent
d9ab0d2058
commit
2192fedc04
|
|
@ -3,21 +3,21 @@
|
||||||
"url": "https://example.com",
|
"url": "https://example.com",
|
||||||
"expected": {
|
"expected": {
|
||||||
"title": "Example Domain",
|
"title": "Example Domain",
|
||||||
"screenshot": "02b4ebddcf15459571f775df95174eaf08b4fa45"
|
"screenshot": "fdd55bf210cb00e00cadf3098055611d11293d02"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://example.com",
|
"url": "https://example.com",
|
||||||
"expected": {
|
"expected": {
|
||||||
"title": "Example Domain",
|
"title": "Example Domain",
|
||||||
"screenshot": "02b4ebddcf15459571f775df95174eaf08b4fa45"
|
"screenshot": "fdd55bf210cb00e00cadf3098055611d11293d02"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "https://get.webgl.org",
|
"url": "https://get.webgl.org",
|
||||||
"expected": {
|
"expected": {
|
||||||
"remove": "logo-container",
|
"remove": "logo-container",
|
||||||
"screenshot": "f4577bc1eef0f4625985a439914c600dcb995e71"
|
"screenshot": "7a63a9a18f32dcdad78e1e0a03364fade25c85a8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ exports.handler = async (event, context) => {
|
||||||
let browser = null;
|
let browser = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const browser = await puppeteer.launch({
|
browser = await puppeteer.launch({
|
||||||
args: chromium.args,
|
args: chromium.args,
|
||||||
defaultViewport: chromium.defaultViewport,
|
defaultViewport: chromium.defaultViewport,
|
||||||
executablePath: await chromium.executablePath(),
|
executablePath: await chromium.executablePath(),
|
||||||
|
|
@ -41,7 +41,9 @@ exports.handler = async (event, context) => {
|
||||||
document.getElementById(selector).remove();
|
document.getElementById(selector).remove();
|
||||||
}, job.expected.remove);
|
}, job.expected.remove);
|
||||||
}
|
}
|
||||||
ok(createHash('sha1').update((await page.screenshot()).toString('base64')).digest('hex') === job.expected.screenshot, `Screenshot assertion failed.`);
|
const screenshot = await page.screenshot();
|
||||||
|
// console.log(screenshot.toString('base64'), createHash('sha1').update(screenshot.toString('base64')).digest('hex'));
|
||||||
|
ok(createHash('sha1').update(screenshot.toString('base64')).digest('hex') === job.expected.screenshot, `Screenshot assertion failed.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue