test: prepare isolated gray domestic PDA H5 tasks without auto-picking
This commit is contained in:
@@ -313,6 +313,7 @@ function usage() {
|
||||
--merchant-username <name> 复用既有已审核客户账号,不再创建客户
|
||||
--merchant-password <value> 复用客户账号密码,不写入报告
|
||||
--origin-warehouse-name <name> 固定国内起运仓名称
|
||||
--prepare-domestic-pda-h5 true 仅准备新待拣任务供H5,不执行完整履约验收
|
||||
--channel-name <name> 固定物流渠道名称
|
||||
--channel-code <code> 固定物流渠道编码
|
||||
--order-profile-mode <mode> 订单档案模式:fixed 或 randomized,默认fixed
|
||||
@@ -408,6 +409,7 @@ export function parseArguments(argv) {
|
||||
const fixtureIndex = modules.indexOf('merchant-qualification-fixture')
|
||||
if (fixtureIndex >= 0) modules.splice(fixtureIndex, 1)
|
||||
}
|
||||
if (values.has('prepare-domestic-pda-h5') && values.get('prepare-domestic-pda-h5') !== 'true') throw new Error('prepare-domestic-pda-h5 必须明确为 true;完整验收请省略此参数')
|
||||
return {
|
||||
environment,
|
||||
gateway: (values.get('gateway') || envValue('ADMIN_TEST_GATEWAY', 'ADMIN_GRAY_GATEWAY')).replace(/\/$/, ''),
|
||||
@@ -437,6 +439,7 @@ export function parseArguments(argv) {
|
||||
returnMainChainOnly: values.get('return-main-chain-only') === 'true',
|
||||
verifyUnloadEventRecovery: values.get('verify-unload-event-recovery') === 'true',
|
||||
f40TaxMode: values.get('f40-tax-mode') || '',
|
||||
prepareDomesticPdaH5: values.get('prepare-domestic-pda-h5') === 'true',
|
||||
manualSplitFixtureReport: values.get('manual-split-fixture-report') || '',
|
||||
manualSplitPlanId: values.get('manual-split-plan-id') || '',
|
||||
manualPreloadSourceReport: values.get('manual-preload-source-report') || '',
|
||||
@@ -465,6 +468,7 @@ export function validateExecutionOptions(options) {
|
||||
}
|
||||
if (options.environment && !['test', 'gray'].includes(options.environment)) throw new Error('Only test or explicit gray acceptance is supported')
|
||||
if (options.f40TaxMode && !['BUY_DECLARATION', 'TAX_REFUND'].includes(options.f40TaxMode)) throw new Error('f40-tax-mode 必须为 BUY_DECLARATION 或 TAX_REFUND')
|
||||
if (options.prepareDomesticPdaH5 && (options.requestedModules?.length !== 1 || options.requestedModules[0] !== 'phase5-root-fulfillment')) throw new Error('prepare-domestic-pda-h5 仅允许单独指定 phase5-root-fulfillment')
|
||||
if ('overseasGateway' in options) throw new Error('Use the single gateway option')
|
||||
if (options.modules.some((module) => ['phase3-loading', 'phase3-container-loading', 'phase5-root-fulfillment'].includes(module))
|
||||
&& (!options.pdaUsername?.trim() || !options.pdaPassword?.trim())) {
|
||||
@@ -624,7 +628,7 @@ export class AcceptanceRun {
|
||||
this.phase4ProducerAttempts = new Map()
|
||||
this.deploymentBlockers = []
|
||||
this.coverageGaps = []
|
||||
this.context = options.f40TaxMode ? { f40TaxMode: options.f40TaxMode } : {}
|
||||
this.context = { ...(options.f40TaxMode ? { f40TaxMode: options.f40TaxMode } : {}), ...(options.prepareDomesticPdaH5 ? { prepareDomesticPdaH5: true } : {}) }
|
||||
this.token = ''
|
||||
this.pdaToken = ''
|
||||
this.refreshToken = ''
|
||||
@@ -1932,10 +1936,11 @@ export class AcceptanceRun {
|
||||
|
||||
const summary = buildAcceptanceSummary(this.steps, this.modules, this.coverageGaps)
|
||||
return {
|
||||
reportName: this.options.environment === 'gray' ? '灰度环境 FBA 定向闭环 HTTP API 验收' : '后台管理测试环境 HTTP API 验收', marker: this.marker,
|
||||
reportName: this.options.prepareDomesticPdaH5 ? '国内 PDA H5 待拣任务准备(非全链路验收)' : this.options.environment === 'gray' ? '灰度环境 FBA 定向闭环 HTTP API 验收' : '后台管理测试环境 HTTP API 验收', marker: this.marker,
|
||||
environment: this.options.environment || 'test', gateway: this.options.gateway,
|
||||
generatedAt: new Date().toISOString(), startedAt: this.startedAt,
|
||||
success: this.fatal === null && summary.failed === 0, fatal: this.fatal,
|
||||
...(this.options.prepareDomesticPdaH5 ? { fullAcceptance: false, purpose: 'DOMESTIC_PDA_H5_FIXTURE' } : {}),
|
||||
summary,
|
||||
modules: this.modules, scenarios: this.scenarios, deploymentBlockers: this.deploymentBlockers,
|
||||
coverageGaps: this.coverageGaps,
|
||||
|
||||
Reference in New Issue
Block a user