test: log console errors during E2E tests for better debugging

This commit is contained in:
Carlos Santos 2025-05-14 11:45:29 +02:00
parent 19fd1cc30e
commit a4404c8c59

View File

@ -35,6 +35,11 @@ test.describe('Web Component E2E Tests', () => {
: {};
context = await browser.newContext(storageState);
page = await context.newPage();
page.on('console', (msg) => {
if (msg.type() === 'error') {
console.error(`Console Error: ${msg.text()}`);
}
});
await page.goto(testAppUrl);
await page.waitForSelector('.rooms-container');
await page.waitForSelector(`#${testRoomPrefix}`);