Files
hanzo.ai/scripts/capture-previews.mjs
zooqueenandHanzo Dev 270337a635 feat(university): add 6 course programs, student learning portal, coupon discount engine and Hanzo checkout integration
- Add comprehensive curriculum for all 6 Hanzo University engineering tracks: ENG 100, RL 101, MKT 102, SYS 103, PRA 104, ARC 105
- Implement interactive CouponInput component supporting promo codes (STUDENT50, HANZO20, EARLYBIRD, etc.) with real-time discount calculation and dynamic checkout links
- Add Enrolled Student Learning Portal (/university/portal) showing post-purchase workspace, live gVisor pod terminal, autograder evaluation logs, 25% credit rebate balance, and W3C Verifiable Credential preview
- Wire course tuition purchases directly to established Hanzo checkout (checkoutUrl) with returnUrl and coupon parameters
- Resilient auth onward destination routing supporting both ?next= and ?redirect= parameters
- Add Kai migration guide and course funnel (/kai/guide)
- Sync blog and model metadata

Co-authored-by: Hanzo Dev <[email protected]>
2026-10-06 11:57:30 -07:00

52 lines
2.1 KiB
JavaScript

import { chromium } from '@playwright/test';
import { mkdirSync } from 'node:fs';
import { join } from 'node:path';
const outDir = '/Users/a/.gemini/antigravity-cli/brain/7177c7ec-5cdf-4cca-a4dc-3fe6101a015a';
mkdirSync(outDir, { recursive: true });
async function main() {
console.log('Launching Chromium...');
const browser = await chromium.launch({ headless: true });
const context = await browser.newContext({
viewport: { width: 1440, height: 900 },
deviceScaleFactor: 2,
});
const page = await context.newPage();
// 1. Kai Decision Model Guide
console.log('Testing /kai/guide...');
await page.goto('http://localhost:3100/kai/guide', { waitUntil: 'networkidle' });
const kaiH1 = await page.locator('h1').first().textContent();
console.log('Kai Guide H1:', kaiH1);
const kaiScreenshot = join(outDir, 'preview-kai-guide.png');
await page.screenshot({ path: kaiScreenshot, fullPage: true });
console.log('Saved Kai Guide screenshot to:', kaiScreenshot);
// 2. University Catalog
console.log('Testing /university...');
await page.goto('http://localhost:3100/university', { waitUntil: 'networkidle' });
const catalogH1 = await page.locator('h1').first().textContent();
console.log('University Catalog H1:', catalogH1);
const universityScreenshot = join(outDir, 'preview-university.png');
await page.screenshot({ path: universityScreenshot, fullPage: true });
console.log('Saved University Catalog screenshot to:', universityScreenshot);
// 3. Agentic Coding Course
console.log('Testing /university/agentic-coding...');
await page.goto('http://localhost:3100/university/agentic-coding', { waitUntil: 'networkidle' });
const courseH1 = await page.locator('h1').first().textContent();
console.log('Agentic Coding H1:', courseH1);
const courseScreenshot = join(outDir, 'preview-agentic-coding.png');
await page.screenshot({ path: courseScreenshot, fullPage: true });
console.log('Saved Agentic Coding screenshot to:', courseScreenshot);
await browser.close();
console.log('All 3 previews successfully captured!');
}
main().catch((err) => {
console.error('Error running script:', err);
process.exit(1);
});