test: deduplicate acceptance coverage gaps
This commit is contained in:
@@ -714,7 +714,13 @@ export class AcceptanceRun {
|
||||
addCoverageGap(module, scenario, name, reason, category = 'not-implemented', metadata = {}) {
|
||||
const nonBlocking = new Set(['device', 'external-third-party', 'visual'])
|
||||
const blocking = metadata.blocking ?? !nonBlocking.has(category)
|
||||
this.coverageGaps.push({ module, scenario, name, reason, category, blocking, ...metadata })
|
||||
const gap = { module, scenario, name, reason, category, blocking, ...metadata }
|
||||
const duplicate = this.coverageGaps.some((existing) => existing.module === gap.module
|
||||
&& existing.scenario === gap.scenario && existing.name === gap.name
|
||||
&& existing.reason === gap.reason && existing.category === gap.category
|
||||
&& existing.blocking === gap.blocking)
|
||||
if (duplicate) return
|
||||
this.coverageGaps.push(gap)
|
||||
if (blocking) {
|
||||
this.addStep(module, `覆盖阻断:${name}`, null, false, reason,
|
||||
{ scenario, deploymentBlocker: true })
|
||||
|
||||
@@ -144,7 +144,10 @@ test('core coverage gaps fail closed while device and external-provider gaps rem
|
||||
const stepCount = run.steps.length
|
||||
run.addCoverageGap('phase3', 'device', 'Android', 'manual device validation', 'device')
|
||||
run.addCoverageGap('phase3', 'provider', 'captcha', 'external captcha', 'external-third-party')
|
||||
run.addCoverageGap('phase3', 'device', 'Android', 'manual device validation', 'device')
|
||||
run.addCoverageGap('phase3', 'provider', 'captcha', 'external captcha', 'external-third-party')
|
||||
assert.equal(run.steps.length, stepCount)
|
||||
assert.equal(run.coverageGaps.length, 3)
|
||||
})
|
||||
|
||||
test('PDA entry expands the real phase-three producer chain and builds an FBA/OVERSEAS/second-container matrix', () => {
|
||||
|
||||
Reference in New Issue
Block a user