2
0

feat: Add new onboarding flow

This commit is contained in:
Baptiste Arnaud
2022-03-23 09:56:39 +01:00
parent f9aba27aae
commit f4e6f63b26
32 changed files with 1115 additions and 89 deletions

View File

@ -41,26 +41,4 @@ test.describe.parallel('Text input step', () => {
).toBeVisible()
await expect(typebotViewer(page).locator(`text=Go`)).toBeVisible()
})
test('variable in URL should prefill the input', async ({ page }) => {
const typebotId = cuid()
await createTypebots([
{
id: typebotId,
...parseDefaultBlockWithStep({
type: InputStepType.TEXT,
options: { ...defaultTextInputOptions, variableId: 'var1' },
}),
},
])
await page.goto(`/typebots/${typebotId}/edit?var1=My prefilled answer`)
await page.click('text=Preview')
await expect(
typebotViewer(page).locator(
`input[placeholder="${defaultTextInputOptions.labels.placeholder}"]`
)
).toHaveAttribute('value', 'My prefilled answer')
await expect(typebotViewer(page).locator(`button`)).toBeEnabled()
})
})