refactor: ♻️ Rename step to block
This commit is contained in:
@@ -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,
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -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 ||
|
||||
|
||||
@@ -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 }) => {
|
||||
|
||||
Reference in New Issue
Block a user