⚡ (openai) Stream chat completion to avoid serverless timeout (#526)
Closes #520
This commit is contained in:
@@ -143,7 +143,7 @@ test.describe.parallel('Google sheets integration', () => {
|
||||
.press('Enter')
|
||||
await expect(
|
||||
page.locator('typebot-standard').locator('text=Your name is:')
|
||||
).toHaveText(`Your name is: Georges2 Smith2`)
|
||||
).toHaveText(`Your name is: Georges2 Last name`)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ export const createCredentials = authenticatedProcedure
|
||||
if (!workspace)
|
||||
throw new TRPCError({ code: 'NOT_FOUND', message: 'Workspace not found' })
|
||||
|
||||
const { encryptedData, iv } = encrypt(credentials.data)
|
||||
const { encryptedData, iv } = await encrypt(credentials.data)
|
||||
const createdCredentials = await prisma.credentials.create({
|
||||
data: {
|
||||
...credentials,
|
||||
|
||||
@@ -174,8 +174,8 @@ test('Rename and icon change should work', async ({ page }) => {
|
||||
])
|
||||
|
||||
await page.goto(`/typebots/${typebotId}/edit`)
|
||||
|
||||
await page.click('[data-testid="editable-icon"]')
|
||||
await page.getByRole('button', { name: 'Emoji' }).click()
|
||||
await expect(page.locator('text="My awesome typebot"')).toBeVisible()
|
||||
await page.fill('input[placeholder="Search..."]', 'love')
|
||||
await page.click('text="😍"')
|
||||
|
||||
@@ -19,10 +19,7 @@ test.describe.parallel('Settings page', () => {
|
||||
await page.click('text="Typebot.io branding"')
|
||||
await expect(page.locator('a:has-text("Made with Typebot")')).toBeHidden()
|
||||
|
||||
await page.click('text="Remember session"')
|
||||
await expect(
|
||||
page.locator('input[type="checkbox"] >> nth=-3')
|
||||
).toHaveAttribute('checked', '')
|
||||
await page.click('text="Remember user"')
|
||||
|
||||
await expect(page.getByPlaceholder('Type your answer...')).toHaveValue(
|
||||
'Baptiste'
|
||||
|
||||
@@ -74,6 +74,7 @@ test('can update workspace info', async ({ page }) => {
|
||||
await page.click('text=Settings & Members')
|
||||
await page.click('text="Settings"')
|
||||
await page.click('[data-testid="editable-icon"]')
|
||||
await page.getByRole('button', { name: 'Emoji' }).click()
|
||||
await page.fill('input[placeholder="Search..."]', 'building')
|
||||
await page.click('text="🏦"')
|
||||
await page.waitForTimeout(500)
|
||||
@@ -92,13 +93,13 @@ test('can manage members', async ({ page }) => {
|
||||
page.getByRole('heading', { name: 'Members (1/5)' })
|
||||
).toBeVisible()
|
||||
await expect(page.locator('text="user@email.com"').nth(1)).toBeVisible()
|
||||
await expect(page.locator('button >> text="Invite"')).toBeEnabled()
|
||||
await expect(page.locator('button >> text="Invite"')).toBeDisabled()
|
||||
await page.fill(
|
||||
'input[placeholder="colleague@company.com"]',
|
||||
'guest@email.com'
|
||||
)
|
||||
await page.click('button >> text="Invite"')
|
||||
await expect(page.locator('button >> text="Invite"')).toBeEnabled()
|
||||
await expect(page.locator('button >> text="Invite"')).toBeVisible()
|
||||
await expect(
|
||||
page.locator('input[placeholder="colleague@company.com"]')
|
||||
).toHaveAttribute('value', '')
|
||||
|
||||
Reference in New Issue
Block a user