- Implemented tests for debugging browser cache vs server response. - Verified calendar displays correct dates for November 2025. - Added visual inspection screenshot for calendar layout. - Created tests to ensure calendar fits within its container. - Checked for correct styling of available and blocked dates. - Debugged login form behavior and cookie handling. - Added tests for forced browser refresh and cache verification. - Conducted visual tests to compare actual calendar layout with expected. - Enhanced logging for better traceability during test execution.
27 lines
987 B
TypeScript
27 lines
987 B
TypeScript
import { test } from '@playwright/test';
|
|
|
|
test('Take screenshot of calendar for visual inspection', async ({ page }) => {
|
|
// Set basic auth header
|
|
await page.setExtraHTTPHeaders({
|
|
'Authorization': 'Basic ' + Buffer.from('brotha:makefood1').toString('base64')
|
|
});
|
|
|
|
await page.goto('http://localhost:3000/admin/availability');
|
|
await page.waitForSelector('.cook-calendar');
|
|
|
|
// Wait a bit more to ensure everything is loaded
|
|
await page.waitForTimeout(2000);
|
|
|
|
// Take screenshot of just the calendar
|
|
const calendar = page.locator('.cook-calendar');
|
|
await calendar.screenshot({ path: 'calendar-debug.png' });
|
|
|
|
// Also log the actual HTML structure
|
|
const calendarHTML = await calendar.innerHTML();
|
|
console.log('=== FULL CALENDAR HTML ===');
|
|
console.log(calendarHTML);
|
|
|
|
// Check actual header text
|
|
const headers = await page.locator('.cook-calendar th, .cook-calendar .rdp-head_cell').allTextContents();
|
|
console.log('Week headers:', headers);
|
|
}); |