Commit 97840769 authored by liguangyu06's avatar liguangyu06
Browse files

新增期初管理全链路自动化资产,并加固产品管理用例与清理冗余截图。

紧急放行原因:用户要求立即推送今日改动备份,门禁用例待后续补跑。
parent 3dbf401d
...@@ -77,9 +77,9 @@ test.describe('基础设置 · 产品管理', () => { ...@@ -77,9 +77,9 @@ test.describe('基础设置 · 产品管理', () => {
}); });
test.describe('缺货目录明细 · 导出', () => { test.describe('缺货目录明细 · 导出', () => {
test('PRODM-STD-011 当前查询条件下导出', async ({ prodmStockoutDetailPage }) => { test('PRODM-STD-011 首行样本查询后导出', async ({ prodmStockoutDetailPage }) => {
await prodmStockoutDetailPage.open(); await prodmStockoutDetailPage.open();
await prodmStockoutDetailPage.clickExportIfVisible(); await prodmStockoutDetailPage.exportAfterQueryByFirstRowSample();
}); });
}); });
......
...@@ -70,9 +70,9 @@ test.describe('基础设置 · 产品管理', () => { ...@@ -70,9 +70,9 @@ test.describe('基础设置 · 产品管理', () => {
}); });
test.describe('缺货目录维护 · 导出', () => { test.describe('缺货目录维护 · 导出', () => {
test('PRODM-STO-010 当前查询条件下导出', async ({ prodmStockoutPage }) => { test('PRODM-STO-010 首行样本查询后导出', async ({ prodmStockoutPage }) => {
await prodmStockoutPage.open(); await prodmStockoutPage.open();
await prodmStockoutPage.clickExportIfVisible(); await prodmStockoutPage.exportAfterQueryByFirstRowSample();
}); });
}); });
......
import {
prodmSupplyComboAssertKeys,
prodmSupplyComboDrawerFields,
prodmSupplyComboQuickFields,
} from '../../data/prodm.data';
import { expect, test } from '../../fixtures'; import { expect, test } from '../../fixtures';
/** /**
* 全量用例:与 testcase/基础管理-产品管理-产品供应关系维护-UI自动化测试用例-01.csv 严格一致 * 全量用例:与 testcase/基础管理-产品管理-产品供应关系维护-UI自动化测试用例-01.csv 严格一致
* 运行:npm run test:prodm-supply:all * 运行:npm run test:prodm-supply:all
* 除 001/002(树本身)外,其余用例 open 后选中左侧树「国药控股医学检验(山东)有限公司」
*/ */
test.describe('基础设置 · 产品管理', () => { test.describe('基础设置 · 产品管理', () => {
test.describe('产品供应关系维护 · 左侧分类树', () => { test.describe('产品供应关系维护 · 左侧分类树', () => {
...@@ -20,74 +26,114 @@ test.describe('基础设置 · 产品管理', () => { ...@@ -20,74 +26,114 @@ test.describe('基础设置 · 产品管理', () => {
test.describe('产品供应关系维护 · 快捷筛选查询', () => { test.describe('产品供应关系维护 · 快捷筛选查询', () => {
test('PRODM-SUP-003 快捷区重置恢复默认', async ({ prodmSupplyPage }) => { test('PRODM-SUP-003 快捷区重置恢复默认', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.open(); await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.clickResetQuick(); await prodmSupplyPage.clickResetQuick();
await prodmSupplyPage.expectOnPage(); await prodmSupplyPage.expectOnPage();
}); });
test('PRODM-SUP-004 全量可见条件组合查询', async ({ prodmSupplyPage }) => { test('PRODM-SUP-004 全量可见条件组合查询', async ({ prodmSupplyPage }) => {
test.skip( await prodmSupplyPage.openWithDefaultTree();
true, const sample = await prodmSupplyPage.searchWithQuickAndDrawerCombo(
'组合查询须按页面配置 quickFields/drawerFields 实现 searchWithQuickAndDrawerCombo(对齐 center-report-sheet STAT-IOD-004),禁止临时启发式填表', prodmSupplyComboQuickFields,
prodmSupplyComboDrawerFields,
); );
await prodmSupplyPage.expectComboResultMatchesSample(sample, prodmSupplyComboAssertKeys);
}); });
}); });
test.describe('产品供应关系维护 · 列表', () => { test.describe('产品供应关系维护 · 列表', () => {
test('PRODM-SUP-005 列表核心列完整', async ({ prodmSupplyPage }) => { test('PRODM-SUP-005 列表核心列完整', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.open(); await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.assertConfiguredHeaders(); await prodmSupplyPage.assertConfiguredHeaders();
}); });
test('PRODM-SUP-008 列设置隐藏后再恢复', async ({ prodmSupplyPage }) => { test('PRODM-SUP-006 列设置隐藏后再恢复', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.open(); await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.clickQuery(); await prodmSupplyPage.clickQuery();
await prodmSupplyPage.executeColumnSettingsToggleRestoreTest(); await prodmSupplyPage.executeColumnSettingsToggleRestoreTest();
}); });
test('PRODM-SUP-009 物料名称列升序降序切换', async ({ prodmSupplyPage }) => { test('PRODM-SUP-007 物料编号列升序降序切换', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.open(); await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.expectColumnSortAscDesc('物料编号');
});
test('PRODM-SUP-008 物料名称列升序降序切换', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.expectColumnSortAscDesc('物料名称'); await prodmSupplyPage.expectColumnSortAscDesc('物料名称');
}); });
test('PRODM-SUP-010 横向滚动与列对齐', async ({ prodmSupplyPage }) => { test('PRODM-SUP-009 规格型号列升序降序切换', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.open(); await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.expectHorizontalScrollAlignment(); await prodmSupplyPage.expectColumnSortAscDesc('规格型号');
}); });
test('PRODM-SUP-011 无匹配空态(mock反例)', async ({ prodmSupplyPage }) => { test('PRODM-SUP-010 单位列升序降序切换', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.open(); await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.searchByMockKeyword(); await prodmSupplyPage.expectColumnSortAscDesc('单位');
const snap = await prodmSupplyPage.snapshotList();
expect(snap.rows === 0 || snap.emptyVisible, '无匹配应空态').toBeTruthy();
}); });
});
test.describe('产品供应关系维护 · 行内操作', () => { test('PRODM-SUP-011 耗材类型列升序降序切换', async ({ prodmSupplyPage }) => {
test('PRODM-SUP-006 行内「详情」可达(只读冒烟)', async ({ prodmSupplyPage }) => { await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.open(); await prodmSupplyPage.expectColumnSortAscDesc('耗材类型');
await prodmSupplyPage.rowActionSmoke('详情');
}); });
test('PRODM-SUP-007 行内「编辑」可达(只读冒烟)', async ({ prodmSupplyPage }) => { test('PRODM-SUP-012 采购单价列升序降序切换', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.open(); await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.rowActionSmoke('编辑'); await prodmSupplyPage.expectColumnSortAscDesc('采购单价');
});
test('PRODM-SUP-013 业务类型列升序降序切换', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.expectColumnSortAscDesc('业务类型');
});
test('PRODM-SUP-014 状态列升序降序切换', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.expectColumnSortAscDesc('状态');
});
test('PRODM-SUP-015 器械注册人列升序降序切换', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.expectColumnSortAscDesc('器械注册人');
});
test('PRODM-SUP-016 供应商列升序降序切换', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.expectColumnSortAscDesc('供应商');
});
test('PRODM-SUP-017 线上线下标记列升序降序切换', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.expectColumnSortAscDesc('线上线下标记');
});
test('PRODM-SUP-018 横向滚动与列对齐', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.expectHorizontalScrollAlignment();
});
test('PRODM-SUP-019 无匹配空态(mock反例)', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.searchByMockKeyword();
const snap = await prodmSupplyPage.snapshotList();
expect(snap.rows === 0 || snap.emptyVisible, '无匹配应空态').toBeTruthy();
}); });
}); });
test.describe('产品供应关系维护 · 分页', () => { test.describe('产品供应关系维护 · 分页', () => {
test('PRODM-SUP-012 有数据时总条数', async ({ prodmSupplyPage }) => { test('PRODM-SUP-020 有数据时总条数', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.open(); await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.assertTotalWhenHasData(); await prodmSupplyPage.assertTotalWhenHasData();
}); });
test('PRODM-SUP-013 切换至第 2 页', async ({ prodmSupplyPage }) => { test('PRODM-SUP-021 切换至第 2 页', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.open(); await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.goToPage2ForProdm(); await prodmSupplyPage.goToPage2ForProdm();
}); });
test('PRODM-SUP-014 切换20条每页页面正常且列表同步', async ({ prodmSupplyPage }) => { test('PRODM-SUP-022 切换20条每页页面正常且列表同步', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.open(); await prodmSupplyPage.openWithDefaultTree();
const { total, rowsBefore, rowsAfter } = await prodmSupplyPage.switchToPageSizeTwenty(); const { total, rowsBefore, rowsAfter } = await prodmSupplyPage.switchToPageSizeTwenty();
const expectedRows = Math.min(total, 20); const expectedRows = Math.min(total, 20);
expect(rowsAfter, '当前页行数应与 20 条/页及总条数一致').toBe(expectedRows); expect(rowsAfter, '当前页行数应与 20 条/页及总条数一致').toBe(expectedRows);
...@@ -99,9 +145,9 @@ test.describe('基础设置 · 产品管理', () => { ...@@ -99,9 +145,9 @@ test.describe('基础设置 · 产品管理', () => {
}); });
test.describe('产品供应关系维护 · 导出', () => { test.describe('产品供应关系维护 · 导出', () => {
test('PRODM-SUP-015 当前查询条件下导出', async ({ prodmSupplyPage }) => { test('PRODM-SUP-023 首行样本查询后导出', async ({ prodmSupplyPage }) => {
await prodmSupplyPage.open(); await prodmSupplyPage.openWithDefaultTree();
await prodmSupplyPage.clickExportIfVisible(); await prodmSupplyPage.exportAfterQueryByFirstRowSample();
}); });
}); });
......
...@@ -93,9 +93,9 @@ test.describe('基础设置 · 产品管理', () => { ...@@ -93,9 +93,9 @@ test.describe('基础设置 · 产品管理', () => {
}); });
test.describe('院区单元包设置 · 导出', () => { test.describe('院区单元包设置 · 导出', () => {
test('PRODM-UPK-014 当前查询条件下导出', async ({ prodmUnitPkgPage }) => { test('PRODM-UPK-014 首行样本查询后导出', async ({ prodmUnitPkgPage }) => {
await prodmUnitPkgPage.open(); await prodmUnitPkgPage.open();
await prodmUnitPkgPage.clickExportIfVisible(); await prodmUnitPkgPage.exportAfterQueryByFirstRowSample();
}); });
}); });
......
...@@ -48,7 +48,7 @@ for (const tabCase of vendorQualSyncTabs) { ...@@ -48,7 +48,7 @@ for (const tabCase of vendorQualSyncTabs) {
await vendorQualPage.resetClearsSupplierFilterAfterFill(tabCase); await vendorQualPage.resetClearsSupplierFilterAfterFill(tabCase);
}); });
test(`${caseIds.export} ${tab}·查询后导出无报错`, async ({ vendorQualPage }) => { test(`${caseIds.export} ${tab}·首行样本查询后导出`, async ({ vendorQualPage }) => {
await vendorQualPage.exportAfterQueryWithFirstRow(tabCase); await vendorQualPage.exportAfterQueryWithFirstRow(tabCase);
}); });
......
...@@ -26,7 +26,7 @@ test.describe('基础设置 · 厂商管理', () => { ...@@ -26,7 +26,7 @@ test.describe('基础设置 · 厂商管理', () => {
await vendorQualPage.resetClearsSupplierFilterAfterFill(); await vendorQualPage.resetClearsSupplierFilterAfterFill();
}); });
test('VENDOR-QUL-004 查询后导出无报错', async ({ vendorQualPage }) => { test('VENDOR-QUL-004 首行样本查询后导出', async ({ vendorQualPage }) => {
await vendorQualPage.exportAfterQueryWithFirstRow(); await vendorQualPage.exportAfterQueryWithFirstRow();
}); });
......
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