mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(log): include log name in progress recording (#2550)
This commit is contained in:
parent
fb0b910ed7
commit
1bf9e65ef5
@ -84,7 +84,7 @@ export class ProgressController {
|
||||
},
|
||||
log: (log: Log, message: string | Error) => {
|
||||
if (this._state === 'running') {
|
||||
this._logRecording.push(message.toString());
|
||||
this._logRecording.push(`[${log.name}] ${message.toString()}`);
|
||||
this._logger.log(log, ' ' + message);
|
||||
} else {
|
||||
this._logger.log(log, message);
|
||||
|
||||
@ -54,6 +54,8 @@ describe('Playwright', function() {
|
||||
const options = { ...defaultBrowserOptions, timeout: 5000, __testHookBeforeCreateBrowser: () => new Promise(f => setTimeout(f, 6000)) };
|
||||
const error = await browserType.launch(options).catch(e => e);
|
||||
expect(error.message).toContain(`Timeout 5000ms exceeded during ${browserType.name()}.launch.`);
|
||||
expect(error.message).toContain(`[browser] <launching>`);
|
||||
expect(error.message).toContain(`[browser] <launched> pid=`);
|
||||
});
|
||||
it('should handle exception', async({browserType, defaultBrowserOptions}) => {
|
||||
const e = new Error('Dummy');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user