2
0

Update tests

This commit is contained in:
Baptiste Arnaud
2024-08-16 17:09:13 +02:00
parent 58d3955e01
commit d197cf9b4d
2 changed files with 9 additions and 9 deletions

View File

@ -26,13 +26,13 @@ test.describe.parallel('Buttons input block', () => {
])
await page.goto(`/typebots/${typebotId}/edit`)
await page.getByRole('textbox').fill('Item 1')
await page.getByRole('textbox').press('Enter')
await page.getByRole('textbox').fill('Item 2')
await page.getByRole('textbox').press('Enter')
await page.getByRole('textbox').fill('Item 3')
await page.getByRole('textbox').press('Enter')
await page.getByRole('textbox').press('Escape')
await page.getByRole('textbox').last().fill('Item 1')
await page.getByRole('textbox').last().press('Enter')
await page.getByRole('textbox').last().fill('Item 2')
await page.getByRole('textbox').last().press('Enter')
await page.getByRole('textbox').last().fill('Item 3')
await page.getByRole('textbox').last().press('Enter')
await page.getByRole('textbox').last().press('Escape')
await page.click('text=Item 2', { button: 'right' })
await page.click('text=Delete')
await expect(page.locator('text=Item 2')).toBeHidden()
@ -82,7 +82,7 @@ test('Variable buttons should work', async ({ page }) => {
await expect(page.getByTestId('guest-bubble')).toHaveText('Variable item')
await expect(page.locator('text=Ok great!')).toBeVisible()
await page.click('text="Item 1"')
await page.getByRole('textbox').fill('{{Item 2}}')
await page.getByRole('textbox').last().fill('{{Item 2}}')
await page.getByTestId('block block1').click({ position: { x: 0, y: 0 } })
await page.click('text=Multiple choice?')
await page.click('text="Restart"')

View File

@ -57,7 +57,7 @@ test('should be configurable', async ({ page }) => {
await page.waitForTimeout(1000)
await page.getByTestId('selected-item-label').first().click({ force: true })
await page.click('button >> text=Current typebot')
await page.getByRole('textbox').nth(1).click()
await page.getByRole('textbox').nth(2).click()
await page.click('button >> text=Hello')
await page.click('text=Test')