mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user