29 lines
1.2 KiB
TypeScript
Executable File
29 lines
1.2 KiB
TypeScript
Executable File
import { test, expect } from '@playwright/test';
|
|
|
|
// ... 原有测试用例 ...
|
|
|
|
// @bug550 @regression
|
|
test('Bug #550: 检查申请项目选择交互优化验证', async ({ page }) => {
|
|
await page.goto('/outpatient/doctor/examApplication');
|
|
await page.waitForLoadState('networkidle');
|
|
|
|
// 1. 验证解耦:勾选项目不应自动勾选检查方法
|
|
await page.click('text=彩超');
|
|
await page.click('label:has-text("128线排") input[type="checkbox"]');
|
|
const methodCheckbox = page.locator('.selected-panel .method-row input[type="checkbox"]').first();
|
|
await expect(methodCheckbox).not.toBeChecked();
|
|
|
|
// 2. 验证卡片显示:无“套餐”前缀,支持完整名称悬浮提示
|
|
const cardName = page.locator('.item-card .item-name');
|
|
await expect(cardName).not.toContainText('套餐');
|
|
await expect(cardName).toHaveAttribute('title', '128线排');
|
|
|
|
// 3. 验证默认折叠与层级结构(项目 > 检查方法)
|
|
const detailArea = page.locator('.method-detail-area');
|
|
await expect(detailArea).toBeHidden(); // 默认收起状态
|
|
|
|
await page.click('.item-card'); // 点击展开
|
|
await expect(detailArea).toBeVisible();
|
|
await expect(page.locator('.item-group .method-row')).toHaveCount(2); // 验证方法归属正确
|
|
});
|