-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backend] Implement Karate tests for apartment_images table #85
base: main
Are you sure you want to change the base?
Backend] Implement Karate tests for apartment_images table #85
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @akintewe, I hope you're doing well, thanks a lot for the work, I have a question, could you tell why you have two migrations as Aparments Images in the folder? Is not neccesary to create a folder default, you can use the: \Backend\migrations\safetrust
migrations folder
} | ||
""" | ||
When method POST | ||
Then status 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When creating a new resource or object (such as an apartment image), the HTTP status code should ideally be 201 Created instead of 200 OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright ill modify it
} | ||
} | ||
""" | ||
When method POST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method in this Scenario could be Delete with the Status 204
Thanks a lot, on it |
Done @sotoJ24 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akintewe , I think we don't need to add migrations to add test data, as we already have seeds in charge of this.
Can you please remove:
- the new migration.
Also, why do we need the tests/metadata
files?
alright ill fix this |
I have removed the migration, the metadata is needed because they define the GraphQL API structure for Hasura, and also they setup the table tracking and relationships, they can also configure permissions for the admin role. @rvalenciano |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear @akintewe, could you please remove the file
tests/metadata/databases/
file, can you use the
/Backend/metadata/databases/safetrust
in its place.
also, we would be grateful if you could replace the file metadata/databases/safetrust/
with the tests/metadata/databases/
file metadata_apartment_images.yaml
.
for the tests/metadata/databases/default/tables/public_apartment_images.yaml
you apply here,
regards and thanks so much
Please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dear @akintewe the test passes the following scenarios:
- Checking the health of the GraphQL endpoint ✅.
- Checking the apartment_images schema✅.
- Checking the query permissions✅.
- Verify the existence of the apartment_images table✅.
fails the following scenarios:
Thank you very much for adding the aparment_images.yaml in the metadata folder.
Description
Implements comprehensive Karate tests for apartment_images table functionality.
Type of change
Changes made
How to test
bash
docker compose -f docker-compose-test.yml up -d
bash
docker compose -f docker-compose-test.yml run --rm karate
Checklist
Related Issues
Closes #82