2
0

feat(editor): Duplicate blocks & steps

This commit is contained in:
Baptiste Arnaud
2022-03-23 11:00:43 +01:00
parent 07042137fb
commit c01ffa3f0b
6 changed files with 62 additions and 8 deletions

View File

@ -111,11 +111,15 @@ test.describe.parallel('Editor', () => {
await page.goto(`/typebots/${typebotId}/edit`)
await page.click('text=Block #1', { button: 'right' })
await page.click('text=Duplicate')
await expect(page.locator('text="Block #1"')).toBeVisible()
await expect(page.locator('text="Block #1 copy"')).toBeVisible()
await page.click('text="Block #1"', { button: 'right' })
await page.click('text=Delete')
await expect(page.locator('text=Block #1')).toBeHidden()
await expect(page.locator('text="Block #1"')).toBeHidden()
await page.click('button[aria-label="Undo"]')
await expect(page.locator('text=Block #1')).toBeVisible()
await expect(page.locator('text="Block #1"')).toBeVisible()
await page.click('button[aria-label="Redo"]')
await expect(page.locator('text=Block #1')).toBeHidden()
await expect(page.locator('text="Block #1"')).toBeHidden()
})
})