2
0

feat(engine): Add link support in text bubbles

This commit is contained in:
Baptiste Arnaud
2022-02-10 10:51:29 +01:00
parent 8c8d77e052
commit 0338acae82
5 changed files with 91 additions and 60 deletions

View File

@ -41,6 +41,14 @@ test.describe('Text bubble step', () => {
await page.type('div[role="textbox"]', 'Everything text')
await page.press('div[role="textbox"]', 'Shift+Enter')
await page.type('div[role="textbox"]', 'My super link')
await page.press('div[role="textbox"]', 'Shift+Meta+ArrowLeft')
await page.waitForTimeout(200)
page.on('dialog', async (dialog) => {
await dialog.accept('https://github.com')
})
await page.click('[data-testid="link-button"]')
await page.click('text=Preview')
await expect(
typebotViewer(page).locator('span.slate-bold >> nth=0')
@ -51,5 +59,8 @@ test.describe('Text bubble step', () => {
await expect(
typebotViewer(page).locator('span.slate-underline >> nth=0')
).toHaveText('Underlined text')
await expect(
typebotViewer(page).locator('a[href="https://github.com"]')
).toHaveText('My super link')
})
})