Commit 2d26844c authored by liguangyu06's avatar liguangyu06
Browse files

同步基础管理/报表用例与登录态稳定性修复

修复 auth 写入锁 stale PID 导致 setup 空等超时;主辅账号 setup 串行并延长超时,login 依赖 setup。同步用户/厂商/准入等 CSV·MD·spec·PO,移除 stat 调试 spec,补充离线全量脚本与 gate-stamp 目录哈希修复。
parent 45178f79
import { test } from '../../fixtures';
/**
* STAT-NES-007 快捷维度与高级全量条件组合查询(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-net-entry.stat-nes-007.spec.ts \
* --headed --project=chromium --workers=1
*
* 或:npm run test:stat-nes-007
* (PWDEBUG=console 确保执行完毕后在 Playwright Inspector 暂停)
*/
test.describe('净入库汇总查询 · STAT-NES-007', () => {
test('STAT-NES-007 快捷维度与高级全量条件组合查询', async ({ centerReportNetEntryPage, page }) => {
await centerReportNetEntryPage.open();
const sample = await centerReportNetEntryPage.searchWithAllConditions();
await centerReportNetEntryPage.expectCombinedFilterResult(sample);
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-NOS-007 快捷维度与高级全量条件组合查询(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-net-out.stat-nos-007.spec.ts \
* --headed --project=chromium --workers=1
*
* 或:npm run test:stat-nos-007
* (PWDEBUG=console 确保执行完毕后在 Playwright Inspector 暂停)
*/
test.describe('净出库汇总查询 · STAT-NOS-007', () => {
test('STAT-NOS-007 快捷维度与高级全量条件组合查询', async ({ centerReportNetOutPage, page }) => {
await centerReportNetOutPage.open();
const sample = await centerReportNetOutPage.searchWithAllConditions();
await centerReportNetOutPage.expectCombinedFilterResult(sample);
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-OOS-004 全量查询条件组合查询(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-out.stat-oos-004.spec.ts \
* --headed --project=chromium --workers=1
*
* 或:npm run test:stat-oos-004
*/
test.describe('出库汇总查询 · STAT-OOS-004', () => {
test('STAT-OOS-004 全量查询条件组合查询', async ({ centerReportOutPage, page }) => {
await centerReportOutPage.open();
const sample = await centerReportOutPage.searchWithAllConditions();
await centerReportOutPage.expectCombinedFilterResult(sample);
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-OOS-006 查询后底部汇总与查询数据一致(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-out.stat-oos-006.spec.ts \
* --headed --project=chromium --workers=1
*
* 或:npm run test:stat-oos-006
*/
test.describe('出库汇总查询 · STAT-OOS-006', () => {
test('STAT-OOS-006 查询后底部汇总与查询数据一致', async ({ centerReportOutPage, page }) => {
await centerReportOutPage.open();
await centerReportOutPage.expectSummaryMatchesSampleRow();
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-PSI-004 全量查询条件组合查询(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-psi.stat-psi-004.spec.ts \
* --headed --project=chromium --workers=1
*
* 或:npm run test:stat-psi-004
* (PWDEBUG=console 确保执行完毕后在 Playwright Inspector 暂停)
*/
test.describe('中心库产品进销存 · STAT-PSI-004', () => {
test('STAT-PSI-004 全量查询条件组合查询', async ({ centerReportPsiPage, page }) => {
await centerReportPsiPage.open();
const sample = await centerReportPsiPage.searchWithAllConditions();
await centerReportPsiPage.expectCombinedFilterResult(sample);
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-IOD-002 点击高级筛选打开抽屉(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-sheet.stat-iod-002.spec.ts \
* --headed --project=chromium --workers=1
*/
test.describe('出入库明细查询 · STAT-IOD-002', () => {
test('STAT-IOD-002 点击高级筛选打开抽屉', async ({ centerReportSheetPage, page }) => {
await centerReportSheetPage.open();
await centerReportSheetPage.openAdvancedFilter();
await centerReportSheetPage.expectAdvancedDrawer();
await page.pause();
});
});
import { test } from '../../fixtures';
import { centerReportSheetData } from '../../data/center-report-sheet.data';
/**
* STAT-IOD-003 抽屉内重置恢复抽屉字段默认(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-sheet.stat-iod-003.spec.ts \
* --headed --project=chromium --workers=1
*/
test.describe('出入库明细查询 · STAT-IOD-003', () => {
test('STAT-IOD-003 抽屉内重置恢复抽屉字段默认', async ({ centerReportSheetPage, page }) => {
await centerReportSheetPage.open();
const sample = await centerReportSheetPage.searchAndExtractSample();
await centerReportSheetPage.openAdvancedFilter();
const batchNo = sample.batchNo ?? centerReportSheetData.mockBatchNo;
await centerReportSheetPage.fillBatchNo(batchNo);
await centerReportSheetPage.resetAdvancedDrawer();
await centerReportSheetPage.openAdvancedFilter();
await centerReportSheetPage.expectDrawerBatchNoEmpty();
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-IOD-004 全量查询条件组合查询(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-sheet.stat-iod-004.spec.ts \
* --headed --project=chromium --workers=1
*/
test.describe('出入库明细查询 · STAT-IOD-004', () => {
test('STAT-IOD-004 全量查询条件组合查询', async ({ centerReportSheetPage, page }) => {
await centerReportSheetPage.open();
const sample = await centerReportSheetPage.searchWithAllConditions();
await centerReportSheetPage.expectCombinedFilterResult(sample);
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-IOD-006 选择首行后底部汇总与首行指标一致(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-sheet.stat-iod-006.spec.ts \
* --headed --project=chromium --workers=1
*/
test.describe('出入库明细查询 · STAT-IOD-006', () => {
test('STAT-IOD-006 选择首行后底部汇总与首行指标一致', async ({ centerReportSheetPage, page }) => {
await centerReportSheetPage.open();
await centerReportSheetPage.expectSummaryMatchesSampleRow();
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-IOD-011 备注列升序降序切换(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-sheet.stat-iod-011.spec.ts \
* --headed --project=chromium --workers=1
*/
test.describe('出入库明细查询 · STAT-IOD-011', () => {
test('STAT-IOD-011 备注列升序降序切换', async ({ centerReportSheetPage, page }) => {
await centerReportSheetPage.open();
await centerReportSheetPage.search();
await centerReportSheetPage.expectColumnSortToggle('备注');
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-IOD-015 院区名称列升序降序切换(调试/演示专用)
*
* 前置条件:
* - 测试环境可访问;test_1 已登录并进入报表页;已默认查询且列表至少有 2 条数据
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-sheet.stat-iod-015.spec.ts \
* --headed --project=chromium --workers=1
*/
test.describe('出入库明细查询 · STAT-IOD-015', () => {
test('STAT-IOD-015 院区名称列升序降序切换', async ({ centerReportSheetPage, page }) => {
await centerReportSheetPage.open();
await centerReportSheetPage.search();
await centerReportSheetPage.expectColumnSortToggle('院区名称');
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-IOD-039 列设置取消勾选后列表列隐藏(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-sheet.stat-iod-041.spec.ts \
* --headed --project=chromium --workers=1
*/
test.describe('出入库明细查询 · STAT-IOD-039', () => {
test('STAT-IOD-039 列设置取消勾选后再勾选列表列恢复', async ({ centerReportSheetPage, page }) => {
await centerReportSheetPage.open();
await centerReportSheetPage.search();
await centerReportSheetPage.executeColumnSettingsToggleRestoreTest();
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-IOD-041 切换至第2页(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-sheet.stat-iod-043.spec.ts \
* --headed --project=chromium --workers=1
*/
test.describe('出入库明细查询 · STAT-IOD-041', () => {
test('STAT-IOD-041 切换至第2页', async ({ centerReportSheetPage, page }) => {
await centerReportSheetPage.open();
await centerReportSheetPage.search();
await centerReportSheetPage.executePage2SwitchTest();
await page.pause();
});
});
import { test } from '../../fixtures';
import { centerReportSheetData } from '../../data/center-report-sheet.data';
/**
* STAT-IOD-042 切换每页条数(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-sheet.stat-iod-043.spec.ts \
* --headed --project=chromium --workers=1
*
* 或:npm run test:stat-iod-044
*/
test.describe('出入库明细查询 · STAT-IOD-042', () => {
test('STAT-IOD-042 切换每页条数', async ({ centerReportSheetPage, page }) => {
await centerReportSheetPage.open();
await centerReportSheetPage.search();
const { paginationPageSizeFrom, paginationPageSizeTo } = centerReportSheetData;
await centerReportSheetPage.executePageSizeChangeTest(paginationPageSizeFrom, paginationPageSizeTo, 100);
await centerReportSheetPage.expectPaginationTotal();
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-IOD-043 按当前查询条件导出文件(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-sheet.stat-iod-044.spec.ts \
* --headed --project=chromium --workers=1
*/
test.describe('出入库明细查询 · STAT-IOD-043', () => {
test('STAT-IOD-043 按当前查询条件导出文件', async ({ centerReportSheetPage, page }) => {
await centerReportSheetPage.open();
await centerReportSheetPage.search();
await centerReportSheetPage.expectPaginationTotal();
await centerReportSheetPage.exportReport();
await page.pause();
});
});
import { test } from '../../fixtures';
/**
* STAT-PTR-002 统计周期院区产品组合查询(调试/演示专用)
*
* 运行示例:
* SLOW_MO=500 npx playwright test tests/spd/center-report-turnover.stat-ptr-002.spec.ts \
* --headed --project=chromium --workers=1
*
* 或:npm run test:stat-ptr-002
*/
test.describe('产品周转率报表 · STAT-PTR-002', () => {
test('STAT-PTR-002 统计周期院区产品组合查询', async ({ centerReportTurnoverPage, page }) => {
await centerReportTurnoverPage.open();
const sample = await centerReportTurnoverPage.searchAndExtractSample();
const campus = await centerReportTurnoverPage.getQuickSelectValue('院区名称');
if (campus) {
sample.campus = campus;
}
await centerReportTurnoverPage.searchWithCombinedQuickFilters(sample);
await centerReportTurnoverPage.expectCombinedFilterResult(sample);
await page.pause();
});
});
import { test } from '../../fixtures';
import { standardProductNameDateSyncFields } from '../../data/dept-report-field-defs';
import { deptReportEntryData } from '../../data/dept-report-entry.data';
import {
deptReportEntryComboAssertKeys,
......@@ -62,6 +63,21 @@ test.describe('科室入库汇总查询 · 高级筛选', () => {
await deptReportEntryPage.expectRowContainsSampleFields(sample, deptReportEntryComboAssertKeys);
await deptReportEntryPage.expectSummaryVisible();
});
test('STAT-DES-005 快捷区条件自动带入高级筛选', async ({ deptReportEntryPage }) => {
const sample = await deptReportEntryPage.searchAndExtractSample();
const quickFields = deptReportEntryComboQuickFields.filter(
(field) => field.key === 'productName' || field.key === 'accountDate',
);
await deptReportEntryPage.applyQuickFields(sample, quickFields, { onlyIfPresent: true });
await deptReportEntryPage.search();
await deptReportEntryPage.openAdvancedFilter();
await deptReportEntryPage.expectAdvancedDrawerSyncedFromQuick(
sample,
quickFields,
standardProductNameDateSyncFields,
);
});
});
test.describe('科室入库汇总查询 · 主表列表与汇总', () => {
......@@ -84,6 +100,11 @@ test.describe('科室入库汇总查询 · 主表列表与汇总', () => {
await deptReportEntryPage.searchWithMockFromConfig();
await deptReportEntryPage.expectEmptyList();
});
test('STAT-DES-010 列表横向拖拉滚动与列对齐正常', async ({ deptReportEntryPage }) => {
await deptReportEntryPage.search();
await deptReportEntryPage.expectTableHorizontalScrollAndLayout();
});
});
test.describe('科室入库汇总查询 · 列设置', () => {
......
import { test } from '../../fixtures';
import { deptReportLmmSheetData } from '../../data/dept-report-lmm-sheet.data';
import { deptLmmMaterialSyncFields } from '../../data/dept-report-field-defs';
import {
deptReportLmmSheetComboAssertKeys,
deptReportLmmSheetComboDrawerFields,
......@@ -45,6 +46,20 @@ test.describe('科室出入库明细查询(后勤)', () => {
await deptReportLmmSheetPage.expectDrawerTextEmpty('单号');
});
test('STAT-DLS-005 快捷区条件自动带入高级筛选', async ({ deptReportLmmSheetPage }) => {
const sample = await deptReportLmmSheetPage.searchAndExtractSample();
await deptReportLmmSheetPage.applyQuickFields(sample, deptReportLmmSheetComboQuickFields, {
onlyIfPresent: true,
});
await deptReportLmmSheetPage.search();
await deptReportLmmSheetPage.openAdvancedFilter();
await deptReportLmmSheetPage.expectAdvancedDrawerSyncedFromQuick(
sample,
deptReportLmmSheetComboQuickFields,
deptLmmMaterialSyncFields,
);
});
test('STAT-DLS-006 快捷与高级组合查询', async ({ deptReportLmmSheetPage }) => {
const sample = await deptReportLmmSheetPage.searchWithQuickAndDrawerCombo(
deptReportLmmSheetComboQuickFields,
......
import { test } from '../../fixtures';
import { standardProductNameDateSyncFields } from '../../data/dept-report-field-defs';
import { deptReportOutData } from '../../data/dept-report-out.data';
import {
deptReportOutComboAssertKeys,
......@@ -63,6 +64,21 @@ test.describe('科室出库汇总查询 · 高级筛选', () => {
await deptReportOutPage.expectRowContainsSampleFields(sample, deptReportOutComboAssertKeys);
await deptReportOutPage.expectSummaryVisible();
});
test('STAT-DOS-005 快捷区条件自动带入高级筛选', async ({ deptReportOutPage }) => {
const sample = await deptReportOutPage.searchAndExtractSample();
const quickFields = deptReportOutComboQuickFields.filter(
(field) => field.key === 'productName' || field.key === 'accountDate',
);
await deptReportOutPage.applyQuickFields(sample, quickFields, { onlyIfPresent: true });
await deptReportOutPage.search();
await deptReportOutPage.openAdvancedFilter();
await deptReportOutPage.expectAdvancedDrawerSyncedFromQuick(
sample,
quickFields,
standardProductNameDateSyncFields,
);
});
});
test.describe('科室出库汇总查询 · 主表列表与汇总', () => {
......@@ -85,6 +101,11 @@ test.describe('科室出库汇总查询 · 主表列表与汇总', () => {
await deptReportOutPage.searchWithMockFromConfig();
await deptReportOutPage.expectEmptyList();
});
test('STAT-DOS-010 列表横向拖拉滚动与列对齐正常', async ({ deptReportOutPage }) => {
await deptReportOutPage.search();
await deptReportOutPage.expectTableHorizontalScrollAndLayout();
});
});
test.describe('科室出库汇总查询 · 列设置', () => {
......
import { expect, test } from '../../fixtures';
import { deptReportPsiData } from '../../data/dept-report-psi.data';
import { deptReportPsiSyncFields } from '../../data/dept-report-field-defs';
import {
deptReportPsiComboAssertKeys,
deptReportPsiComboDrawerFields,
......@@ -41,6 +42,18 @@ test.describe('科室产品进销存', () => {
await deptReportPsiPage.expectRowContainsSampleFields(sample, deptReportPsiComboAssertKeys);
});
test('STAT-DPS-005 快捷区条件自动带入高级筛选', async ({ deptReportPsiPage }) => {
const sample = await deptReportPsiPage.searchAndExtractSample();
await deptReportPsiPage.applyQuickFields(sample, deptReportPsiComboQuickFields, { onlyIfPresent: true });
await deptReportPsiPage.search();
await deptReportPsiPage.openAdvancedFilter();
await deptReportPsiPage.expectAdvancedDrawerSyncedFromQuick(
sample,
deptReportPsiComboQuickFields,
deptReportPsiSyncFields,
);
});
test('STAT-DPS-006 抽屉内重置', async ({ deptReportPsiPage }) => {
await deptReportPsiPage.openAdvancedFilter();
await deptReportPsiPage.fillDrawerTextByLabel('规格型号', 'MOCK-SPEC-001');
......
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