shinkan-jinkendo/test-frontend.js
Lars efc2a11a76
All checks were successful
Deploy Development / deploy (push) Successful in 39s
feat: Add Auth system with Login UI
Backend:
- Auth router (login, register, logout)
- Profiles router (get current profile)
- Registered in main.py

Frontend:
- LoginPage with login/register tabs
- Dashboard with welcome screen
- Simplified AuthContext for Shinkan
- Protected routes in App.jsx
- Public routes redirect when logged in

Ready for testing!

version: 0.1.0
2026-04-21 14:56:16 +02:00

45 lines
1.3 KiB
JavaScript

const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
console.log('=== Testing Shinkan Frontend ===');
try {
await page.goto('http://192.168.2.49:3098', { waitUntil: 'networkidle', timeout: 10000 });
// Get page title
const title = await page.title();
console.log('Title:', title);
// Get visible text
const bodyText = await page.textContent('body');
console.log('\n=== Page Content ===');
console.log(bodyText);
// Check for specific elements
const h1 = await page.textContent('h1').catch(() => null);
console.log('\n=== Heading ===');
console.log('H1:', h1);
// Check for buttons
const buttons = await page.locator('button').count();
console.log('\n=== Elements ===');
console.log('Buttons:', buttons);
// Check for login form
const loginForm = await page.locator('form').count();
console.log('Forms:', loginForm);
// Take screenshot
await page.screenshot({ path: 'shinkan-screenshot.png', fullPage: true });
console.log('\nScreenshot saved: shinkan-screenshot.png');
} catch (error) {
console.error('Error:', error.message);
}
await browser.close();
})();