2
0

Add audio clips option on text input block

Closes #157
This commit is contained in:
Baptiste Arnaud
2024-08-20 14:35:20 +02:00
parent 984c2bf387
commit 135251d3f7
55 changed files with 1535 additions and 366 deletions

View File

@ -85,7 +85,9 @@ export const generateUploadUrl = publicProcedure
if (
block?.type !== InputBlockType.FILE &&
(block.type !== InputBlockType.TEXT ||
!block.options?.attachments?.isEnabled)
!block.options?.attachments?.isEnabled) &&
(block.type !== InputBlockType.TEXT ||
!block.options?.audioClip?.isEnabled)
)
throw new TRPCError({
code: 'BAD_REQUEST',

View File

@ -27,7 +27,10 @@ test('should work as expected', async ({ page, browser }) => {
await page.goto(`${env.NEXTAUTH_URL}/typebots/${typebotId}/results`)
await expect(page.getByRole('link', { name: 'api.json' })).toHaveAttribute(
'href',
/.+\/api\.json/
/.+\/api\.json/,
{
timeout: 10000,
}
)
await expect(
page.getByRole('link', { name: 'fileUpload.json' })

View File

@ -17,7 +17,9 @@ test('Big groups should work as expected', async ({ page }) => {
await page.locator('input').press('Enter')
await page.getByRole('button', { name: 'Yes' }).click()
await page.goto(`${env.NEXTAUTH_URL}/typebots/${typebotId}/results`)
await expect(page.locator('text="Baptiste"')).toBeVisible()
await expect(page.locator('text="Baptiste"')).toBeVisible({
timeout: 10000,
})
await expect(page.locator('text="26"')).toBeVisible()
await expect(page.locator('text="Yes"')).toBeVisible()
await page.hover('tbody > tr')