- Introduced the `body_history_viz` widget to the dashboard, allowing users to visualize body history data. - Updated widget configuration to include `body_history_viz` in the allowed widgets and added validation for its configuration. - Enhanced the widget catalog with details for the new `body_history_viz` entry. - Added tests to ensure proper validation of the `body_history_viz` widget configuration. - Updated application version to reflect the addition of the new widget.
41 lines
1.3 KiB
JavaScript
41 lines
1.3 KiB
JavaScript
const { chromium } = require('playwright');
|
|
|
|
(async () => {
|
|
const browser = await chromium.launch({ headless: true });
|
|
const page = await browser.newPage();
|
|
|
|
console.log('=== Testing Shinkan Frontend ===\n');
|
|
|
|
try {
|
|
await page.goto('http://192.168.2.49:3098', { waitUntil: 'networkidle', timeout: 10000 });
|
|
|
|
const title = await page.title();
|
|
console.log('📄 Title:', title);
|
|
|
|
const h1 = await page.textContent('h1').catch(() => null);
|
|
console.log('🥋 Heading:', h1);
|
|
|
|
const bodyText = await page.evaluate(() => document.body.innerText);
|
|
console.log('\n📝 Page Content:\n' + '='.repeat(60));
|
|
console.log(bodyText);
|
|
console.log('='.repeat(60));
|
|
|
|
const buttons = await page.locator('button').count();
|
|
const forms = await page.locator('form').count();
|
|
const inputs = await page.locator('input').count();
|
|
|
|
console.log('\n🔍 Elements Found:');
|
|
console.log(' - Buttons:', buttons);
|
|
console.log(' - Forms:', forms);
|
|
console.log(' - Inputs:', inputs);
|
|
|
|
await page.screenshot({ path: 'shinkan-dev-screenshot.png', fullPage: true });
|
|
console.log('\n📸 Screenshot: shinkan-dev-screenshot.png');
|
|
|
|
} catch (error) {
|
|
console.error('❌ Error:', error.message);
|
|
}
|
|
|
|
await browser.close();
|
|
})();
|