Files
his/healthlink-his-ui/tests/e2e/specs/bug-593.spec.ts

48 lines
1.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { test, expect } from '@playwright/test';
import { LoginPage } from '../pages/LoginPage';
/**
* Bug #593: 请修复 Bug #593【住院医生工作站-临床医嘱】长期医嘱模块缺失“取消停嘱”功能,误操作停止的医嘱无法恢复,不满足医院临床双向容错业务逻辑
* 自动生成: 2026-06-02 03:30:55
*/
test.describe('🐛 Bug#593', () => {
let loginPage: LoginPage;
test.beforeEach(async ({ page }) => {
loginPage = new LoginPage(page);
await loginPage.goto();
await loginPage.login(
process.env.TEST_USERNAME || 'admin',
process.env.TEST_PASSWORD || 'admin123'
);
await loginPage.expectLoginSuccess();
});
test('#593 请修复 Bug #593【住院医生工作站-临床医嘱】长期医嘱模块缺失“取消停嘱”功能,误操作停止的医嘱无法恢复,不满足医院临床双向容错业务逻辑 @bug593 @regression', async ({ page }) => {
await page.goto('/inpatientDoctor');
await page.waitForLoadState('networkidle');
// 检查页面正常加载(非登录页)
await expect(page).not.toHaveURL(/.*login.*/);
// 检查无 JS 错误
const jsErrors: string[] = [];
page.on('pageerror', (err) => jsErrors.push(err.message));
await page.waitForTimeout(2000);
// 页面基本可交互
const body = page.locator('body');
await expect(body).toBeVisible();
// 截图记录
await page.screenshot({
path: 'tests/e2e/report/bug-593-result.png',
fullPage: true
});
// 无 JS 错误
expect(jsErrors).toEqual([]);
});
});