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:
@@ -76,7 +76,7 @@ apps/web/e2e/
|
||||
| Owner creates a project with a cover image | `tests/project/create-project.spec.ts` |
|
||||
| Owner opens project cards in new tabs with middle-click and modifier-click | `tests/project/open-in-new-tab.spec.ts` |
|
||||
| Owner opens a folder card and a file row in new tabs from the context menu | `tests/project/open-in-new-tab.spec.ts` |
|
||||
| Owner sees the transcript action only when available, generates a transcript from an archived video's context menu, sees progress in card and list metadata across a refresh, and reuses the project status across folders | `tests/project/generate-transcripts.spec.ts` |
|
||||
| Owner sees the transcript action only when available, requests both Chinese scripts and English from an archived video's context menu, sees progress in card and list metadata across a refresh, and reuses the project status across folders | `tests/project/generate-transcripts.spec.ts` |
|
||||
| Owner uploads a file or an unsupported file via the "Upload File" context menu action | `tests/project/upload-file.spec.ts` |
|
||||
| Owner deletes a file, finds it in recently deleted, and restores it | `tests/project/delete-restore.spec.ts` |
|
||||
| Owner deletes a folder and still sees its contents preview and countdown in recently deleted | `tests/project/delete-restore.spec.ts` |
|
||||
|
||||
@@ -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