Introduce bot v2 in builder (#328)

Also, the new engine is the default for updated typebots for viewer

Closes #211
This commit is contained in:
Baptiste Arnaud
2023-02-21 15:25:14 +01:00
committed by GitHub
parent 527dc8a5b1
commit debdac12ff
208 changed files with 4462 additions and 5236 deletions

View File

@@ -1,5 +1,4 @@
import test, { expect } from '@playwright/test'
import { typebotViewer } from 'utils/playwright/testHelpers'
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
import { createId } from '@paralleldrive/cuid2'
import { getTestAsset } from '@/test/utils/playwright'
@@ -42,18 +41,19 @@ test.describe('Set variable block', () => {
await page.fill('textarea', '1000 + {{Total}}')
await page.click('text=Preview')
await typebotViewer(page)
await page
.locator('typebot-standard')
.locator('input[placeholder="Type a number..."]')
.fill('365')
await typebotViewer(page).locator('text=Send').click()
await page.locator('typebot-standard').locator('text=Send').click()
await expect(
typebotViewer(page).locator('text=Multiplication: 365000')
page.locator('typebot-standard').locator('text=Multiplication: 365000')
).toBeVisible()
await expect(
typebotViewer(page).locator('text=Custom var: Custom value')
page.locator('typebot-standard').locator('text=Custom var: Custom value')
).toBeVisible()
await expect(
typebotViewer(page).locator('text=Addition: 366000')
page.locator('typebot-standard').locator('text=Addition: 366000')
).toBeVisible()
})
})