2
0

refactor: ♻️ Rename step to block

This commit is contained in:
Baptiste Arnaud
2022-06-11 07:27:38 +02:00
parent 8751766d0e
commit 2df8338505
297 changed files with 4292 additions and 3989 deletions

View File

@@ -1,19 +1,19 @@
import test from '@playwright/test'
import {
createTypebots,
parseDefaultBlockWithStep,
parseDefaultGroupWithBlock,
} from '../../services/database'
import { defaultGoogleAnalyticsOptions, IntegrationStepType } from 'models'
import { defaultGoogleAnalyticsOptions, IntegrationBlockType } from 'models'
import cuid from 'cuid'
test.describe('Google Analytics step', () => {
test.describe('Google Analytics block', () => {
test('its configuration should work', async ({ page }) => {
const typebotId = cuid()
await createTypebots([
{
id: typebotId,
...parseDefaultBlockWithStep({
type: IntegrationStepType.GOOGLE_ANALYTICS,
...parseDefaultGroupWithBlock({
type: IntegrationBlockType.GOOGLE_ANALYTICS,
options: defaultGoogleAnalyticsOptions,
}),
},

View File

@@ -6,7 +6,7 @@ import cuid from 'cuid'
const typebotId = cuid()
test.describe('Send email step', () => {
test.describe('Send email block', () => {
test('its configuration should work', async ({ page }) => {
if (
!process.env.SMTP_USERNAME ||

View File

@@ -4,7 +4,7 @@ import path from 'path'
import { HttpMethod } from 'models'
import cuid from 'cuid'
test.describe('Webhook step', () => {
test.describe('Webhook block', () => {
test('easy configuration should work', async ({ page }) => {
const typebotId = cuid()
await importTypebotInDatabase(
@@ -25,7 +25,7 @@ test.describe('Webhook step', () => {
)
await page.click('text=Test the request')
await expect(page.locator('div[role="textbox"] >> nth=-1')).toContainText(
`"Block #1": "answer value", "Block #2": "20", "Block #2 (1)": "Yes"`
`"Group #1": "answer value", "Group #2": "20", "Group #2 (1)": "Yes"`
)
})
test('Generated body should work', async ({ page }) => {