const { test, expect } = require('@playwright/test'); test.describe('Console Log Check', () => { test('Check if script console logs appear', async ({ page }) => { const logs = []; // Capture console logs page.on('console', msg => { console.log('CONSOLE:', msg.text()); logs.push(msg.text()); }); // Capture errors page.on('pageerror', error => { console.log('PAGE ERROR:', error.message); }); // Navigate to the calendar page await page.goto('http://localhost:3000/calendar'); await page.waitForLoadState('networkidle'); await page.waitForTimeout(2000); console.log('All console logs:', logs); console.log('Script starting log found:', logs.some(log => log.includes('CALENDAR SCRIPT STARTING'))); }); });