Commit e6617b87 authored by liguangyu06's avatar liguangyu06
Browse files

报表 iframe 加载失败时重试,并将超时提到 120 秒,避免 smoke 被慢页误杀。

parent 47d4aecf
import type { FrameLocator, Locator, Page } from '@playwright/test';
import { COLUMN_SETTINGS_TRIGGER_CSS } from './center-report-shared.locator';
/** 中心库出入库报表 - 入库汇总查询(iframe 内报表区)。 */
export class CenterReportEntryLocators {
readonly report: FrameLocator;
......@@ -59,7 +61,7 @@ export class CenterReportEntryLocators {
this.supplierInput = this.report.locator('.ant-drawer-open #form_item_provName');
this.firstExpandIcon = this.report.locator('.ant-table-row-expand-icon').first();
this.expandedRow = this.report.locator('.ant-table-expanded-row').first();
this.columnSettingsTrigger = this.report.locator('.anticon-setting').first();
this.columnSettingsTrigger = this.report.locator(COLUMN_SETTINGS_TRIGGER_CSS).first();
this.accountDateStart = this.report.getByPlaceholder('开始时间');
this.branchIdSelect = this.report.locator('#form_item_branchId');
}
......
......@@ -17,6 +17,13 @@ export type CenterReportLocatorOptions = {
* 运行时定位器(测试真正使用的实现)。
* `locators/spd/*.locator.yaml` 是扫描/文档产物,不在运行时加载;改选择器请改本类或对应 `*.locator.ts`。
*/
/** 报表 iframe 内列设置齿轮(ProTable 工具栏 / anticon / img)。不要用顶层 page,以免点到 SPD 壳页设置。 */
export const COLUMN_SETTINGS_TRIGGER_CSS =
'.ant-pro-table-list-toolbar-setting-item, .anticon-setting, [aria-label="setting"], [alt="setting"]';
export const COLUMN_SETTINGS_TRIGGER_XPATH =
'contains(@class,"ant-pro-table-list-toolbar-setting") or contains(@class,"anticon-setting") or @aria-label="setting" or @alt="setting"';
/** 中心库统计报表 iframe 内通用定位器(按页面传入 iframe 片段与表单选择器)。 */
export class CenterReportSharedLocators {
readonly report: FrameLocator;
......@@ -126,24 +133,28 @@ export class CenterReportSharedLocators {
}
/**
* 列设置齿轮:在表格工具栏(导出/打印旁),常与 `.ant-table-wrapper` 为兄弟节点
* 兼容 `span.anticon-setting`、`img[alt=setting]`、`aria-label=setting`
* 列设置齿轮:优先表工具栏(导出旁或 wrapper 兄弟),无导出按钮的异常分析页走 ProTable / iframe 内齿轮
* 只在 `this.report`(iframe)内查找,避免点到 SPD 壳页设置
*/
columnSettingsTriggerForTable(tableWrapperIndex: number): Locator {
const wrapper = this.report.locator('.ant-table-wrapper').nth(tableWrapperIndex);
const toolbarSibling = wrapper
.locator(
'xpath=ancestor::*[.//table][1]/preceding-sibling::*//*[contains(@class,"anticon-setting") or @aria-label="setting" or @alt="setting"]',
)
.locator(`xpath=ancestor::*[.//table][1]/preceding-sibling::*//*[${COLUMN_SETTINGS_TRIGGER_XPATH}]`)
.last();
const exportBar = wrapper
.locator(
'xpath=ancestor::*[.//button[contains(normalize-space(.),"导") or contains(normalize-space(.),"打")]][1]//*[contains(@class,"anticon-setting") or @aria-label="setting" or @alt="setting"]',
`xpath=ancestor::*[.//button[contains(normalize-space(.),"导") or contains(normalize-space(.),"打")]][1]//*[${COLUMN_SETTINGS_TRIGGER_XPATH}]`,
)
.last();
const inline = wrapper.locator('.anticon-setting, [aria-label="setting"], [alt="setting"]').first();
// 勿回落到 iframe 全局 nth(setting),易误点顶栏齿轮而非本表列设置。
return toolbarSibling.or(exportBar).or(inline);
const siblingToolbar = wrapper
.locator(`xpath=preceding-sibling::*//*[${COLUMN_SETTINGS_TRIGGER_XPATH}]`)
.last();
const parentToolbar = wrapper
.locator(`xpath=parent::*//*[${COLUMN_SETTINGS_TRIGGER_XPATH}]`)
.last();
const inline = wrapper.locator(COLUMN_SETTINGS_TRIGGER_CSS).first();
const inReport = this.report.locator(COLUMN_SETTINGS_TRIGGER_CSS).nth(tableWrapperIndex);
return toolbarSibling.or(exportBar).or(siblingToolbar).or(parentToolbar).or(inline).or(inReport);
}
quickFormItem(label: string): Locator {
......
import type { FrameLocator, Locator, Page } from '@playwright/test';
import { COLUMN_SETTINGS_TRIGGER_CSS } from './center-report-shared.locator';
/** 中心库出入库报表 - 出入库明细查询(iframe 内报表区)。 */
export class CenterReportSheetLocators {
readonly report: FrameLocator;
......@@ -51,7 +53,7 @@ export class CenterReportSheetLocators {
this.accountDateStart = this.report.getByPlaceholder('开始时间');
this.accountDateEnd = this.report.getByPlaceholder('截止时间');
/** 表格右上角列设置(齿轮 setting 图标) */
this.columnSettingsTrigger = this.report.locator('.anticon-setting').first();
this.columnSettingsTrigger = this.report.locator(COLUMN_SETTINGS_TRIGGER_CSS).first();
/** 表格密度 column-height 图标 */
this.tableDensityTrigger = this.report.getByLabel('column-height');
}
......
......@@ -17,6 +17,7 @@ import {
findUsableColumnSettingsTrigger,
revealColumnSettingsTriggerByScroll,
} from './helpers/column-settings.helper';
import { retryReportLoad } from './helpers/report-load-retry.helper';
import { TableScrollLayoutControls } from './helpers/table-scroll-layout.helper';
import { DownloadCenterComponent } from '../components/download-center.component';
import {
......@@ -92,10 +93,20 @@ export class CenterReportEntryPage extends BasePage {
}
async expectLoaded(): Promise<void> {
await this.waitVisible(this.locators.productName, 30_000);
await this.waitVisible(this.locators.searchBtn);
await this.waitVisible(this.locators.advancedFilter);
await this.assertPageHealthy('页面加载完成');
await retryReportLoad(
async () => {
await this.page
.locator('iframe[src*="centerPages/entry"]')
.first()
.waitFor({ state: 'attached', timeout: timeouts.pageReady });
await this.waitVisible(this.locators.productName, timeouts.pageReady);
await this.waitVisible(this.locators.searchBtn);
await this.waitVisible(this.locators.advancedFilter);
await this.assertPageHealthy('页面加载完成');
},
() => this.goto(CENTER_REPORT_ENTRY_PATH),
(ms) => this.page.waitForTimeout(ms),
);
}
async search(): Promise<void> {
......
......@@ -12,7 +12,11 @@ import {
waitSearchButtonIdle,
waitUntilNotLoading,
} from '../../core/smart-wait';
import { CenterReportSharedLocators } from '../../locators/spd/center-report-shared.locator';
import {
CenterReportSharedLocators,
COLUMN_SETTINGS_TRIGGER_CSS,
} from '../../locators/spd/center-report-shared.locator';
import { retryReportLoad } from './helpers/report-load-retry.helper';
import { DrawerFormControls } from './helpers/drawer-form-controls.helper';
import { ColumnSortControls, isColumnValuesSorted, type ColumnSortOrder } from './helpers/column-sort.helper';
import {
......@@ -287,24 +291,11 @@ export class CenterReportSharedPage extends BasePage {
await this.assertPageHealthy('页面加载完成');
};
const maxAttempts = 3;
let lastError: unknown;
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
try {
await loadOnce();
return;
} catch (error) {
lastError = error;
const msg = error instanceof Error ? error.message : String(error);
const env503 = /503|herpService|SERVICE_UNAVAILABLE/.test(msg);
if (!env503 || attempt === maxAttempts) {
throw error;
}
await this.page.waitForTimeout(5_000 * attempt);
await this.goto(this.data.reportPath);
}
}
throw lastError;
await retryReportLoad(
loadOnce,
() => this.goto(this.data.reportPath),
(ms) => this.page.waitForTimeout(ms),
);
}
async search(): Promise<void> {
......@@ -3198,11 +3189,11 @@ export class CenterReportSharedPage extends BasePage {
);
return [
this.locators.columnSettingsTriggerForTable(tableWrapperIndex),
exportToolbar.locator('[alt="setting"], .anticon-setting, [aria-label="setting"]').last(),
wrapper
.locator('xpath=preceding-sibling::*[1]')
.locator('[alt="setting"], .anticon-setting, [aria-label="setting"]')
.last(),
exportToolbar.locator(COLUMN_SETTINGS_TRIGGER_CSS).last(),
wrapper.locator('xpath=preceding-sibling::*').locator(COLUMN_SETTINGS_TRIGGER_CSS).last(),
wrapper.locator('xpath=parent::*').locator(COLUMN_SETTINGS_TRIGGER_CSS).last(),
this.locators.report.locator('.ant-pro-table-list-toolbar').nth(tableWrapperIndex).locator(COLUMN_SETTINGS_TRIGGER_CSS).last(),
this.locators.report.locator(COLUMN_SETTINGS_TRIGGER_CSS).nth(tableWrapperIndex),
];
}
......
......@@ -13,6 +13,7 @@ import {
findUsableColumnSettingsTrigger,
revealColumnSettingsTriggerByScroll,
} from './helpers/column-settings.helper';
import { retryReportLoad } from './helpers/report-load-retry.helper';
import { TableScrollLayoutControls } from './helpers/table-scroll-layout.helper';
import {
detailSheetSummaryMatch,
......@@ -107,10 +108,20 @@ export class CenterReportSheetPage extends BasePage {
}
async expectLoaded(): Promise<void> {
await this.waitVisible(this.locators.productName, 30_000);
await this.waitVisible(this.locators.searchBtn);
await this.waitVisible(this.locators.advancedFilter);
await this.assertPageHealthy('页面加载完成');
await retryReportLoad(
async () => {
await this.page
.locator('iframe[src*="centerPages/sheet"]')
.first()
.waitFor({ state: 'attached', timeout: timeouts.pageReady });
await this.waitVisible(this.locators.productName, timeouts.pageReady);
await this.waitVisible(this.locators.searchBtn);
await this.waitVisible(this.locators.advancedFilter);
await this.assertPageHealthy('页面加载完成');
},
() => this.goto(CENTER_REPORT_SHEET_PATH),
(ms) => this.page.waitForTimeout(ms),
);
}
async expectTitle(): Promise<void> {
......
/** FineReport iframe 首次打开常超时或 503,加载失败后重新进页再等。 */
const RETRYABLE_LOAD =
/503|herpService|SERVICE_UNAVAILABLE|Timeout|iframe\[src|waiting for locator|not attached/i;
export async function retryReportLoad(
loadOnce: () => Promise<void>,
reload: () => Promise<void>,
wait: (ms: number) => Promise<void>,
maxAttempts = 3,
): Promise<void> {
let lastError: unknown;
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
try {
await loadOnce();
return;
} catch (error) {
lastError = error;
const msg = error instanceof Error ? error.message : String(error);
if (!RETRYABLE_LOAD.test(msg) || attempt === maxAttempts) {
throw error;
}
await wait(3_000 * attempt);
await reload();
}
}
throw lastError;
}
......@@ -37,7 +37,7 @@ export function describeWithReuseOpen<T extends ReuseOpenReport>(
test.describe(title, () => {
test.describe.configure({
mode: 'default',
...(title.includes('列设置') ? { timeout: 120_000 } : {}),
timeout: 120_000,
});
let page: Page;
......@@ -49,6 +49,7 @@ export function describeWithReuseOpen<T extends ReuseOpenReport>(
};
test.beforeAll(async ({ browser }) => {
test.setTimeout(120_000);
({ page, report } = await createReusedReportSession(browser, factory, options));
});
......
......@@ -2,6 +2,7 @@ import { expect, test, type Locator, type Page } from '@playwright/test';
import { waitUiSettle } from '../../core/smart-wait';
import { opsCheckData } from '../../data/ops-check.data';
import { COLUMN_SETTINGS_TRIGGER_XPATH } from '../../locators/spd/center-report-shared.locator';
import { ReconCostReportSharedPage } from './recon-cost-report-shared.page';
import {
findUsableColumnSettingsTrigger,
......@@ -109,18 +110,14 @@ export class OpsCheckPage extends ReconCostReportSharedPage {
const block = this.sectionBlock(sectionTitle);
const wrapperIndex = this.sectionWrapperIndex(sectionTitle);
return block
.locator(
'xpath=.//*[contains(@class,"anticon-setting") or @aria-label="setting" or @alt="setting"]',
)
.locator(`xpath=.//*[${COLUMN_SETTINGS_TRIGGER_XPATH}]`)
.last()
.or(block.locator(`xpath=preceding-sibling::*//*[${COLUMN_SETTINGS_TRIGGER_XPATH}]`).last())
.or(
block.locator(
'xpath=preceding-sibling::*//*[contains(@class,"anticon-setting") or @aria-label="setting"]',
).last(),
this.sectionTitleNode(sectionTitle).locator(
`xpath=ancestor::div[.//*[${COLUMN_SETTINGS_TRIGGER_XPATH}]][1]//*[${COLUMN_SETTINGS_TRIGGER_XPATH}][last()]`,
),
)
.or(this.sectionTitleNode(sectionTitle).locator(
'xpath=ancestor::div[.//span[contains(@class,"anticon-setting") or @aria-label="setting"]][1]//*[contains(@class,"anticon-setting") or @aria-label="setting"][last()]',
))
.or(this.locators.report.getByRole('img', { name: 'setting' }).nth(wrapperIndex));
}
......
......@@ -13,6 +13,7 @@ import {
* 运行:npm run test:ana-chg
*/
test.describe('调价统计报表 · 快捷筛选查询', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ anaChgPage }) => {
await anaChgPage.open();
});
......@@ -24,6 +25,7 @@ test.describe('调价统计报表 · 快捷筛选查询', () => {
});
test.describe('调价统计报表 · 高级筛选抽屉', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ anaChgPage }) => {
await anaChgPage.open();
});
......@@ -63,6 +65,7 @@ test.describe('调价统计报表 · 高级筛选抽屉', () => {
});
test.describe('调价统计报表 · 主表列表与汇总', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ anaChgPage }) => {
await anaChgPage.open();
await anaChgPage.search();
......@@ -93,6 +96,7 @@ test.describe('调价统计报表 · 主表列表与汇总', () => {
});
test.describe('调价统计报表 · 分页', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ anaChgPage }) => {
await anaChgPage.open();
await anaChgPage.search();
......@@ -114,6 +118,7 @@ test.describe('调价统计报表 · 分页', () => {
});
test.describe('调价统计报表 · 导出', () => {
test.describe.configure({ timeout: 120_000 });
test('STAT-ACH-023 首行样本查询后导出(无数据直接导出)', { tag: '@smoke' }, async ({ anaChgPage }) => {
await anaChgPage.assertExportAvailable();
await anaChgPage.open();
......
......@@ -14,6 +14,7 @@ import {
* 运行:npm run test:ana-dept
*/
test.describe('财务数据分析-科室成本 · 快捷筛选查询', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ anaDeptPage }) => {
await anaDeptPage.open();
});
......@@ -28,6 +29,7 @@ test.describe('财务数据分析-科室成本 · 快捷筛选查询', () => {
});
test.describe('财务数据分析-科室成本 · 科室成本分析', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ anaDeptPage }) => {
await anaDeptPage.open();
});
......@@ -40,6 +42,7 @@ test.describe('财务数据分析-科室成本 · 科室成本分析', () => {
});
test.describe('财务数据分析-科室成本 · 财务数据分析图表', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ anaDeptPage }) => {
await anaDeptPage.open();
});
......@@ -54,6 +57,7 @@ test.describe('财务数据分析-科室成本 · 财务数据分析图表', ()
});
test.describe('财务数据分析-科室成本 · 导出', () => {
test.describe.configure({ timeout: 120_000 });
test('STAT-ADD-006 首行样本查询后导出(无数据直接导出)', { tag: '@smoke' }, async ({ anaDeptPage }) => {
await anaDeptPage.assertExportAvailable();
await anaDeptPage.open();
......
......@@ -14,6 +14,7 @@ import {
* 运行:npm run test:ana-prov
*/
test.describe('财务数据分析-供应商入账 · 快捷筛选查询', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ anaProvPage }) => {
await anaProvPage.open();
});
......@@ -28,6 +29,7 @@ test.describe('财务数据分析-供应商入账 · 快捷筛选查询', () =>
});
test.describe('财务数据分析-供应商入账 · 供应商入账分析', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ anaProvPage }) => {
await anaProvPage.open();
});
......@@ -40,6 +42,7 @@ test.describe('财务数据分析-供应商入账 · 供应商入账分析', ()
});
test.describe('财务数据分析-供应商入账 · 财务数据分析图表', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ anaProvPage }) => {
await anaProvPage.open();
});
......@@ -54,6 +57,7 @@ test.describe('财务数据分析-供应商入账 · 财务数据分析图表',
});
test.describe('财务数据分析-供应商入账 · 导出', () => {
test.describe.configure({ timeout: 120_000 });
test('STAT-APV-006 首行样本查询后导出(无数据直接导出)', { tag: '@smoke' }, async ({ anaProvPage }) => {
await anaProvPage.assertExportAvailable();
await anaProvPage.open();
......
......@@ -7,6 +7,7 @@ import { centerReportEntryData } from '../../data/center-report-entry.data';
* 运行:npm run test:center-report-entry:all
*/
test.describe('入库汇总查询 · 快捷筛选', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportEntryPage }) => {
await centerReportEntryPage.open();
});
......@@ -29,6 +30,7 @@ test.describe('入库汇总查询 · 快捷筛选', () => {
});
test.describe('入库汇总查询 · 高级筛选', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportEntryPage }) => {
await centerReportEntryPage.open();
});
......@@ -63,6 +65,7 @@ test.describe('入库汇总查询 · 高级筛选', () => {
});
test.describe('入库汇总查询 · 主表汇总', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportEntryPage }) => {
await centerReportEntryPage.open();
});
......@@ -84,6 +87,7 @@ test.describe('入库汇总查询 · 主表汇总', () => {
});
test.describe('入库汇总查询 · 行展开', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportEntryPage }) => {
await centerReportEntryPage.open();
await centerReportEntryPage.search();
......@@ -112,6 +116,7 @@ test.describe('入库汇总查询 · 行展开', () => {
});
test.describe('入库汇总查询 · 列排序', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportEntryPage }) => {
await centerReportEntryPage.open();
await centerReportEntryPage.search();
......@@ -125,7 +130,7 @@ test.describe('入库汇总查询 · 列排序', () => {
});
test.describe('入库汇总查询 · 列设置', () => {
test.describe.configure({ mode: 'serial' });
test.describe.configure({ mode: 'serial', timeout: 120_000 });
test.beforeEach(async ({ centerReportEntryPage }) => {
await centerReportEntryPage.open();
......@@ -156,6 +161,7 @@ test.describe('入库汇总查询 · 列设置', () => {
});
test.describe('入库汇总查询 · 分页', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportEntryPage }) => {
await centerReportEntryPage.open();
await centerReportEntryPage.search();
......@@ -176,6 +182,7 @@ test.describe('入库汇总查询 · 分页', () => {
});
test.describe('入库汇总查询 · 导出', () => {
test.describe.configure({ timeout: 120_000 });
test('STAT-IES-026 按当前查询条件导出文件', { tag: '@smoke' }, async ({ centerReportEntryPage }) => {
await centerReportEntryPage.open();
await centerReportEntryPage.checkAllDimensions();
......
......@@ -11,6 +11,7 @@ import {
* 运行:npm run test:center-report-lmm-psi:all
*/
test.describe('中心库进销存(后勤) · 快捷筛选', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportLmmPsiPage }) => {
await centerReportLmmPsiPage.open();
});
......@@ -42,6 +43,7 @@ test.describe('中心库进销存(后勤) · 快捷筛选', () => {
});
test.describe('中心库进销存(后勤) · 主表列表', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportLmmPsiPage }) => {
await centerReportLmmPsiPage.open();
});
......@@ -59,7 +61,7 @@ test.describe('中心库进销存(后勤) · 主表列表', () => {
});
test.describe('中心库进销存(后勤) · 列设置', () => {
test.describe.configure({ mode: 'serial' });
test.describe.configure({ mode: 'serial', timeout: 120_000 });
test.beforeEach(async ({ centerReportLmmPsiPage }) => {
await centerReportLmmPsiPage.open();
......@@ -90,6 +92,7 @@ test.describe('中心库进销存(后勤) · 列设置', () => {
});
test.describe('中心库进销存(后勤) · 分页', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportLmmPsiPage }) => {
await centerReportLmmPsiPage.open();
await centerReportLmmPsiPage.search();
......@@ -116,6 +119,7 @@ test.describe('中心库进销存(后勤) · 分页', () => {
});
test.describe('中心库进销存(后勤) · 导出', () => {
test.describe.configure({ timeout: 120_000 });
test('STAT-LMP-012 按当前条件导出文件', { tag: '@smoke' }, async ({ centerReportLmmPsiPage }) => {
await centerReportLmmPsiPage.open();
await centerReportLmmPsiPage.search();
......
......@@ -11,6 +11,7 @@ import {
* 运行:npm run test:center-report-lmm-sheet:all
*/
test.describe('出入库明细查询(后勤)', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportLmmSheetPage }) => {
await centerReportLmmSheetPage.open();
});
......@@ -88,7 +89,7 @@ test.describe('出入库明细查询(后勤)', () => {
});
test.describe('出入库明细查询(后勤) · 列设置', () => {
test.describe.configure({ mode: 'serial' });
test.describe.configure({ mode: 'serial', timeout: 120_000 });
test.beforeEach(async ({ centerReportLmmSheetPage }) => {
await centerReportLmmSheetPage.open();
......
......@@ -12,6 +12,7 @@ import {
* 运行:npm run test:center-report-net-entry:all
*/
test.describe('净入库汇总查询(多维度)', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportNetEntryPage }) => {
await centerReportNetEntryPage.open();
});
......@@ -106,6 +107,7 @@ test.describe('净入库汇总查询(多维度)', () => {
});
test.describe('净入库汇总查询(多维度) · 列排序', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportNetEntryPage }) => {
await centerReportNetEntryPage.open();
await centerReportNetEntryPage.search();
......@@ -119,7 +121,7 @@ test.describe('净入库汇总查询(多维度) · 列排序', () => {
});
test.describe('净入库汇总查询(多维度) · 列设置', () => {
test.describe.configure({ mode: 'serial' });
test.describe.configure({ mode: 'serial', timeout: 120_000 });
test.beforeEach(async ({ centerReportNetEntryPage }) => {
await centerReportNetEntryPage.open();
......
......@@ -12,6 +12,7 @@ import {
* 运行:npm run test:center-report-net-out:all
*/
test.describe('净出库汇总查询(多维度)', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportNetOutPage }) => {
await centerReportNetOutPage.open();
});
......@@ -106,6 +107,7 @@ test.describe('净出库汇总查询(多维度)', () => {
});
test.describe('净出库汇总查询(多维度) · 列排序', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportNetOutPage }) => {
await centerReportNetOutPage.open();
await centerReportNetOutPage.search();
......@@ -119,7 +121,7 @@ test.describe('净出库汇总查询(多维度) · 列排序', () => {
});
test.describe('净出库汇总查询(多维度) · 列设置', () => {
test.describe.configure({ mode: 'serial' });
test.describe.configure({ mode: 'serial', timeout: 120_000 });
test.beforeEach(async ({ centerReportNetOutPage }) => {
await centerReportNetOutPage.open();
......
......@@ -7,6 +7,7 @@ import { centerReportOutData, centerReportOutSortCases } from '../../data/center
* 运行:npm run test:center-report-out:all
*/
test.describe('出库汇总查询 · 快捷筛选', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportOutPage }) => {
await centerReportOutPage.open();
});
......@@ -29,6 +30,7 @@ test.describe('出库汇总查询 · 快捷筛选', () => {
});
test.describe('出库汇总查询 · 高级筛选', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportOutPage }) => {
await centerReportOutPage.open();
});
......@@ -63,6 +65,7 @@ test.describe('出库汇总查询 · 高级筛选', () => {
});
test.describe('出库汇总查询 · 主表汇总', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportOutPage }) => {
await centerReportOutPage.open();
});
......@@ -83,6 +86,7 @@ test.describe('出库汇总查询 · 主表汇总', () => {
});
test.describe('出库汇总查询 · 行展开', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportOutPage }) => {
await centerReportOutPage.open();
await centerReportOutPage.search();
......@@ -111,6 +115,7 @@ test.describe('出库汇总查询 · 行展开', () => {
});
test.describe('出库汇总查询 · 列排序', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportOutPage }) => {
await centerReportOutPage.open();
await centerReportOutPage.search();
......@@ -124,7 +129,7 @@ test.describe('出库汇总查询 · 列排序', () => {
});
test.describe('出库汇总查询 · 列设置', () => {
test.describe.configure({ mode: 'serial' });
test.describe.configure({ mode: 'serial', timeout: 120_000 });
test.beforeEach(async ({ centerReportOutPage }) => {
await centerReportOutPage.open();
......@@ -155,6 +160,7 @@ test.describe('出库汇总查询 · 列设置', () => {
});
test.describe('出库汇总查询 · 分页', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportOutPage }) => {
await centerReportOutPage.open();
await centerReportOutPage.search();
......@@ -178,6 +184,7 @@ test.describe('出库汇总查询 · 分页', () => {
});
test.describe('出库汇总查询 · 导出', () => {
test.describe.configure({ timeout: 120_000 });
test('STAT-OOS-026 按当前查询条件导出文件', { tag: '@smoke' }, async ({ centerReportOutPage }) => {
await centerReportOutPage.open();
await centerReportOutPage.checkAllDimensions();
......@@ -187,6 +194,7 @@ test.describe('出库汇总查询 · 导出', () => {
});
test.describe('出库汇总查询 · 批量打印', () => {
test.describe.configure({ timeout: 120_000 });
test('STAT-OOS-028 勾选子表明细后批量打印正常', async ({ centerReportOutPage }) => {
await centerReportOutPage.open();
await centerReportOutPage.search();
......
......@@ -11,6 +11,7 @@ import {
* 运行:npm run test:center-report-psi:all
*/
test.describe('中心库产品进销存 · 快捷筛选', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportPsiPage }) => {
await centerReportPsiPage.open();
});
......@@ -23,6 +24,7 @@ test.describe('中心库产品进销存 · 快捷筛选', () => {
});
test.describe('中心库产品进销存 · 高级筛选', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportPsiPage }) => {
await centerReportPsiPage.open();
});
......@@ -61,6 +63,7 @@ test.describe('中心库产品进销存 · 高级筛选', () => {
});
test.describe('中心库产品进销存 · 主表列表', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportPsiPage }) => {
await centerReportPsiPage.open();
});
......@@ -80,7 +83,7 @@ test.describe('中心库产品进销存 · 主表列表', () => {
});
test.describe('中心库产品进销存 · 列设置', () => {
test.describe.configure({ mode: 'serial' });
test.describe.configure({ mode: 'serial', timeout: 120_000 });
test.beforeEach(async ({ centerReportPsiPage }) => {
await centerReportPsiPage.open();
......@@ -111,6 +114,7 @@ test.describe('中心库产品进销存 · 列设置', () => {
});
test.describe('中心库产品进销存 · 分页', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportPsiPage }) => {
await centerReportPsiPage.open();
await centerReportPsiPage.search();
......@@ -134,6 +138,7 @@ test.describe('中心库产品进销存 · 分页', () => {
});
test.describe('中心库产品进销存 · 导出', () => {
test.describe.configure({ timeout: 120_000 });
test('STAT-PSI-012 按当前条件导出文件', { tag: '@smoke' }, async ({ centerReportPsiPage }) => {
await centerReportPsiPage.open();
await centerReportPsiPage.search();
......
......@@ -7,6 +7,7 @@ import { centerReportSheetData } from '../../data/center-report-sheet.data';
* 运行:npm run test:center-report:all
*/
test.describe('出入库明细查询 · 快捷筛选', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportSheetPage }) => {
await centerReportSheetPage.open();
});
......@@ -21,6 +22,7 @@ test.describe('出入库明细查询 · 快捷筛选', () => {
});
test.describe('出入库明细查询 · 高级筛选', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportSheetPage }) => {
await centerReportSheetPage.open();
});
......@@ -55,6 +57,7 @@ test.describe('出入库明细查询 · 高级筛选', () => {
});
test.describe('出入库明细查询 · 列表汇总', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportSheetPage }) => {
await centerReportSheetPage.open();
});
......@@ -75,6 +78,7 @@ test.describe('出入库明细查询 · 列表汇总', () => {
});
test.describe('出入库明细查询 · 列排序', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportSheetPage }) => {
await centerReportSheetPage.open();
await centerReportSheetPage.search();
......@@ -88,7 +92,7 @@ test.describe('出入库明细查询 · 列排序', () => {
});
test.describe('出入库明细查询 · 列设置', () => {
test.describe.configure({ mode: 'serial' });
test.describe.configure({ mode: 'serial', timeout: 120_000 });
test.beforeEach(async ({ centerReportSheetPage }) => {
await centerReportSheetPage.open();
......@@ -113,6 +117,7 @@ test.describe('出入库明细查询 · 列设置', () => {
});
test.describe('出入库明细查询 · 分页', () => {
test.describe.configure({ timeout: 120_000 });
test.beforeEach(async ({ centerReportSheetPage }) => {
await centerReportSheetPage.open();
await centerReportSheetPage.search();
......@@ -134,6 +139,7 @@ test.describe('出入库明细查询 · 分页', () => {
});
test.describe('出入库明细查询 · 导出', () => {
test.describe.configure({ timeout: 120_000 });
test('STAT-IOD-043 按当前查询条件导出文件', { tag: '@smoke' }, async ({ centerReportSheetPage }) => {
await centerReportSheetPage.open();
await centerReportSheetPage.search();
......
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