test(editor): Fix flaky UI tests by preventing truncated project names (no-changelog) (#15919)

This commit is contained in:
Jaakko Husso
2025-06-03 14:21:12 +03:00
committed by GitHub
parent 2e18e07070
commit 702eafaf8e

View File

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