核心升级: - Spring Boot 2.7.18 → 3.5.14 - MyBatis Plus 3.5.5 → 3.5.16 (spring-boot3-starter) - Springdoc 1.8.0 → 2.8.6 (OpenAPI 3) - Flowable 6.8.0 → 7.1.0 - Druid 1.2.x → 1.2.28 (boot3-starter) - kotlin-reflect 1.9.10 → 1.9.25 迁移适配: - javax → jakarta 命名空间 (620+ 文件) - Swagger 注解迁移到 OpenAPI 3 (@Tag/@Schema/@Operation/@Parameter) - Spring Security 6.2 适配 (antMatchers→requestMatchers, EnableMethodSecurity) - Druid 包名迁移 (boot→boot3) - Redis 配置路径迁移 (spring.redis→spring.data.redis) - Flyway 适配 (flyway-database-postgresql) - Flowable 7.x 适配 (MULE_TASK_IMAGE 移除) 修复: - spring-boot-maven-plugin 2.5.15→3.5.14 (SPI服务发现失效) - mybatis-plus-boot-starter 3.5.5→3.5.16 (kotlin-reflect+fastjson2冲突) - Flowable database-schema-update 启用自动建表 验证: 23/23 测试通过, 1374 API端点正常
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/openhis/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);
|
|
});
|