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

@ -80,7 +80,10 @@ test.describe.parallel('Image bubble step', () => {
await page.click('text=Click to edit...')
await page.click('text=Giphy')
await page.click('img >> nth=3', { force: true })
await page.click('img >> nth=3', {
force: true,
position: { x: 0, y: 0 },
})
await expect(page.locator('img[alt="Step image"]')).toHaveAttribute(
'src',
new RegExp('giphy.com/media', 'gm')

View File

@ -54,7 +54,7 @@ test.describe('Dashboard page', () => {
test.use({
storageState: path.join(__dirname, '../freeUser.json'),
})
test("create folder shouldn't be available", async ({ page }) => {
test("Add my domain shouldn't be available", async ({ page }) => {
await page.goto(`/typebots/${typebotId}/share`)
await page.click('text=Add my domain')
await expect(page.locator('text=Upgrade now')).toBeVisible()

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()
})
})