revert: restore develop to clean baseline 5132de36 (remove all AI changes)
This commit is contained in:
@@ -1,28 +1,53 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { LoginPage } from '../pages/LoginPage';
|
||||
import { TEST_USERS, TEST_URLS } from '../utils/test-data';
|
||||
|
||||
test.describe('Bug Regression Tests', () => {
|
||||
test('@bug001 @regression 基础登录流程正常', async ({ page }) => {
|
||||
await page.goto('/login');
|
||||
await expect(page).toHaveURL(/.*login/);
|
||||
test.describe('🐛 Bug回归测试', () => {
|
||||
let loginPage: LoginPage;
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
loginPage = new LoginPage(page);
|
||||
await loginPage.goto();
|
||||
await loginPage.login(TEST_USERS.admin.username, TEST_USERS.admin.password);
|
||||
await loginPage.expectLoginSuccess();
|
||||
});
|
||||
|
||||
// 新增 Bug #603 回归测试
|
||||
test('@bug603 @regression 住院发退药页面搜索栏布局正常,重置按钮可见', async ({ page }) => {
|
||||
await page.goto('/inpatient/drugDispenseReturn');
|
||||
test('#437 手术计费防重复提交 @bug437 @regression', async ({ page }) => {
|
||||
await page.goto(TEST_URLS.surgeryBilling);
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
const addBtn = page.locator('button:has-text("新增"), button:has-text("生成")');
|
||||
if (await addBtn.isVisible()) {
|
||||
await addBtn.click();
|
||||
await addBtn.click();
|
||||
await addBtn.click();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
const dialogs = page.locator('.el-dialog, .el-message-box');
|
||||
expect(await dialogs.count()).toBeLessThanOrEqual(1);
|
||||
}
|
||||
});
|
||||
|
||||
const resetBtn = page.getByRole('button', { name: '重置' });
|
||||
await expect(resetBtn).toBeVisible();
|
||||
test('#443 手术计费签发耗材 @bug443 @regression', async ({ page }) => {
|
||||
await page.goto(TEST_URLS.surgeryBilling);
|
||||
await page.waitForLoadState('networkidle');
|
||||
const signBtn = page.locator('button:has-text("签发"), button:has-text("提交")');
|
||||
if (await signBtn.isVisible()) {
|
||||
await signBtn.click();
|
||||
await page.waitForTimeout(2000);
|
||||
const errorMsg = page.locator('text=发放库房为空');
|
||||
expect(await errorMsg.count()).toBe(0);
|
||||
}
|
||||
});
|
||||
|
||||
const searchForm = page.locator('.search-form');
|
||||
await expect(searchForm).toBeVisible();
|
||||
|
||||
// 验证布局未发生重叠或溢出
|
||||
const formBox = await searchForm.boundingBox();
|
||||
const btnBox = await resetBtn.boundingBox();
|
||||
expect(formBox).not.toBeNull();
|
||||
expect(btnBox).not.toBeNull();
|
||||
// 确保按钮在表单容器可视范围内且未被其他元素遮挡
|
||||
expect(btnBox.x + btnBox.width).toBeLessThanOrEqual(formBox.x + formBox.width + 5);
|
||||
test('#427 检查项目分类手风琴展开 @regression', async ({ page }) => {
|
||||
await page.goto(TEST_URLS.doctorStation);
|
||||
await page.waitForLoadState('networkidle');
|
||||
const categories = page.locator('.el-collapse-item, .category-item');
|
||||
const count = await categories.count();
|
||||
if (count > 0) {
|
||||
await categories.first().click();
|
||||
await page.waitForTimeout(500);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user