feat(ai): issue verified application preview decisions
This commit is contained in:
@@ -4,6 +4,7 @@ import { trackApplicationPreviewFieldEdit } from '../src/utils/expenseApplicatio
|
||||
|
||||
function testTracksFirstExplicitEdit() {
|
||||
const previous = {
|
||||
decisionId: 'decision-feedback-1',
|
||||
fields: {
|
||||
reason: '客户拜访',
|
||||
location: '上海'
|
||||
@@ -27,12 +28,13 @@ function testTracksFirstExplicitEdit() {
|
||||
}
|
||||
])
|
||||
assert.equal(tracked.aiDecisionFeedback.revision, 1)
|
||||
assert.equal(tracked.decisionId, 'decision-feedback-1')
|
||||
}
|
||||
|
||||
function testKeepsOriginalSuggestionAcrossRepeatedEdits() {
|
||||
const first = trackApplicationPreviewFieldEdit(
|
||||
{ fields: { transportMode: '火车' } },
|
||||
{ fields: { transportMode: '飞机' } },
|
||||
{ decisionId: 'decision-feedback-2', fields: { transportMode: '火车' } },
|
||||
{ decisionId: 'decision-feedback-2', fields: { transportMode: '飞机' } },
|
||||
'transportMode'
|
||||
)
|
||||
const second = trackApplicationPreviewFieldEdit(
|
||||
@@ -48,6 +50,7 @@ function testKeepsOriginalSuggestionAcrossRepeatedEdits() {
|
||||
finalValue: '自驾'
|
||||
}
|
||||
])
|
||||
assert.equal(second.decisionId, 'decision-feedback-2')
|
||||
}
|
||||
|
||||
function testRemovesDiffWhenUserRestoresSuggestion() {
|
||||
|
||||
Reference in New Issue
Block a user