- Replace modal calendar with inline expandable calendar widget integrated into the day picker. - Add status indicator dots (attended/absent/pending) to month calendar grid matching day picker. - Disable and gray out weekend days in calendar when weekend schedule is turned off. - Redesign extend bar with integrated handle that aligns with the palette. - Remove start-to-end timing on Today screen's class time rail, showing only start time. - Implement Playwright E2E and visual testing suite with multi-screen capture scripts. - Add cascade DELETE endpoints for subjects and versioned recurring timetable entries.
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
import { chromium } from 'playwright';
|
|
|
|
async function capture() {
|
|
const browser = await chromium.launch({ headless: true });
|
|
const context = await browser.newContext({
|
|
viewport: { width: 390, height: 844 },
|
|
deviceScaleFactor: 2,
|
|
isMobile: true,
|
|
});
|
|
const page = await context.newPage();
|
|
|
|
await page.goto('http://127.0.0.1:3000/');
|
|
await page.waitForTimeout(2000);
|
|
await page.screenshot({ path: './screenshots/10-today-collapsed.png' });
|
|
|
|
// Click extend bar
|
|
const extendBar = page.getByRole('button', { name: 'Expand calendar' });
|
|
await extendBar.click();
|
|
await page.waitForTimeout(1000);
|
|
await page.screenshot({ path: './screenshots/11-today-expanded.png' });
|
|
|
|
// Select an enabled weekday (Wednesday, Aug 12)
|
|
const day12 = page.getByRole('button', { name: /Wednesday, August 12/ });
|
|
if (await day12.isVisible()) {
|
|
await day12.click();
|
|
await page.waitForTimeout(1000);
|
|
await page.screenshot({ path: './screenshots/12-today-recollapsed-after-select.png' });
|
|
}
|
|
|
|
await browser.close();
|
|
}
|
|
|
|
capture().catch(console.error);
|