From 702eafaf8ec5caa40055c84b07c1133765fadf78 Mon Sep 17 00:00:00 2001 From: Jaakko Husso Date: Tue, 3 Jun 2025 14:21:12 +0300 Subject: [PATCH] test(editor): Fix flaky UI tests by preventing truncated project names (no-changelog) (#15919) --- packages/frontend/editor-ui/src/__tests__/data/projects.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/frontend/editor-ui/src/__tests__/data/projects.ts b/packages/frontend/editor-ui/src/__tests__/data/projects.ts index d7c26b245e..a8c99af1f1 100644 --- a/packages/frontend/editor-ui/src/__tests__/data/projects.ts +++ b/packages/frontend/editor-ui/src/__tests__/data/projects.ts @@ -6,10 +6,11 @@ import type { ProjectType, } from '@/types/projects.types'; import { ProjectTypes } from '@/types/projects.types'; +import { MAX_NAME_LENGTH } from '@/utils/projects.utils'; export const createProjectSharingData = (projectType?: ProjectType): ProjectSharingData => ({ id: faker.string.uuid(), - name: faker.lorem.words({ min: 1, max: 3 }), + name: faker.lorem.words({ min: 1, max: 3 }).slice(0, MAX_NAME_LENGTH).trimEnd(), icon: { type: 'icon', value: 'folder' }, type: projectType ?? ProjectTypes.Personal, createdAt: faker.date.past().toISOString(),