Files
clg-kit/scripts/test-onboarding.mjs
root 693cc1c0b6 feat: redesign day picker with expandable calendar, status markers & Playwright E2E testing
- 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.
2026-09-05 08:58:51 +05:30

35 lines
1.1 KiB
JavaScript

import { chromium } from 'playwright';
async function testOnboarding() {
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/onboarding');
await page.waitForTimeout(1000);
// Fill step 1
await page.fill('input[placeholder="e.g. Sam Taylor"]', 'Alex Morgan');
await page.fill('input[placeholder="e.g. Northbridge University"]', 'Stanford University');
await page.click('text=Continue');
await page.waitForTimeout(1000);
await page.screenshot({ path: './screenshots/08-onboarding-step2.png' });
// Add a subject
await page.fill('input[placeholder="e.g. Data Structures"]', 'Algorithms');
await page.fill('input[placeholder="e.g. CS201"]', 'CS161');
await page.click('text=Add subject');
await page.waitForTimeout(500);
await page.screenshot({ path: './screenshots/09-onboarding-with-subject.png' });
await browser.close();
}
testOnboarding().catch(console.error);