2
0

refactor: ♻️ Migrate from short-uuid to cuid lib

This commit is contained in:
Baptiste Arnaud
2022-03-18 12:30:42 +01:00
parent 64bafd15a1
commit 1423c14547
47 changed files with 120 additions and 132 deletions

View File

@ -6,7 +6,7 @@ import {
import { BubbleStepType, defaultImageBubbleContent } from 'models'
import { typebotViewer } from '../../services/selectorUtils'
import path from 'path'
import { generate } from 'short-uuid'
import cuid from 'cuid'
const unsplashImageSrc =
'https://images.unsplash.com/photo-1504297050568-910d24c426d3?ixlib=rb-1.2.1&ixid=MnwxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1287&q=80'
@ -14,7 +14,7 @@ const unsplashImageSrc =
test.describe.parallel('Image bubble step', () => {
test.describe('Content settings', () => {
test('should upload image file correctly', async ({ page }) => {
const typebotId = generate()
const typebotId = cuid()
await createTypebots([
{
id: typebotId,
@ -42,7 +42,7 @@ test.describe.parallel('Image bubble step', () => {
})
test('should import image link correctly', async ({ page }) => {
const typebotId = generate()
const typebotId = cuid()
await createTypebots([
{
id: typebotId,
@ -65,7 +65,7 @@ test.describe.parallel('Image bubble step', () => {
})
test('should import gifs correctly', async ({ page }) => {
const typebotId = generate()
const typebotId = cuid()
await createTypebots([
{
id: typebotId,
@ -90,7 +90,7 @@ test.describe.parallel('Image bubble step', () => {
test.describe('Preview', () => {
test('should display correctly', async ({ page }) => {
const typebotId = generate()
const typebotId = cuid()
await createTypebots([
{
id: typebotId,

View File

@ -5,11 +5,11 @@ import {
} from '../../services/database'
import { BubbleStepType, defaultTextBubbleContent } from 'models'
import { typebotViewer } from '../../services/selectorUtils'
import { generate } from 'short-uuid'
import cuid from 'cuid'
test.describe('Text bubble step', () => {
test('rich text features should work', async ({ page }) => {
const typebotId = generate()
const typebotId = cuid()
await createTypebots([
{
id: typebotId,

View File

@ -9,7 +9,7 @@ import {
VideoBubbleContentType,
} from 'models'
import { typebotViewer } from '../../services/selectorUtils'
import { generate } from 'short-uuid'
import cuid from 'cuid'
const videoSrc =
'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4'
@ -19,7 +19,7 @@ const vimeoVideoSrc = 'https://vimeo.com/649301125'
test.describe.parallel('Video bubble step', () => {
test.describe('Content settings', () => {
test('should import video url correctly', async ({ page }) => {
const typebotId = generate()
const typebotId = cuid()
await createTypebots([
{
id: typebotId,
@ -43,7 +43,7 @@ test.describe.parallel('Video bubble step', () => {
test.describe('Preview', () => {
test('should display video correctly', async ({ page }) => {
const typebotId = generate()
const typebotId = cuid()
await createTypebots([
{
id: typebotId,
@ -65,7 +65,7 @@ test.describe.parallel('Video bubble step', () => {
})
test('should display youtube video correctly', async ({ page }) => {
const typebotId = generate()
const typebotId = cuid()
await createTypebots([
{
id: typebotId,
@ -89,7 +89,7 @@ test.describe.parallel('Video bubble step', () => {
})
test('should display vimeo video correctly', async ({ page }) => {
const typebotId = generate()
const typebotId = cuid()
await createTypebots([
{
id: typebotId,