mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
test(editor): Fix flaky UI tests by preventing truncated project names (no-changelog) (#15919)
This commit is contained in:
@@ -6,10 +6,11 @@ import type {
|
|||||||
ProjectType,
|
ProjectType,
|
||||||
} from '@/types/projects.types';
|
} from '@/types/projects.types';
|
||||||
import { ProjectTypes } from '@/types/projects.types';
|
import { ProjectTypes } from '@/types/projects.types';
|
||||||
|
import { MAX_NAME_LENGTH } from '@/utils/projects.utils';
|
||||||
|
|
||||||
export const createProjectSharingData = (projectType?: ProjectType): ProjectSharingData => ({
|
export const createProjectSharingData = (projectType?: ProjectType): ProjectSharingData => ({
|
||||||
id: faker.string.uuid(),
|
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' },
|
icon: { type: 'icon', value: 'folder' },
|
||||||
type: projectType ?? ProjectTypes.Personal,
|
type: projectType ?? ProjectTypes.Personal,
|
||||||
createdAt: faker.date.past().toISOString(),
|
createdAt: faker.date.past().toISOString(),
|
||||||
|
|||||||
Reference in New Issue
Block a user