当手术计费弹窗中点击"签发"耗材时,因耗材的locationId(发放库房)为空导致后端异常。 在DoctorStationAdviceAppServiceImpl.handDevice方法中,当locationId为null时,使用登录用户的科室ID作为默认值, 与NurseBillingAppService中的处理方式保持一致。
35 lines
956 B
TypeScript
Executable File
35 lines
956 B
TypeScript
Executable File
import { Page, expect } from '@playwright/test';
|
|
|
|
export class SurgeryBillingPage {
|
|
readonly page: Page;
|
|
|
|
constructor(page: Page) {
|
|
this.page = page;
|
|
}
|
|
|
|
async goto() {
|
|
await this.page.goto('/operatingroom');
|
|
await this.page.waitForLoadState('networkidle');
|
|
}
|
|
|
|
async rapidClickGenerate(times: number = 5) {
|
|
const btn = this.page.locator('button:has-text("生成"), button:has-text("新增")');
|
|
for (let i = 0; i < times; i++) {
|
|
await btn.click().catch(() => {});
|
|
}
|
|
await this.page.waitForLoadState('networkidle');
|
|
}
|
|
|
|
async getDialogCount(): Promise<number> {
|
|
return await this.page.locator('.el-dialog, .el-message-box').count();
|
|
}
|
|
|
|
async expectNoLocationIdError() {
|
|
await expect(this.page.locator('text=发放库房为空')).toHaveCount(0, { timeout: 5000 });
|
|
}
|
|
|
|
async expectSaveSuccess() {
|
|
await expect(this.page.locator('.el-message--success')).toBeVisible({ timeout: 10000 });
|
|
}
|
|
}
|