Files
poshmanager/pw_check_stableplace.mjs
2026-08-09 17:33:11 -05:00

32 lines
1.3 KiB
JavaScript

import { chromium } from 'playwright'
const OUT = '/tmp/claude-1000/-home-matthewp-Code-StablePlace-app/cd68dc7a-bd5f-43ab-9404-06ac41bed912/scratchpad'
const browser = await chromium.launch()
const page = await browser.newPage()
const consoleErrors = []
page.on('console', (msg) => { if (msg.type() === 'error') consoleErrors.push(msg.text()) })
page.on('pageerror', (err) => consoleErrors.push('pageerror: ' + err.message))
await page.goto('http://localhost:5173/login')
await page.fill('#email', 'admin@stableplace.local')
await page.fill('#password', 'ChangeMeNow!123')
await page.click('button[type="submit"]')
await page.waitForURL('http://localhost:5173/', { timeout: 10000 })
await page.waitForTimeout(1000)
await page.goto('http://localhost:5173/settings')
await page.waitForTimeout(800)
const notifBtn = page.locator('text=Notifications').first()
if (await notifBtn.count()) {
await notifBtn.click()
await page.waitForTimeout(800)
}
await page.screenshot({ path: `${OUT}/settings-notifications.png`, fullPage: true })
await page.goto('http://localhost:5173/profile')
await page.waitForTimeout(1000)
await page.screenshot({ path: `${OUT}/profile.png`, fullPage: true })
console.log('CONSOLE_ERRORS:', JSON.stringify(consoleErrors, null, 2))
await browser.close()