Skip to content

[CAD/Project File Reviews] - Create Test Data for Parts #3165

@chpy04

Description

@chpy04

Description

We want to have generic seed data that can be used for testing future endpoints/frontend features. This should consist of utils functions to create a part as well as a variety of different examples of parts using this function. Creating submissions and reviews are in a different ticket, so those fields can be left as an empty array for the time being.

Acceptance Criteria

There should be a utils function to create parts in the test-utils.ts file. There should then be examples made in the seed data. There should be a range of different examples including with and without optional fields, and other applicable edge cases. The submissions field can be left as an empty array for this ticket. Examples should have informative names.

Proposed Solution

Create functions in test-utils.ts file that take in all fields for each model, and create prisma objects using that data. Additionally, create example parts in a parts.seed.ts file in prisma/seed-data, which are of type Prisma.PartCreateArgs. These should then be used in seed.ts to create all the examples

Mocks

No response

Metadata

Metadata

Assignees

Labels

back-endstaleHasn't been updated in a while

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions