fix(voice): clarify recording disposition
This commit is contained in:
@@ -3,6 +3,7 @@ const test = require('node:test')
|
||||
|
||||
const {
|
||||
getVoiceFailureHint,
|
||||
getVoiceLessonStatusText,
|
||||
getVoicePrimaryAction,
|
||||
getVoicePrimaryActionText
|
||||
} = require('../.test-dist/pages/feedback/voice-state.js')
|
||||
@@ -65,7 +66,19 @@ test('no clear speech failures provide an actionable explanation', () => {
|
||||
|
||||
const hint = getVoiceFailureHint(value)
|
||||
assert.match(hint, /录音过短、静音或环境噪声/)
|
||||
assert.match(hint, /放弃后重新录制/)
|
||||
assert.match(hint, /放弃该失败录音/)
|
||||
})
|
||||
|
||||
test('ready lessons explain whether their transcript is visible or pending generation', () => {
|
||||
const lesson = {
|
||||
status: 'ready',
|
||||
appliedDirectly: false,
|
||||
includedInGeneration: false
|
||||
}
|
||||
|
||||
assert.equal(getVoiceLessonStatusText(lesson), '待生成反馈')
|
||||
assert.equal(getVoiceLessonStatusText({ ...lesson, appliedDirectly: true }), '已加入输入框')
|
||||
assert.equal(getVoiceLessonStatusText({ ...lesson, includedInGeneration: true }), '已生成反馈')
|
||||
})
|
||||
|
||||
test('session refresh runs after a failed API action', async () => {
|
||||
|
||||
Reference in New Issue
Block a user