chore: further unify Puppeteer-Firefox tests with Puppeteer (#3931)

This patch:
* unifies assets between tests
* enables a few puppeteer tests on Puppeteer-Firefox

Drive-by: beautify failing output of `expect.toEqual` matcher.

References #3889
This commit is contained in:
Andrey Lushnikov
2019-02-06 13:49:14 -08:00
committed by GitHub
parent c3b6619432
commit 6887ad881a
14 changed files with 43 additions and 43 deletions

View File

@@ -128,13 +128,16 @@ const utils = module.exports = {
/**
* @param {!Frame} frame
* @param {string=} indentation
* @return {string}
* @return {Array<string>}
*/
dumpFrames: function(frame, indentation) {
indentation = indentation || '';
let result = indentation + frame.url().replace(/:\d{4}\//, ':<PORT>/');
let description = frame.url().replace(/:\d{4}\//, ':<PORT>/');
if (frame.name())
description += ' (' + frame.name() + ')';
const result = [indentation + description];
for (const child of frame.childFrames())
result += '\n' + utils.dumpFrames(child, ' ' + indentation);
result.push(...utils.dumpFrames(child, ' ' + indentation));
return result;
},