This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/cypress/e2e/project/prepareProjects.ts

19 lines
463 B
TypeScript
Raw Normal View History

2021-11-17 17:11:19 +00:00
import {ListFactory} from '../../factories/list'
import {NamespaceFactory} from '../../factories/namespace'
import {TaskFactory} from '../../factories/task'
export function createLists() {
NamespaceFactory.create(1)
const lists = ListFactory.create(1, {
title: 'First List'
})
TaskFactory.truncate()
return lists
}
2023-01-24 20:55:09 +00:00
export function prepareLists(setLists = (...args: any[]) => {}) {
2021-11-17 17:11:19 +00:00
beforeEach(() => {
const lists = createLists()
2021-11-17 17:11:19 +00:00
setLists(lists)
})
}