删除内容: - 前端: health/(67文件), ai/(2文件), Copilot, MediaPicker, 相关API/Store/Hook - 后端: wechat_handler, wechat_service, wechat_user entity, analytics handler, ai_workflow_seed - 配置: WechatConfig, AppConfig.wechat, AuthState wechat 字段 - 启动: 微信凭据检查块, ensure_ai_workflows() 调用 - 迁移: 新增 m20260613_000170_drop_wechat_users.rs - 脚本: api_test_health_alert.py, api_test_mp.py, mpsync.sh/ps1 - E2E: health-data page, flows/ 目录 保留: erp-core/auth/workflow/message/config/plugin + 基座前端 + 通用组件
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
// apps/web/e2e/pages/patient-detail.page.ts
|
|
import type { Page } from '@playwright/test';
|
|
|
|
export class PatientDetailPage {
|
|
readonly page: Page;
|
|
|
|
constructor(page: Page) {
|
|
this.page = page;
|
|
}
|
|
|
|
async goto(id: string) {
|
|
await this.page.goto(`/#/health/patients/${id}`);
|
|
await this.page.waitForSelector('.ant-descriptions, .ant-tabs', { timeout: 10000 });
|
|
}
|
|
|
|
async getPatientName(): Promise<string> {
|
|
const el = this.page.locator('div[style*="font-weight"]').first();
|
|
return el.textContent() ?? '';
|
|
}
|
|
|
|
async clickTab(tabName: string) {
|
|
await this.page.click(`.ant-tabs-tab:has-text("${tabName}")`);
|
|
await this.page.waitForTimeout(500);
|
|
}
|
|
|
|
async getVitalSignsCount(): Promise<number> {
|
|
return this.page.locator('.ant-table-tbody tr').count();
|
|
}
|
|
|
|
async clickAssignDoctor() {
|
|
await this.page.click('button:has-text("分配医生")');
|
|
await this.page.waitForSelector('.ant-modal, .ant-drawer', { timeout: 5000 });
|
|
}
|
|
|
|
async selectDoctor(doctorName: string) {
|
|
await this.page.click('.ant-select');
|
|
await this.page.click(`.ant-select-item-option:has-text("${doctorName}")`);
|
|
}
|
|
|
|
async confirmAssign() {
|
|
await this.page.click('.ant-modal button[type="submit"], .ant-btn-primary');
|
|
await this.page.waitForSelector('.ant-message-success', { timeout: 5000 });
|
|
}
|
|
}
|