📦 Upgrade deps to latest version
This commit is contained in:
@ -10,15 +10,13 @@ test('folders navigation should work', async ({ page }) => {
|
||||
await createFolderButton.click()
|
||||
await page.click('text="New folder"')
|
||||
await page.fill('input[value="New folder"]', 'My folder #1')
|
||||
await page.press('input[value="My folder #1"]', 'Enter')
|
||||
await waitForNextApiCall(page)
|
||||
await page.click('li:has-text("My folder #1")')
|
||||
await page.press('input[value="My folder #1"]', 'Enter'),
|
||||
await page.click('li:has-text("My folder #1")')
|
||||
await expect(page.locator('h1:has-text("My folder #1")')).toBeVisible()
|
||||
await createFolderButton.click()
|
||||
await page.click('text="New folder"')
|
||||
await page.fill('input', 'My folder #2')
|
||||
await page.press('input', 'Enter')
|
||||
await waitForNextApiCall(page)
|
||||
|
||||
await page.click('li:has-text("My folder #2")')
|
||||
await expect(page.locator('h1 >> text="My folder #2"')).toBeVisible()
|
||||
@ -55,7 +53,6 @@ test('folders and typebots should be movable', async ({ page }) => {
|
||||
'li:has-text("Draggable typebot")',
|
||||
'li:has-text("Droppable folder")'
|
||||
)
|
||||
await waitForNextApiCall(page)
|
||||
await expect(typebotButton).toBeHidden()
|
||||
await folderButton.click()
|
||||
await expect(page).toHaveURL(new RegExp(`/folders/${droppableFolderId}`))
|
||||
@ -64,7 +61,6 @@ test('folders and typebots should be movable', async ({ page }) => {
|
||||
'li:has-text("Draggable typebot")',
|
||||
'a:has-text("Back")'
|
||||
)
|
||||
await waitForNextApiCall(page)
|
||||
await expect(typebotButton).toBeHidden()
|
||||
await page.click('a:has-text("Back")')
|
||||
await expect(typebotButton).toBeVisible()
|
||||
@ -84,6 +80,3 @@ test.describe('Free user', () => {
|
||||
).toBeVisible()
|
||||
})
|
||||
})
|
||||
|
||||
const waitForNextApiCall = (page: Page, path?: string) =>
|
||||
page.waitForResponse((resp) => resp.url().includes(path ?? '/api'))
|
||||
|
@ -39,20 +39,22 @@ test.describe.parallel('Google sheets integration', () => {
|
||||
await typebotViewer(page)
|
||||
.locator('input[placeholder="Type your email..."]')
|
||||
.fill('georges@gmail.com')
|
||||
await typebotViewer(page)
|
||||
.locator('input[placeholder="Type your email..."]')
|
||||
.press('Enter')
|
||||
await page.waitForResponse(
|
||||
(resp) =>
|
||||
resp
|
||||
.request()
|
||||
.url()
|
||||
.includes(
|
||||
'/api/integrations/google-sheets/spreadsheets/1k_pIDw3YHl9tlZusbBVSBRY0PeRPd2H6t4Nj7rwnOtM/sheets/0'
|
||||
) &&
|
||||
resp.status() === 200 &&
|
||||
resp.request().method() === 'POST'
|
||||
)
|
||||
await Promise.all([
|
||||
page.waitForResponse(
|
||||
(resp) =>
|
||||
resp
|
||||
.request()
|
||||
.url()
|
||||
.includes(
|
||||
'/api/integrations/google-sheets/spreadsheets/1k_pIDw3YHl9tlZusbBVSBRY0PeRPd2H6t4Nj7rwnOtM/sheets/0'
|
||||
) &&
|
||||
resp.status() === 200 &&
|
||||
resp.request().method() === 'POST'
|
||||
),
|
||||
typebotViewer(page)
|
||||
.locator('input[placeholder="Type your email..."]')
|
||||
.press('Enter'),
|
||||
])
|
||||
})
|
||||
|
||||
test('Update row should work', async ({ page }) => {
|
||||
@ -89,20 +91,22 @@ test.describe.parallel('Google sheets integration', () => {
|
||||
await typebotViewer(page)
|
||||
.locator('input[placeholder="Type your email..."]')
|
||||
.fill('test@test.com')
|
||||
await typebotViewer(page)
|
||||
.locator('input[placeholder="Type your email..."]')
|
||||
.press('Enter')
|
||||
await page.waitForResponse(
|
||||
(resp) =>
|
||||
resp
|
||||
.request()
|
||||
.url()
|
||||
.includes(
|
||||
'/api/integrations/google-sheets/spreadsheets/1k_pIDw3YHl9tlZusbBVSBRY0PeRPd2H6t4Nj7rwnOtM/sheets/0'
|
||||
) &&
|
||||
resp.status() === 200 &&
|
||||
resp.request().method() === 'PATCH'
|
||||
)
|
||||
await Promise.all([
|
||||
page.waitForResponse(
|
||||
(resp) =>
|
||||
resp
|
||||
.request()
|
||||
.url()
|
||||
.includes(
|
||||
'/api/integrations/google-sheets/spreadsheets/1k_pIDw3YHl9tlZusbBVSBRY0PeRPd2H6t4Nj7rwnOtM/sheets/0'
|
||||
) &&
|
||||
resp.status() === 200 &&
|
||||
resp.request().method() === 'PATCH'
|
||||
),
|
||||
typebotViewer(page)
|
||||
.locator('input[placeholder="Type your email..."]')
|
||||
.press('Enter'),
|
||||
])
|
||||
})
|
||||
|
||||
test('Get row should work', async ({ page }) => {
|
||||
|
@ -45,7 +45,9 @@ test('results should be deletable', async ({ page }) => {
|
||||
])
|
||||
await createResults({ typebotId, count: 200, isChronological: true })
|
||||
await page.goto(`/typebots/${typebotId}/results`)
|
||||
await selectFirstResults(page)
|
||||
await expect(page.locator('text=content199')).toBeVisible()
|
||||
await page.click('[data-testid="checkbox"] >> nth=1')
|
||||
await page.click('[data-testid="checkbox"] >> nth=2')
|
||||
await page.click('text="Delete"')
|
||||
await deleteButtonInConfirmDialog(page).click()
|
||||
await expect(page.locator('text=content199')).toBeHidden()
|
||||
@ -87,7 +89,9 @@ test('submissions table should have infinite scroll', async ({ page }) => {
|
||||
|
||||
test('should correctly export selection in CSV', async ({ page }) => {
|
||||
await page.goto(`/typebots/${typebotId}/results`)
|
||||
await selectFirstResults(page)
|
||||
await expect(page.locator('text=content199')).toBeVisible()
|
||||
await page.click('[data-testid="checkbox"] >> nth=1')
|
||||
await page.click('[data-testid="checkbox"] >> nth=2')
|
||||
const [download] = await Promise.all([
|
||||
page.waitForEvent('download'),
|
||||
page.locator('text="Export"').click(),
|
||||
@ -181,5 +185,5 @@ const validateExportAll = (data: unknown[]) => {
|
||||
|
||||
const selectFirstResults = async (page: Page) => {
|
||||
await page.click('[data-testid="checkbox"] >> nth=1')
|
||||
return page.click('[data-testid="checkbox"] >> nth=2')
|
||||
await page.click('[data-testid="checkbox"] >> nth=2')
|
||||
}
|
||||
|
Reference in New Issue
Block a user