web tests - print page errors to console
//cc @lramos15 this would have detected the missing modulepull/130022/head
parent
934d280a9f
commit
0390d98a4e
|
@ -188,6 +188,13 @@ export function connect(options: Options = {}): Promise<{ client: IDisposable, d
|
|||
await context.tracing.start({ screenshots: true, snapshots: true });
|
||||
const page = await context.newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
page.on('pageerror', async error => console.error(`Playwright ERROR: page error: ${error}`));
|
||||
page.on('crash', page => console.error('Playwright ERROR: page crash'));
|
||||
page.on('response', async response => {
|
||||
if (response.status() >= 400) {
|
||||
console.error(`Playwright ERROR: HTTP status ${response.status()} for ${response.url()}`);
|
||||
}
|
||||
});
|
||||
const payloadParam = `[["enableProposedApi",""],["skipWelcome","true"]]`;
|
||||
await page.goto(`${endpoint}&folder=vscode-remote://localhost:9888${URI.file(workspacePath!).path}&payload=${payloadParam}`);
|
||||
const result = {
|
||||
|
|
|
@ -38,6 +38,14 @@ async function runTestsInBrowser(browserType: BrowserType, endpoint: url.UrlWith
|
|||
const page = await context.newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
|
||||
page.on('pageerror', async error => console.error(`Playwright ERROR: page error: ${error}`));
|
||||
page.on('crash', page => console.error('Playwright ERROR: page crash'));
|
||||
page.on('response', async response => {
|
||||
if (response.status() >= 400) {
|
||||
console.error(`Playwright ERROR: HTTP status ${response.status()} for ${response.url()}`);
|
||||
}
|
||||
});
|
||||
|
||||
const host = endpoint.host;
|
||||
const protocol = 'vscode-remote';
|
||||
|
||||
|
|
Loading…
Reference in New Issue