- Maven modules: openhis-* → healthlink-his-* - Java packages: com.openhis → com.healthlink.his (3,278 files) - Configuration: context-path, DB schema, logger, package scan - Frontend: API paths /openhis/ → /healthlink-his/ (30 files) - Database: healthlink_his schema with 188 tables (copied from hisdev) - Verified: 18/18 API tests passed, 10-concurrent smoke test passed
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import { test } from '@playwright/test';
|
|
|
|
test('debug console', async ({ page }) => {
|
|
const errors: string[] = [];
|
|
const requests: string[] = [];
|
|
|
|
page.on('console', msg => {
|
|
if (msg.type() === 'error' || msg.type() === 'warn') {
|
|
errors.push(`[${msg.type()}] ${msg.text()}`);
|
|
}
|
|
});
|
|
|
|
page.on('response', async resp => {
|
|
if (resp.status() >= 400) {
|
|
requests.push(`${resp.status()} ${resp.url()}`);
|
|
}
|
|
});
|
|
|
|
await page.goto('http://localhost:81/');
|
|
const loginResp = await page.request.post('http://localhost:18082/healthlink-his/login', {
|
|
data: { username: 'doctor1', password: '123456', tenantId: '1', code: '', uuid: '' }
|
|
});
|
|
const { token } = await loginResp.json();
|
|
await page.context().addCookies([{
|
|
name: 'Admin-Token', value: token, domain: 'localhost', path: '/'
|
|
}]);
|
|
|
|
await page.goto('http://localhost:81/clinicManagement/doctorStation');
|
|
await page.waitForLoadState('networkidle');
|
|
await page.waitForTimeout(8000);
|
|
|
|
console.log('=== Console errors/warnings ===');
|
|
errors.forEach(e => console.log(e));
|
|
console.log('=== Failed requests ===');
|
|
requests.forEach(r => console.log(r));
|
|
console.log('=== App innerHTML length ===');
|
|
const len = await page.evaluate(() => document.querySelector('#app')?.innerHTML.length || 0);
|
|
console.log(len);
|
|
});
|