Ci: PR workflow integration tests#89
Open
QuaidBartolomei wants to merge 45 commits intoGreenstand:mainfrom
Open
Ci: PR workflow integration tests#89QuaidBartolomei wants to merge 45 commits intoGreenstand:mainfrom
QuaidBartolomei wants to merge 45 commits intoGreenstand:mainfrom
Conversation
52345db to
671e7c4
Compare
05ea7b3 to
cbd2fee
Compare
dadiorchen
reviewed
Mar 1, 2022
__tests__/e2e/species.spec.ts
Outdated
Comment on lines
+2
to
+3
| import examplePlanter from '@mocks/planters/examplePlanter.json'; | ||
| import exampleSpecies from '@mocks/species/exampleSpecies.json'; |
Contributor
There was a problem hiding this comment.
@QuaidBartolomei what's this interesting thing about?
Contributor
Author
There was a problem hiding this comment.
I need to seed data into the db that is being created in the new pr workflow. The existing json objects are outdated and unable to be inserted so I created some new ones. The @mocks/ path is a path alias I added to jest.config.js so I don't have to use the relative paths
3af73eb to
df39f6a
Compare
test(mock): update mock tree data
test(seed): wallet data
test(planter): skip test of bugged route
6f0e15b to
479a15d
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR will enhance our PR github action workflow by including integration tests. In order to run the tests a new database needs to be created each time. This is accomplished by using the docker postgis image and running sql code to create the schemas and tables. Then the empty tables need to be seeded with the necessary test data.
Database seeding conditionally occurs in
.jest/globalSetup.tsifprocess.env.SEED === 'true'I had to mark a few tests for skipping because they would not pass with the seed data:
trees/featured,countries/leaderboard: These routes currently only have placeholder/mock implementations. The tests will need to be changed once the routes are complete so it was not worth it for me to spend time creating seed data for them.planters?organization_id=1&limit=1: This route is currently bugged and the existing test is passing because of a false positive #93tsconfig-paths was added as a dev dep so that .jest/globalConfig can use the path alias defined in tsconfig.base.ts.