Merge pull request #14229 from brendandahl/term-log
Add an easy way to log to the terminal during browser tests.
This commit is contained in:
commit
b1e9e214bf
@ -485,6 +485,24 @@ var Driver = (function DriverClosure() {
|
|||||||
}, this.delay);
|
}, this.delay);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A debugging tool to log to the terminal while tests are running.
|
||||||
|
* XXX: This isn't currently referenced, but it's useful for debugging so
|
||||||
|
* do not remove it.
|
||||||
|
*
|
||||||
|
* @param {string} msg - The message to log, it will be prepended with the
|
||||||
|
* current PDF ID if there is one.
|
||||||
|
*/
|
||||||
|
log(msg) {
|
||||||
|
let id = this.browser;
|
||||||
|
const task = this.manifest[this.currentTask];
|
||||||
|
if (task) {
|
||||||
|
id += `-${task.id}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._info(`${id}: ${msg}`);
|
||||||
|
},
|
||||||
|
|
||||||
_nextTask() {
|
_nextTask() {
|
||||||
let failure = "";
|
let failure = "";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user