-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
3d74401
commit a13f566
Showing
4 changed files
with
71 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,44 @@ | ||
import type { Prisma, Comment } from '@prisma/client' | ||
import type { ScenarioData } from '@redwoodjs/testing/api' | ||
import type { Prisma } from '@prisma/client' | ||
|
||
export const standard = defineScenario<Prisma.CommentCreateArgs>({ | ||
comment: { | ||
one: { | ||
jane: { | ||
data: { | ||
name: 'String', | ||
body: 'String', | ||
post: { create: { title: 'String', body: 'String' } }, | ||
name: 'Jane Doe', | ||
body: 'I like trees', | ||
post: { | ||
create: { | ||
title: 'Redwood Leaves', | ||
body: 'The quick brown fox jumped over the lazy dog.', | ||
}, | ||
}, | ||
}, | ||
}, | ||
two: { | ||
john: { | ||
data: { | ||
name: 'String', | ||
body: 'String', | ||
post: { create: { title: 'String', body: 'String' } }, | ||
name: 'John Doe', | ||
body: 'Hug a tree today', | ||
post: { | ||
create: { | ||
title: 'Root Systems', | ||
body: 'The five boxing wizards jump quickly.', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}) | ||
|
||
export type StandardScenario = ScenarioData<Comment, 'comment'> | ||
export const postOnly = defineScenario<Prisma.PostCreateArgs>({ | ||
post: { | ||
bark: { | ||
data: { | ||
title: 'Bark', | ||
body: "A tree's bark is worse than its bite", | ||
}, | ||
}, | ||
}, | ||
}) | ||
|
||
export type StandardScenario = typeof standard | ||
export type PostOnlyScenario = typeof postOnly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters