vikunja-frontend/cypress/factories/user.js
Dominik Pschenitschni 78baf4c662
fix(faker): imports
2022-06-22 21:30:30 +02:00

21 lines
No EOL
513 B
JavaScript

import {faker} from '@faker-js/faker'
import {Factory} from '../support/factory'
import {formatISO} from "date-fns"
export class UserFactory extends Factory {
static table = 'users'
static factory() {
const now = new Date()
return {
id: '{increment}',
username: faker.lorem.word(10) + faker.datatype.uuid(),
password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.', // 1234
status: 0,
created: formatISO(now),
updated: formatISO(now)
}
}
}