✨ 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:
@@ -2,7 +2,6 @@ import { getTestAsset } from '@/test/utils/playwright'
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
|
||||
import { typebotViewer } from 'utils/playwright/testHelpers'
|
||||
|
||||
test('should correctly be injected', async ({ page }) => {
|
||||
const typebotId = createId()
|
||||
@@ -11,12 +10,10 @@ test('should correctly be injected', async ({ page }) => {
|
||||
{ id: typebotId, publicId: `${typebotId}-public` }
|
||||
)
|
||||
await page.goto(`/${typebotId}-public`)
|
||||
await expect(typebotViewer(page).locator('text="Your name is"')).toBeVisible()
|
||||
await expect(page.locator('text="Your name is"')).toBeVisible()
|
||||
await page.goto(`/${typebotId}-public?Name=Baptiste&Email=email@test.com`)
|
||||
await expect(
|
||||
typebotViewer(page).locator('text="Your name is Baptiste"')
|
||||
).toBeVisible()
|
||||
await expect(
|
||||
typebotViewer(page).locator('input[value="email@test.com"]')
|
||||
).toBeVisible()
|
||||
await expect(page.locator('text="Your name is Baptiste"')).toBeVisible()
|
||||
await expect(page.getByPlaceholder('Type your email...')).toHaveValue(
|
||||
'email@test.com'
|
||||
)
|
||||
})
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
import { getTestAsset } from '@/test/utils/playwright'
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
|
||||
|
||||
test('should correctly be injected', async ({ page }) => {
|
||||
const typebotId = createId()
|
||||
await importTypebotInDatabase(
|
||||
getTestAsset('typebots/predefinedVariables.json'),
|
||||
{ id: typebotId, publicId: `${typebotId}-public` }
|
||||
)
|
||||
await page.goto(`/next/${typebotId}-public`)
|
||||
await expect(page.locator('text="Your name is"')).toBeVisible()
|
||||
await page.goto(
|
||||
`/next/${typebotId}-public?Name=Baptiste&Email=email@test.com`
|
||||
)
|
||||
await expect(page.locator('text="Your name is Baptiste"')).toBeVisible()
|
||||
await expect(page.getByPlaceholder('Type your email...')).toHaveValue(
|
||||
'email@test.com'
|
||||
)
|
||||
})
|
||||
Reference in New Issue
Block a user