@@ -4,6 +4,7 @@
|
||||
"updatedAt": "2022-03-08T16:07:18.899Z",
|
||||
"name": "My typebot",
|
||||
"folderId": null,
|
||||
"version": "4",
|
||||
"groups": [
|
||||
{
|
||||
"id": "1qQrnsLzRim1LqCrhbj1MW",
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"createdAt": "2022-03-08T15:58:49.720Z",
|
||||
"updatedAt": "2022-03-08T16:07:18.899Z",
|
||||
"name": "My typebot",
|
||||
"version": "4",
|
||||
"folderId": null,
|
||||
"groups": [
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"icon": null,
|
||||
"name": "Another typebot copy",
|
||||
"folderId": null,
|
||||
"version": "4",
|
||||
"groups": [
|
||||
{
|
||||
"id": "clbovazhy000q3b6o716dlfq8",
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"updatedAt": "2022-03-23T08:41:30.106Z",
|
||||
"name": "My typebot",
|
||||
"folderId": null,
|
||||
"version": "4",
|
||||
"groups": [
|
||||
{
|
||||
"id": "cl13bgvlk0000t71a4wabccvw",
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"icon": null,
|
||||
"name": "My typebot copy",
|
||||
"folderId": null,
|
||||
"version": "4",
|
||||
"groups": [
|
||||
{
|
||||
"id": "clbnrow4e000c3b6oycsv9cu3",
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"icon": null,
|
||||
"name": "My typebot",
|
||||
"folderId": null,
|
||||
"version": "4",
|
||||
"groups": [
|
||||
{
|
||||
"id": "cl9ip9u0j0000d71a5d98gwni",
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
deleteWebhooks,
|
||||
importTypebotInDatabase,
|
||||
} from '@typebot.io/lib/playwright/databaseActions'
|
||||
import { HttpMethod } from '@typebot.io/schemas/features/blocks/integrations/webhook/enums'
|
||||
import { HttpMethod } from '@typebot.io/schemas/features/blocks/integrations/webhook/constants'
|
||||
|
||||
test.afterEach(async () => {
|
||||
await deleteWebhooks(['chat-webhook-id'])
|
||||
|
||||
@@ -2,10 +2,7 @@ import test, { expect } from '@playwright/test'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { createTypebots } from '@typebot.io/lib/playwright/databaseActions'
|
||||
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
|
||||
import {
|
||||
defaultChatwootOptions,
|
||||
IntegrationBlockType,
|
||||
} from '@typebot.io/schemas'
|
||||
import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integrations/constants'
|
||||
|
||||
const typebotId = createId()
|
||||
|
||||
@@ -19,7 +16,6 @@ test('should work as expected', async ({ page }) => {
|
||||
{
|
||||
type: IntegrationBlockType.CHATWOOT,
|
||||
options: {
|
||||
...defaultChatwootOptions,
|
||||
websiteToken: chatwootTestWebsiteToken,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import {
|
||||
defaultSettings,
|
||||
defaultTextInputOptions,
|
||||
InputBlockType,
|
||||
Metadata,
|
||||
} from '@typebot.io/schemas'
|
||||
import {
|
||||
createTypebots,
|
||||
updateTypebot,
|
||||
} from '@typebot.io/lib/playwright/databaseActions'
|
||||
import { parseDefaultGroupWithBlock } from '@typebot.io/lib/playwright/databaseHelpers'
|
||||
|
||||
const settings = defaultSettings({ isBrandingEnabled: true })
|
||||
import { InputBlockType } from '@typebot.io/schemas/features/blocks/inputs/constants'
|
||||
import { Settings } from '@typebot.io/schemas'
|
||||
import { defaultTextInputOptions } from '@typebot.io/schemas/features/blocks/inputs/text/constants'
|
||||
|
||||
test('Result should be overwritten on page refresh', async ({ page }) => {
|
||||
const typebotId = createId()
|
||||
@@ -20,9 +15,7 @@ test('Result should be overwritten on page refresh', async ({ page }) => {
|
||||
{
|
||||
id: typebotId,
|
||||
settings: {
|
||||
...settings,
|
||||
general: {
|
||||
...settings.general,
|
||||
rememberUser: {
|
||||
isEnabled: true,
|
||||
storage: 'session',
|
||||
@@ -31,7 +24,6 @@ test('Result should be overwritten on page refresh', async ({ page }) => {
|
||||
},
|
||||
...parseDefaultGroupWithBlock({
|
||||
type: InputBlockType.TEXT,
|
||||
options: defaultTextInputOptions,
|
||||
}),
|
||||
},
|
||||
])
|
||||
@@ -60,7 +52,6 @@ test.describe('Create result on page refresh enabled', () => {
|
||||
id: typebotId,
|
||||
...parseDefaultGroupWithBlock({
|
||||
type: InputBlockType.TEXT,
|
||||
options: defaultTextInputOptions,
|
||||
}),
|
||||
},
|
||||
])
|
||||
@@ -88,7 +79,6 @@ test('Hide query params', async ({ page }) => {
|
||||
id: typebotId,
|
||||
...parseDefaultGroupWithBlock({
|
||||
type: InputBlockType.TEXT,
|
||||
options: defaultTextInputOptions,
|
||||
}),
|
||||
},
|
||||
])
|
||||
@@ -98,8 +88,7 @@ test('Hide query params', async ({ page }) => {
|
||||
await updateTypebot({
|
||||
id: typebotId,
|
||||
settings: {
|
||||
...settings,
|
||||
general: { ...settings.general, isHideQueryParamsEnabled: false },
|
||||
general: { isHideQueryParamsEnabled: false },
|
||||
},
|
||||
})
|
||||
await page.goto(`/${typebotId}-public?Name=John`)
|
||||
@@ -116,7 +105,6 @@ test('Show close message', async ({ page }) => {
|
||||
id: typebotId,
|
||||
...parseDefaultGroupWithBlock({
|
||||
type: InputBlockType.TEXT,
|
||||
options: defaultTextInputOptions,
|
||||
}),
|
||||
isClosed: true,
|
||||
},
|
||||
@@ -127,7 +115,7 @@ test('Show close message', async ({ page }) => {
|
||||
|
||||
test('Should correctly parse metadata', async ({ page }) => {
|
||||
const typebotId = createId()
|
||||
const customMetadata: Metadata = {
|
||||
const customMetadata: Settings['metadata'] = {
|
||||
description: 'My custom description',
|
||||
title: 'Custom title',
|
||||
favIconUrl: 'https://www.baptistearno.com/favicon.png',
|
||||
@@ -138,12 +126,10 @@ test('Should correctly parse metadata', async ({ page }) => {
|
||||
{
|
||||
id: typebotId,
|
||||
settings: {
|
||||
...settings,
|
||||
metadata: customMetadata,
|
||||
},
|
||||
...parseDefaultGroupWithBlock({
|
||||
type: InputBlockType.TEXT,
|
||||
options: defaultTextInputOptions,
|
||||
}),
|
||||
},
|
||||
])
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { HttpMethod } from '@typebot.io/schemas/features/blocks/integrations/webhook/enums'
|
||||
import {
|
||||
createWebhook,
|
||||
importTypebotInDatabase,
|
||||
} from '@typebot.io/lib/playwright/databaseActions'
|
||||
import { getTestAsset } from '@/test/utils/playwright'
|
||||
import { HttpMethod } from '@typebot.io/schemas/features/blocks/integrations/webhook/constants'
|
||||
|
||||
const typebotId = createId()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user