Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-playwright-web-spd
Commits
97840769
Commit
97840769
authored
Nov 06, 2026
by
liguangyu06
Browse files
新增期初管理全链路自动化资产,并加固产品管理用例与清理冗余截图。
紧急放行原因:用户要求立即推送今日改动备份,门禁用例待后续补跑。
parent
3dbf401d
Changes
266
Hide whitespace changes
Inline
Side-by-side
tests/spd/prodm-stockout-detail.spec.ts
View file @
97840769
...
@@ -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
.
clickExportIfVisib
le
();
await
prodmStockoutDetailPage
.
exportAfterQueryByFirstRowSamp
le
();
});
});
});
});
...
...
tests/spd/prodm-stockout.spec.ts
View file @
97840769
...
@@ -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
.
clickExportIfVisib
le
();
await
prodmStockoutPage
.
exportAfterQueryByFirstRowSamp
le
();
});
});
});
});
...
...
tests/spd/prodm-supply.spec.ts
View file @
97840769
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
.
open
WithDefaultTree
();
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
.
open
WithDefaultTree
();
await
prodmSupplyPage
.
assertConfiguredHeaders
();
await
prodmSupplyPage
.
assertConfiguredHeaders
();
});
});
test
(
'
PRODM-SUP-00
8
列设置隐藏后再恢复
'
,
async
({
prodmSupplyPage
})
=>
{
test
(
'
PRODM-SUP-00
6
列设置隐藏后再恢复
'
,
async
({
prodmSupplyPage
})
=>
{
await
prodmSupplyPage
.
open
();
await
prodmSupplyPage
.
open
WithDefaultTree
();
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-0
10 横向滚动与列对齐
'
,
async
({
prodmSupplyPage
})
=>
{
test
(
'
PRODM-SUP-0
09 规格型号列升序降序切换
'
,
async
({
prodmSupplyPage
})
=>
{
await
prodmSupplyPage
.
open
();
await
prodmSupplyPage
.
open
WithDefaultTree
();
await
prodmSupplyPage
.
expect
HorizontalScrollAlignment
(
);
await
prodmSupplyPage
.
expect
ColumnSortAscDesc
(
'
规格型号
'
);
});
});
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-0
1
2 有数据时总条数
'
,
async
({
prodmSupplyPage
})
=>
{
test
(
'
PRODM-SUP-02
0
有数据时总条数
'
,
async
({
prodmSupplyPage
})
=>
{
await
prodmSupplyPage
.
open
();
await
prodmSupplyPage
.
open
WithDefaultTree
();
await
prodmSupplyPage
.
assertTotalWhenHasData
();
await
prodmSupplyPage
.
assertTotalWhenHasData
();
});
});
test
(
'
PRODM-SUP-01
3
切换至第 2 页
'
,
async
({
prodmSupplyPage
})
=>
{
test
(
'
PRODM-SUP-0
2
1 切换至第 2 页
'
,
async
({
prodmSupplyPage
})
=>
{
await
prodmSupplyPage
.
open
();
await
prodmSupplyPage
.
open
WithDefaultTree
();
await
prodmSupplyPage
.
goToPage2ForProdm
();
await
prodmSupplyPage
.
goToPage2ForProdm
();
});
});
test
(
'
PRODM-SUP-0
14
切换20条每页页面正常且列表同步
'
,
async
({
prodmSupplyPage
})
=>
{
test
(
'
PRODM-SUP-0
22
切换20条每页页面正常且列表同步
'
,
async
({
prodmSupplyPage
})
=>
{
await
prodmSupplyPage
.
open
();
await
prodmSupplyPage
.
open
WithDefaultTree
();
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-0
15 当前查询条件下
导出
'
,
async
({
prodmSupplyPage
})
=>
{
test
(
'
PRODM-SUP-0
23 首行样本查询后
导出
'
,
async
({
prodmSupplyPage
})
=>
{
await
prodmSupplyPage
.
open
();
await
prodmSupplyPage
.
open
WithDefaultTree
();
await
prodmSupplyPage
.
clickExportIfVisib
le
();
await
prodmSupplyPage
.
exportAfterQueryByFirstRowSamp
le
();
});
});
});
});
...
...
tests/spd/prodm-unit-pkg.spec.ts
View file @
97840769
...
@@ -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
.
clickExportIfVisib
le
();
await
prodmUnitPkgPage
.
exportAfterQueryByFirstRowSamp
le
();
});
});
});
});
...
...
tests/spd/vendor-qual-sync-tabs.spec.ts
View file @
97840769
...
@@ -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
);
});
});
...
...
tests/spd/vendor-qual.spec.ts
View file @
97840769
...
@@ -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
();
});
});
...
...
Prev
1
…
10
11
12
13
14
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment