📦 Update cuid to cuid2
This commit is contained in:
@@ -28,7 +28,7 @@ import { byId, isNotDefined } from 'utils'
|
||||
import { PlusIcon } from '@/components/icons'
|
||||
import { ConditionItemForm } from './ConditionItemForm'
|
||||
import { useGraph } from '@/features/graph'
|
||||
import cuid from 'cuid'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
|
||||
type Props = {
|
||||
item: ConditionItem
|
||||
@@ -55,7 +55,7 @@ export const ConditionItemNode = ({ item, isMouseOver, indices }: Props) => {
|
||||
const handlePlusClick = (event: React.MouseEvent) => {
|
||||
event.stopPropagation()
|
||||
const itemIndex = indices.itemIndex + 1
|
||||
const newItemId = cuid()
|
||||
const newItemId = createId()
|
||||
createItem(
|
||||
{
|
||||
blockId: item.blockId,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { typebotViewer } from 'utils/playwright/testHelpers'
|
||||
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
|
||||
import cuid from 'cuid'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { getTestAsset } from '@/test/utils/playwright'
|
||||
|
||||
const typebotId = cuid()
|
||||
const typebotId = createId()
|
||||
|
||||
test.describe('Condition block', () => {
|
||||
test('its configuration should work', async ({ page }) => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { typebotViewer } from 'utils/playwright/testHelpers'
|
||||
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
|
||||
import cuid from 'cuid'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { getTestAsset } from '@/test/utils/playwright'
|
||||
|
||||
const typebotId = cuid()
|
||||
const typebotId = createId()
|
||||
|
||||
test.describe('Redirect block', () => {
|
||||
test('its configuration should work', async ({ page, context }) => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { typebotViewer } from 'utils/playwright/testHelpers'
|
||||
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
|
||||
import cuid from 'cuid'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { getTestAsset } from '@/test/utils/playwright'
|
||||
|
||||
const typebotId = cuid()
|
||||
const typebotId = createId()
|
||||
|
||||
test.describe('Script block', () => {
|
||||
test('script should trigger', async ({ page }) => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { typebotViewer } from 'utils/playwright/testHelpers'
|
||||
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
|
||||
import cuid from 'cuid'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { getTestAsset } from '@/test/utils/playwright'
|
||||
|
||||
const typebotId = cuid()
|
||||
const typebotId = createId()
|
||||
|
||||
test.describe('Set variable block', () => {
|
||||
test('its configuration should work', async ({ page }) => {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { typebotViewer } from 'utils/playwright/testHelpers'
|
||||
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
|
||||
import cuid from 'cuid'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { getTestAsset } from '@/test/utils/playwright'
|
||||
|
||||
test('should be configurable', async ({ page }) => {
|
||||
const typebotId = cuid()
|
||||
const linkedTypebotId = cuid()
|
||||
const typebotId = createId()
|
||||
const linkedTypebotId = createId()
|
||||
await importTypebotInDatabase(
|
||||
getTestAsset('typebots/logic/linkTypebots/1.json'),
|
||||
{ id: typebotId, name: 'My link typebot 1' }
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import test, { expect } from '@playwright/test'
|
||||
import { typebotViewer } from 'utils/playwright/testHelpers'
|
||||
import { importTypebotInDatabase } from 'utils/playwright/databaseActions'
|
||||
import cuid from 'cuid'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { getTestAsset } from '@/test/utils/playwright'
|
||||
|
||||
const typebotId = cuid()
|
||||
const typebotId = createId()
|
||||
|
||||
test.describe('Wait block', () => {
|
||||
test('wait should trigger', async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user