test: automate overseas wallet and pallet cost closure

This commit is contained in:
2026-09-06 11:00:06 +08:00
parent 64bf5aa0fe
commit 20b3074cb1
21 changed files with 506 additions and 103 deletions
@@ -29,9 +29,10 @@ async function waitForDimensionInitialization(context, tenantId) {
export async function run(context) {
const suffix = context.marker.replace(/[^0-9A-Z]/gi, '').slice(-10).padStart(10, '0')
const customerName = String(context.options?.customerName || '').trim()
const tenantName = customerName || `全量验收下单客户-${suffix}`
const phone = await context.findAvailablePhone(MODULE)
const createResponse = await context.request('POST', '/api/platform/v1/iam/tenants', {
tenantName: customerName || `全量验收下单客户-${suffix}`,
tenantName,
legalName: customerName ? `${customerName}有限公司` : `全量验收下单有限公司-${suffix}`,
legalRepresentative: '全量验收法人',
contactName: '全量验收管理员',
@@ -102,6 +103,12 @@ export async function run(context) {
process.env.MERCHANT_TEST_USERNAME = username
process.env.MERCHANT_TEST_PASSWORD = password
context.context.merchantQualificationFixture = { tenantId, username, password, marker: context.marker }
context.createdResources.merchantQualificationFixture = { tenantId, username, marker: context.marker }
context.context.merchantQualificationFixture = {
tenantId, tenantName, username, password, marker: context.marker,
expectedProcurementPrefix: customerName ? null : 'QLYSXDKH',
}
context.createdResources.merchantQualificationFixture = {
tenantId, tenantName, username, marker: context.marker,
expectedProcurementPrefix: customerName ? null : 'QLYSXDKH',
}
}