refactor: 彻底清除所有openhis痕迹
- 重命名目录: openhis-server-new → healthlink-his-server - 重命名目录: openhis-ui-vue3 → healthlink-his-ui - 重命名Java类: OpenHisApplication → HealthLinkHisApplication - 重命名Java类: OpenHisMiniApp → HealthLinkHisMiniApp - 重命名组件目录: OpenHis → HealthLinkHis - 重命名样式文件: openhis.scss → healthlink-his.scss - 重命名配置: nginx-openhis.conf → nginx-healthlink-his.conf - 更新所有源码引用 (0个残留) - 更新所有文档/脚本/配置中的引用
This commit is contained in:
39
healthlink-his-ui/tests/e2e/specs/debug-console.spec.ts
Normal file
39
healthlink-his-ui/tests/e2e/specs/debug-console.spec.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
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);
|
||||
});
|
||||
Reference in New Issue
Block a user