refactor(scan): stop emitting markdown contract artifacts
Remove generated `.ui-contract.md` and `.bdd.md` outputs from the scan pipeline and documentation so downstream consumers rely on structured JSON artifacts instead. Also drop unused API `fieldRules` catalog output and remove stale app-map references to UI contract files. Update legacy flow matching to preserve only the nodes that directly matched the current entry.refactor(scan): stop emitting markdown contract artifacts Remove generated `.ui-contract.md` and `.bdd.md` outputs from the scan pipeline and documentation so downstream consumers rely on structured JSON artifacts instead. Also drop unused API `fieldRules` catalog output and remove stale app-map references to UI contract files. Update legacy flow matching to preserve only the nodes that directly matched the current entry.
This commit is contained in:
@@ -34,20 +34,11 @@ test('CLI runs doctor and scan against one prototype', async () => {
|
||||
const doctor = await exec('node', [cli, 'doctor'], { cwd })
|
||||
await exec('node', [cli, 'scan'], { cwd })
|
||||
|
||||
const contract = await readFile(join(cwd, '.ht/spec/index.ui-contract.md'), 'utf8')
|
||||
const bdd = await readFile(join(cwd, '.ht/spec/index.bdd.md'), 'utf8')
|
||||
const spec = JSON.parse(await readFile(join(cwd, '.ht/spec/index.spec.json'), 'utf8'))
|
||||
const validation = JSON.parse(await readFile(join(cwd, '.ht/spec/index.validation.json'), 'utf8'))
|
||||
const appMap = JSON.parse(await readFile(join(cwd, '.ht/app-map.json'), 'utf8'))
|
||||
|
||||
assert.match(doctor.stdout, /ok prototype directory/)
|
||||
assert.match(contract, /Customer Portal/)
|
||||
assert.match(contract, /BDD Scenarios/)
|
||||
assert.match(contract, /Capture Artifacts/)
|
||||
assert.match(contract, /Browser Evidence/)
|
||||
assert.match(bdd, /Feature: Customer portal entry/)
|
||||
assert.match(bdd, /Scenario: 使用者填寫必要資料並送出成功/)
|
||||
assert.doesNotMatch(contract, /Recommended template/)
|
||||
assert.equal(spec.pageContract.title, null)
|
||||
assert.equal(spec.bddContract.feature, 'Customer portal entry')
|
||||
assert.equal(spec.bddContract.scenarios[0].type, 'application-submit')
|
||||
|
||||
Reference in New Issue
Block a user