diff --git a/frontend/cypress/factories/project.ts b/frontend/cypress/factories/project.ts index 8530dc1dd..ce31d2308 100644 --- a/frontend/cypress/factories/project.ts +++ b/frontend/cypress/factories/project.ts @@ -2,7 +2,7 @@ import {Factory} from '../support/factory' import {faker} from '@faker-js/faker' export interface ProjectAttributes { - id: number | string; // Allow string for '{increment}' + id: number | '{increment}'; title: string; owner_id: number; created: string; @@ -12,7 +12,7 @@ export interface ProjectAttributes { export class ProjectFactory extends Factory { static table = 'projects' - static factory(): Omit & { id: string } { // id is '{increment}' before seeding + static factory() { const now = new Date() return { @@ -23,4 +23,4 @@ export class ProjectFactory extends Factory { updated: now.toISOString(), } } -} \ No newline at end of file +} diff --git a/frontend/cypress/factories/token.ts b/frontend/cypress/factories/token.ts index a51692fd0..e15979654 100644 --- a/frontend/cypress/factories/token.ts +++ b/frontend/cypress/factories/token.ts @@ -2,7 +2,7 @@ import {faker} from '@faker-js/faker' import {Factory} from '../support/factory' export interface TokenAttributes { - id: number | string; // Allow string for '{increment}' + id: number | '{increment}'; user_id: number; token: string; kind: number; @@ -26,4 +26,4 @@ export class TokenFactory extends Factory { ...(attrs ?? {}), } } -} \ No newline at end of file +} diff --git a/frontend/cypress/factories/user.ts b/frontend/cypress/factories/user.ts index a685e24ac..e07ba9f95 100644 --- a/frontend/cypress/factories/user.ts +++ b/frontend/cypress/factories/user.ts @@ -3,7 +3,7 @@ import {faker} from '@faker-js/faker' import {Factory} from '../support/factory' export interface UserAttributes { - id: number | string; + id: number | '{increment}'; username: string; password?: string; status: number; @@ -16,7 +16,7 @@ export interface UserAttributes { export class UserFactory extends Factory { static table = 'users' - static factory(): Omit & { id: string; password?: string } { + static factory() { const now = new Date() return { @@ -30,4 +30,4 @@ export class UserFactory extends Factory { updated: now.toISOString(), } } -} \ No newline at end of file +}