test(overseas): retain marker merchant fixture

This commit is contained in:
2026-09-07 21:26:03 +08:00
parent ac18f69ec5
commit f018ca85a9
2 changed files with 20 additions and 1 deletions
@@ -2,6 +2,7 @@ import test from 'node:test'
import assert from 'node:assert/strict'
import { readFile } from 'node:fs/promises'
import { fileURLToPath } from 'node:url'
import { parseArguments } from '../admin-test-env-acceptance.mjs'
const source = await readFile(fileURLToPath(new URL('./phase4-overseas-client-services.mjs', import.meta.url)), 'utf8')
@@ -57,3 +58,14 @@ test('module records marker-owned resources without forbidden fulfillment cleanu
assert.match(source, /discardNo = discardNo/)
assert.match(source, /no outbound, dispatch, PDA or delivery action is invoked/)
})
test('focused client services keeps the marker-owned merchant fixture when reusable credentials exist', () => {
const parsed = parseArguments([
'--modules', 'phase4-overseas-client-services',
'--merchant-username', 'existing-merchant',
'--merchant-password', 'existing-password',
])
const fixture = parsed.modules.indexOf('merchant-qualification-fixture')
const clientServices = parsed.modules.indexOf('phase4-overseas-client-services')
assert.ok(fixture >= 0 && fixture < clientServices)
})