Added product admin features

This commit is contained in:
Niklas Fondberg
2021-07-26 10:35:52 +02:00
committed by GitHub
parent 32adee1bf4
commit d17df41d86
38 changed files with 1613 additions and 381 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ Then head over to [The playground GUI](https://localhost:4000) in the browser
## Run tests
Scripts will create the insert sql files for a randomized fake data postgres database. This database is based of the actual db in photowall project.
```
npm test
```
@@ -27,6 +28,6 @@ The tests are held in testcontainers [testcontainers-node](https://github.com/te
Each test is build around inserting fake data in the empty db, fetching that data through the GraphQL and with raw Sql queries and then comparing the results.
To write new inserts into the DB generate sql files with js in the src/__test__/db_generator tool. Then load the new sql file in the containerSetup.ts file.
To write new inserts into the DB generate sql files with js in the src/**test**/db_generator tool. Then load the new sql file in the containerSetup.ts file.
When you have the data you need in the db, write tests in all.test.ts file following the pattern already set.