mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-05 07:34:25 +00:00
feat(transcript): add Chinese script choices
This commit is contained in:
@@ -12,7 +12,7 @@ test('starts a transcript for an archived video and tracks it in the file metada
|
||||
const projectPath = `/projects/${projectId}`
|
||||
const statusPath = `/api${projectPath}/transcription-status`
|
||||
const folder = await seedFolder(prisma, projectId, rootFolderId, 'Other folder')
|
||||
const expectedLanguages = ['zh', 'en']
|
||||
const expectedLanguages = ['zh-Hans', 'zh-Hant', 'en']
|
||||
let submissions = 0
|
||||
let rejectSubmission = true
|
||||
let statusRequests = 0
|
||||
@@ -34,7 +34,8 @@ test('starts a transcript for an archived video and tracks it in the file metada
|
||||
model: 'whisper-tiny',
|
||||
languages: [
|
||||
{ code: 'en', name: 'English' },
|
||||
{ code: 'zh', name: 'Chinese' },
|
||||
{ code: 'zh-Hans', name: 'Simplified Chinese' },
|
||||
{ code: 'zh-Hant', name: 'Traditional Chinese' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
@@ -105,10 +106,10 @@ test('starts a transcript for an archived video and tracks it in the file metada
|
||||
}
|
||||
|
||||
await expect(language).toHaveValue('Auto')
|
||||
await selectLanguage('Chi', 'Chinese')
|
||||
await selectLanguage('Simplified', 'Chinese (Simplified)')
|
||||
await generate.click()
|
||||
await expect(dialog.getByRole('alert')).toBeVisible()
|
||||
await expect(language).toHaveValue('Chinese')
|
||||
await expect(language).toHaveValue('Chinese (Simplified)')
|
||||
await generate.click()
|
||||
await expect(dialog).toBeHidden()
|
||||
await expect(metadata).toHaveText('Transcribing…')
|
||||
@@ -127,6 +128,14 @@ test('starts a transcript for an archived video and tracks it in the file metada
|
||||
await expect(dateCell).toHaveText(/\d/)
|
||||
const modifiedDate = await dateCell.innerText()
|
||||
|
||||
await openDialog()
|
||||
await selectLanguage('Traditional', 'Chinese (Traditional)')
|
||||
await generate.click()
|
||||
await expect(dialog).toBeHidden()
|
||||
await expect(dateCell).toHaveText('Transcribing…')
|
||||
await prisma.workflowTask.updateMany({ where: activeTranscript, data: { status: 'completed' } })
|
||||
await expect(dateCell).toHaveText(modifiedDate)
|
||||
|
||||
await openDialog()
|
||||
await expect(generate).toBeEnabled()
|
||||
await selectLanguage('Eng', 'English')
|
||||
|
||||
Reference in New Issue
Block a user