📦 Update cuid to cuid2

This commit is contained in:
Baptiste Arnaud
2023-02-10 15:06:02 +01:00
parent 2dbf0fb848
commit 51f76700b2
77 changed files with 254 additions and 250 deletions

View File

@@ -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,

View File

@@ -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 }) => {

View File

@@ -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 }) => {

View File

@@ -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 }) => {

View File

@@ -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 }) => {

View File

@@ -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' }

View File

@@ -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 }) => {