refactor(editor): Fix remaining FE type check errors (no-changelog) (#9607)

Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
Ricardo Espinoza
2024-06-10 09:23:06 -04:00
committed by GitHub
parent 1e15f73b0d
commit 22bdb0568e
84 changed files with 438 additions and 318 deletions

View File

@@ -1,5 +1,10 @@
import { faker } from '@faker-js/faker';
import type { ProjectListItem, ProjectSharingData, ProjectType } from '@/types/projects.types';
import type {
Project,
ProjectListItem,
ProjectSharingData,
ProjectType,
} from '@/types/projects.types';
import { ProjectTypes } from '@/types/projects.types';
export const createProjectSharingData = (projectType?: ProjectType): ProjectSharingData => ({
@@ -19,3 +24,16 @@ export const createProjectListItem = (projectType?: ProjectType): ProjectListIte
updatedAt: faker.date.recent().toISOString(),
};
};
export function createTestProject(data: Partial<Project>): Project {
return {
id: faker.string.uuid(),
name: faker.lorem.words({ min: 1, max: 3 }),
createdAt: faker.date.past().toISOString(),
updatedAt: faker.date.recent().toISOString(),
type: 'team',
relations: [],
scopes: [],
...data,
};
}