mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 15:14:10 +00:00
feat: configure embedding servers and transcript agents
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 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, 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 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` |
|
||||
|
||||
@@ -16,6 +16,7 @@ test('starts a transcript for an archived video and tracks it in the file metada
|
||||
let submissions = 0
|
||||
let rejectSubmission = true
|
||||
let statusRequests = 0
|
||||
let transcriptionEnabled = false
|
||||
page.on('request', (request) => {
|
||||
if (new URL(request.url()).pathname === statusPath) {
|
||||
expect(request.method()).toBe('GET')
|
||||
@@ -25,7 +26,7 @@ test('starts a transcript for an archived video and tracks it in the file metada
|
||||
})
|
||||
await page.route('**/api/signup-info', async (route) => {
|
||||
const response = await route.fetch()
|
||||
await route.fulfill({ json: { ...(await response.json()), transcriptionEnabled: true } })
|
||||
await route.fulfill({ json: { ...(await response.json()), transcriptionEnabled } })
|
||||
})
|
||||
await page.route('**/api/transcription/languages', (route) =>
|
||||
route.fulfill({
|
||||
@@ -61,12 +62,17 @@ test('starts a transcript for an archived video and tracks it in the file metada
|
||||
)
|
||||
.toMatchObject({ status: 'processed', media: { proxyType: 'video' } })
|
||||
await prisma.asset.update({ where: { id: fileId }, data: { status: 'processing' } })
|
||||
await page.goto(projectPath)
|
||||
const action = page.getByRole('menuitem', { name: 'Generate Transcripts' })
|
||||
await fileCard(page, fileName).click({ button: 'right' })
|
||||
await expect(page.getByRole('menu')).toBeVisible()
|
||||
await expect(action).toHaveCount(0)
|
||||
transcriptionEnabled = true
|
||||
const [signupInfo] = await Promise.all([
|
||||
page.waitForResponse('**/api/signup-info'),
|
||||
page.goto(projectPath),
|
||||
])
|
||||
expect(await signupInfo.json()).toMatchObject({ transcriptionEnabled: true })
|
||||
const action = page.getByRole('menuitem', { name: 'Generate Transcripts' })
|
||||
await fileCard(page, fileName).click({ button: 'right' })
|
||||
await expect(action).toBeDisabled()
|
||||
await prisma.asset.update({ where: { id: fileId }, data: { status: 'archived' } })
|
||||
|
||||
Reference in New Issue
Block a user