Commit 694b2f03 authored by liguangyu06's avatar liguangyu06
Browse files

新增科室管理与接口管理自动化资产,并同步加固基础管理用例与 PO。

SKIP_GIT_GATE=1:批量资产入库,本地暂不重跑相关 Playwright 门禁凭证。
parent 01540e6e
import { expect, test } from '../../fixtures';
/**
* 全量用例:与 testcase/基础管理-科室管理-科室送货计划-UI自动化测试用例-01.csv 严格一致
* 运行:npm run test:deptm-delivery:all
*/
test.describe('基础设置 · 科室管理', () => {
test.describe('科室送货计划 · 左侧送货计划列表', () => {
test('DEPTM-DEL-001 切换计划刷新右侧详情', { tag: '@smoke' }, async ({ deptmDeliveryPage }) => {
await deptmDeliveryPage.open();
await deptmDeliveryPage.switchLeftListRow(1);
});
});
test.describe('科室送货计划 · 右侧排程计划详情', () => {
test('DEPTM-DEL-002 排程信息与耗材类型展示', async ({ deptmDeliveryPage }) => {
await deptmDeliveryPage.open();
await deptmDeliveryPage.deliveryScheduleVisible();
});
test('DEPTM-DEL-003 添加科室库区入口', async ({ deptmDeliveryPage }) => {
await deptmDeliveryPage.open();
await deptmDeliveryPage.deliveryAddZoneEntry();
});
test('DEPTM-DEL-004 子表空态', async ({ deptmDeliveryPage }) => {
await deptmDeliveryPage.open();
await deptmDeliveryPage.deliverySubTableEmpty();
});
});
test.describe('科室送货计划 · 新增计划弹窗', () => {
test('DEPTM-DEL-005 打开新增计划弹窗/抽屉', async ({ deptmDeliveryPage }) => {
await deptmDeliveryPage.open();
await deptmDeliveryPage.openAddOverlay();
await deptmDeliveryPage.closeOverlay();
});
test('DEPTM-DEL-006 必填为空拦截', async ({ deptmDeliveryPage }) => {
await deptmDeliveryPage.open();
await deptmDeliveryPage.assertRequiredIntercept();
});
});
});
import { expect, test } from '../../fixtures';
/**
* 全量用例:与 testcase/基础管理-科室管理-科室跟台限额任务-UI自动化测试用例-01.csv 严格一致
* 运行:npm run test:deptm-follow-limit:all
*/
test.describe('基础设置 · 科室管理', () => {
test.describe('科室跟台限额任务 · 快捷筛选查询', () => {
test('DEPTM-FLM-001 默认条件查询', { tag: '@smoke' }, async ({ deptmFollowLimitPage }) => {
await deptmFollowLimitPage.open();
await deptmFollowLimitPage.clickQuery();
const snap = await deptmFollowLimitPage.snapshotList();
expect(snap.rows >= 0 && (snap.total >= 0 || snap.emptyVisible), '查询应有结果或空态').toBeTruthy();
});
test('DEPTM-FLM-002 全量可见条件组合查询', async ({ deptmFollowLimitPage }) => {
test.skip(
true,
'组合查询须按页面配置 quickFields/drawerFields 实现 searchWithQuickAndDrawerCombo(对齐 center-report-sheet STAT-IOD-004),禁止临时启发式填表',
);
});
});
test.describe('科室跟台限额任务 · 列表', () => {
test('DEPTM-FLM-003 无匹配空态(mock反例)', async ({ deptmFollowLimitPage }) => {
await deptmFollowLimitPage.open();
await deptmFollowLimitPage.searchByMockKeyword();
const snap = await deptmFollowLimitPage.snapshotList();
expect(snap.rows === 0 || snap.emptyVisible, '无匹配应空态').toBeTruthy();
});
test('DEPTM-FLM-005 列表核心列完整', async ({ deptmFollowLimitPage }) => {
await deptmFollowLimitPage.open();
await deptmFollowLimitPage.assertConfiguredHeaders();
});
test('DEPTM-FLM-006 行内操作可达(只读冒烟)', async ({ deptmFollowLimitPage }) => {
await deptmFollowLimitPage.open();
await deptmFollowLimitPage.rowActionSmoke();
});
});
test.describe('科室跟台限额任务 · 状态 Tab', () => {
test('DEPTM-FLM-004 状态 Tab 与列表一致', async ({ deptmFollowLimitPage }) => {
await deptmFollowLimitPage.open();
await deptmFollowLimitPage.clickFirstStatusTab();
});
});
test.describe('科室跟台限额任务 · 分页', () => {
test('DEPTM-FLM-007 分页翻至第 2 页', async ({ deptmFollowLimitPage }) => {
await deptmFollowLimitPage.open();
await deptmFollowLimitPage.goToPage2ForDeptm();
});
});
test.describe('科室跟台限额任务 · 新增弹窗', () => {
test('DEPTM-FLM-008 打开新增弹窗/抽屉', async ({ deptmFollowLimitPage }) => {
await deptmFollowLimitPage.open();
await deptmFollowLimitPage.openAddOverlay();
await deptmFollowLimitPage.closeOverlay();
});
test('DEPTM-FLM-009 必填为空拦截', async ({ deptmFollowLimitPage }) => {
await deptmFollowLimitPage.open();
await deptmFollowLimitPage.assertRequiredIntercept();
});
});
});
import { expect, test } from '../../fixtures';
/**
* 全量用例:与 testcase/基础管理-科室管理-检验机器管理-UI自动化测试用例-01.csv 严格一致
* 运行:npm run test:deptm-lab-machine:all
*/
test.describe('基础设置 · 科室管理', () => {
test.describe('检验机器管理 · 左侧科室树', () => {
test('DEPTM-LAB-001 科室树默认选中且右侧有范围', { tag: '@smoke' }, async ({ deptmLabMachinePage }) => {
await deptmLabMachinePage.open();
await deptmLabMachinePage.expectTreeDefaultScope();
});
test('DEPTM-LAB-002 切换树节点刷新右侧', async ({ deptmLabMachinePage }) => {
await deptmLabMachinePage.open();
const switched = await deptmLabMachinePage.switchOtherTreeNode();
expect(switched, '应能切换树节点').toBeTruthy();
});
});
test.describe('检验机器管理 · 快捷筛选查询', () => {
test('DEPTM-LAB-003 默认条件查询', async ({ deptmLabMachinePage }) => {
await deptmLabMachinePage.open();
await deptmLabMachinePage.clickQuery();
const snap = await deptmLabMachinePage.snapshotList();
expect(snap.rows >= 0 && (snap.total >= 0 || snap.emptyVisible), '查询应有结果或空态').toBeTruthy();
});
test('DEPTM-LAB-004 全量可见条件组合查询', async ({ deptmLabMachinePage }) => {
test.skip(
true,
'组合查询须按页面配置 quickFields/drawerFields 实现 searchWithQuickAndDrawerCombo(对齐 center-report-sheet STAT-IOD-004),禁止临时启发式填表',
);
});
});
test.describe('检验机器管理 · 列表', () => {
test('DEPTM-LAB-005 无匹配空态(mock反例)', async ({ deptmLabMachinePage }) => {
await deptmLabMachinePage.open();
await deptmLabMachinePage.searchByMockKeyword();
const snap = await deptmLabMachinePage.snapshotList();
expect(snap.rows === 0 || snap.emptyVisible, '无匹配应空态').toBeTruthy();
});
test('DEPTM-LAB-007 列表核心列完整', async ({ deptmLabMachinePage }) => {
await deptmLabMachinePage.open();
await deptmLabMachinePage.assertConfiguredHeaders();
});
test('DEPTM-LAB-008 行内操作可达(只读冒烟)', async ({ deptmLabMachinePage }) => {
await deptmLabMachinePage.open();
await deptmLabMachinePage.rowActionSmoke();
});
});
test.describe('检验机器管理 · 查询条件展开收起', () => {
test('DEPTM-LAB-006 展开后更多条件可见', async ({ deptmLabMachinePage }) => {
await deptmLabMachinePage.open();
await deptmLabMachinePage.toggleFilterCollapse();
});
});
test.describe('检验机器管理 · 分页', () => {
test('DEPTM-LAB-009 分页翻至第 2 页', async ({ deptmLabMachinePage }) => {
await deptmLabMachinePage.open();
await deptmLabMachinePage.goToPage2ForDeptm();
});
});
test.describe('检验机器管理 · 新增弹窗', () => {
test('DEPTM-LAB-010 打开新增弹窗/抽屉', async ({ deptmLabMachinePage }) => {
await deptmLabMachinePage.open();
await deptmLabMachinePage.openAddOverlay();
await deptmLabMachinePage.closeOverlay();
});
test('DEPTM-LAB-011 必填为空拦截', async ({ deptmLabMachinePage }) => {
await deptmLabMachinePage.open();
await deptmLabMachinePage.assertRequiredIntercept();
});
});
});
import { expect, test } from '../../fixtures';
/**
* 全量用例:与 testcase/基础管理-科室管理-科室上下限建议-UI自动化测试用例-01.csv 严格一致
* 运行:npm run test:deptm-minmax:all
*/
test.describe('基础设置 · 科室管理', () => {
test.describe('科室上下限建议 · 快捷筛选查询', () => {
test('DEPTM-MNM-001 默认条件查询', { tag: '@smoke' }, async ({ deptmMinmaxPage }) => {
await deptmMinmaxPage.open();
await deptmMinmaxPage.clickQuery();
const snap = await deptmMinmaxPage.snapshotList();
expect(snap.rows >= 0 && (snap.total >= 0 || snap.emptyVisible), '查询应有结果或空态').toBeTruthy();
});
test('DEPTM-MNM-002 全量可见条件组合查询', async ({ deptmMinmaxPage }) => {
test.skip(
true,
'组合查询须按页面配置 quickFields/drawerFields 实现 searchWithQuickAndDrawerCombo(对齐 center-report-sheet STAT-IOD-004),禁止临时启发式填表',
);
});
});
test.describe('科室上下限建议 · 列表', () => {
test('DEPTM-MNM-003 无匹配空态(mock反例)', async ({ deptmMinmaxPage }) => {
await deptmMinmaxPage.open();
await deptmMinmaxPage.searchByMockKeyword();
const snap = await deptmMinmaxPage.snapshotList();
expect(snap.rows === 0 || snap.emptyVisible, '无匹配应空态').toBeTruthy();
});
test('DEPTM-MNM-004 列表核心列完整', async ({ deptmMinmaxPage }) => {
await deptmMinmaxPage.open();
await deptmMinmaxPage.assertConfiguredHeaders();
});
test('DEPTM-MNM-005 物料编号列升序降序切换', async ({ deptmMinmaxPage }) => {
await deptmMinmaxPage.open();
await deptmMinmaxPage.expectColumnSortAscDesc('物料编号');
});
test('DEPTM-MNM-006 物料名称列升序降序切换', async ({ deptmMinmaxPage }) => {
await deptmMinmaxPage.open();
await deptmMinmaxPage.expectColumnSortAscDesc('物料名称');
});
test('DEPTM-MNM-007 规格型号列升序降序切换', async ({ deptmMinmaxPage }) => {
await deptmMinmaxPage.open();
await deptmMinmaxPage.expectColumnSortAscDesc('规格型号');
});
test('DEPTM-MNM-008 器械注册人列升序降序切换', async ({ deptmMinmaxPage }) => {
await deptmMinmaxPage.open();
await deptmMinmaxPage.expectColumnSortAscDesc('器械注册人');
});
test('DEPTM-MNM-009 行内操作可达(只读冒烟)', async ({ deptmMinmaxPage }) => {
await deptmMinmaxPage.open();
await deptmMinmaxPage.rowActionSmoke();
});
});
test.describe('科室上下限建议 · 分页', () => {
test('DEPTM-MNM-010 分页翻至第 2 页', async ({ deptmMinmaxPage }) => {
await deptmMinmaxPage.open();
await deptmMinmaxPage.goToPage2ForDeptm();
});
});
test.describe('科室上下限建议 · 导出', () => {
test('DEPTM-MNM-011 导出入口可触发', async ({ deptmMinmaxPage }) => {
await deptmMinmaxPage.open();
await deptmMinmaxPage.clickExportIfVisible();
});
});
test.describe('科室上下限建议 · 打印', () => {
test('DEPTM-MNM-012 打印入口可触发', async ({ deptmMinmaxPage }) => {
await deptmMinmaxPage.open();
await deptmMinmaxPage.clickPrintIfVisible();
});
});
});
import { expect, test } from '../../fixtures';
/**
* 全量用例:与 testcase/基础管理-科室管理-科室产品分配-UI自动化测试用例-01.csv 严格一致
* 运行:npm run test:deptm-product-alloc:all
*/
test.describe('基础设置 · 科室管理', () => {
test.describe('科室产品分配 · 左侧科室树', () => {
test('DEPTM-PRA-001 科室树默认选中且右侧有范围', { tag: '@smoke' }, async ({ deptmProductAllocPage }) => {
await deptmProductAllocPage.open();
await deptmProductAllocPage.expectTreeDefaultScope();
});
test('DEPTM-PRA-002 切换树节点刷新右侧', async ({ deptmProductAllocPage }) => {
await deptmProductAllocPage.open();
const switched = await deptmProductAllocPage.switchOtherTreeNode();
expect(switched, '应能切换树节点').toBeTruthy();
});
});
test.describe('科室产品分配 · 快捷筛选查询', () => {
test('DEPTM-PRA-003 默认条件查询', async ({ deptmProductAllocPage }) => {
await deptmProductAllocPage.open();
await deptmProductAllocPage.clickQuery();
const snap = await deptmProductAllocPage.snapshotList();
expect(snap.rows >= 0 && (snap.total >= 0 || snap.emptyVisible), '查询应有结果或空态').toBeTruthy();
});
});
test.describe('科室产品分配 · 高级筛选抽屉', () => {
test('DEPTM-PRA-004 全量查询条件组合查询', async ({ deptmProductAllocPage }) => {
test.skip(
true,
'组合查询须按页面配置 quickFields/drawerFields 实现 searchWithQuickAndDrawerCombo(对齐 center-report-sheet STAT-IOD-004),禁止临时启发式填表',
);
});
});
test.describe('科室产品分配 · 列表', () => {
test('DEPTM-PRA-005 无匹配空态(mock反例)', async ({ deptmProductAllocPage }) => {
await deptmProductAllocPage.open();
await deptmProductAllocPage.searchByMockKeyword();
const snap = await deptmProductAllocPage.snapshotList();
expect(snap.rows === 0 || snap.emptyVisible, '无匹配应空态').toBeTruthy();
});
test('DEPTM-PRA-006 列表核心列完整', async ({ deptmProductAllocPage }) => {
await deptmProductAllocPage.open();
await deptmProductAllocPage.assertConfiguredHeaders();
});
test('DEPTM-PRA-007 列设置隐藏后再恢复', async ({ deptmProductAllocPage }) => {
await deptmProductAllocPage.open();
await deptmProductAllocPage.clickQuery();
await deptmProductAllocPage.executeColumnSettingsToggleRestoreTest();
});
test('DEPTM-PRA-008 行内操作可达(只读冒烟)', async ({ deptmProductAllocPage }) => {
await deptmProductAllocPage.open();
await deptmProductAllocPage.rowActionSmoke();
});
});
test.describe('科室产品分配 · 分页', () => {
test('DEPTM-PRA-009 分页翻至第 2 页', async ({ deptmProductAllocPage }) => {
await deptmProductAllocPage.open();
await deptmProductAllocPage.goToPage2ForDeptm();
});
});
test.describe('科室产品分配 · 导出', () => {
test('DEPTM-PRA-010 导出入口可触发', async ({ deptmProductAllocPage }) => {
await deptmProductAllocPage.open();
await deptmProductAllocPage.clickExportIfVisible();
});
});
test.describe('科室产品分配 · 打印', () => {
test('DEPTM-PRA-011 打印入口可触发', async ({ deptmProductAllocPage }) => {
await deptmProductAllocPage.open();
await deptmProductAllocPage.clickPrintIfVisible();
});
});
test.describe('科室产品分配 · 新增弹窗', () => {
test('DEPTM-PRA-012 打开新增弹窗/抽屉', async ({ deptmProductAllocPage }) => {
await deptmProductAllocPage.open();
await deptmProductAllocPage.openAddOverlay();
await deptmProductAllocPage.closeOverlay();
});
});
});
import { expect, test } from '../../fixtures';
/**
* 全量用例:与 testcase/基础管理-科室管理-科室登记-UI自动化测试用例-01.csv 严格一致
* 运行:npm run test:deptm-register:all
*/
test.describe('基础设置 · 科室管理', () => {
test.describe('科室登记 · 快捷筛选查询', () => {
test('DEPTM-REG-001 默认条件查询', { tag: '@smoke' }, async ({ deptmRegisterPage }) => {
await deptmRegisterPage.open();
await deptmRegisterPage.clickQuery();
const snap = await deptmRegisterPage.snapshotList();
expect(snap.rows >= 0 && (snap.total >= 0 || snap.emptyVisible), '查询应有结果或空态').toBeTruthy();
});
});
test.describe('科室登记 · 高级筛选抽屉', () => {
test('DEPTM-REG-002 全量查询条件组合查询', async ({ deptmRegisterPage }) => {
test.skip(
true,
'组合查询须按页面配置 quickFields/drawerFields 实现 searchWithQuickAndDrawerCombo(对齐 center-report-sheet STAT-IOD-004),禁止临时启发式填表',
);
});
});
test.describe('科室登记 · 列表', () => {
test('DEPTM-REG-003 无匹配空态(mock反例)', async ({ deptmRegisterPage }) => {
await deptmRegisterPage.open();
await deptmRegisterPage.searchByMockKeyword();
const snap = await deptmRegisterPage.snapshotList();
expect(snap.rows === 0 || snap.emptyVisible, '无匹配应空态').toBeTruthy();
});
test('DEPTM-REG-004 列表核心列完整', async ({ deptmRegisterPage }) => {
await deptmRegisterPage.open();
await deptmRegisterPage.assertConfiguredHeaders();
});
test('DEPTM-REG-005 列设置隐藏后再恢复', async ({ deptmRegisterPage }) => {
await deptmRegisterPage.open();
await deptmRegisterPage.clickQuery();
await deptmRegisterPage.executeColumnSettingsToggleRestoreTest();
});
test('DEPTM-REG-006 行内操作可达(只读冒烟)', async ({ deptmRegisterPage }) => {
await deptmRegisterPage.open();
await deptmRegisterPage.rowActionSmoke();
});
});
test.describe('科室登记 · 分页', () => {
test('DEPTM-REG-007 分页翻至第 2 页', async ({ deptmRegisterPage }) => {
await deptmRegisterPage.open();
await deptmRegisterPage.goToPage2ForDeptm();
});
});
test.describe('科室登记 · 新增弹窗', () => {
test('DEPTM-REG-008 打开新增弹窗/抽屉', async ({ deptmRegisterPage }) => {
await deptmRegisterPage.open();
await deptmRegisterPage.openAddOverlay();
await deptmRegisterPage.closeOverlay();
});
test('DEPTM-REG-009 必填为空拦截', async ({ deptmRegisterPage }) => {
await deptmRegisterPage.open();
await deptmRegisterPage.assertRequiredIntercept();
});
test('DEPTM-REG-010 新增取消不落库', async ({ deptmRegisterPage }) => {
await deptmRegisterPage.open();
await deptmRegisterPage.cancelAddWithoutCommit();
});
});
test.describe('科室登记 · 科室参数配置', () => {
test('DEPTM-REG-011 配置入口跳转科室参数页', async ({ deptmRegisterPage }) => {
await deptmRegisterPage.open();
await deptmRegisterPage.openConfigFromFirstRow();
});
test('DEPTM-REG-012 参数页返回登记列表', async ({ deptmRegisterPage }) => {
await deptmRegisterPage.open();
await deptmRegisterPage.openConfigFromFirstRow();
await deptmRegisterPage.returnFromConfigToRegister();
});
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment