treetracker-web-map-client
treetracker-web-map-client copied to clipboard
Feat: add integration test for the stakeholder
Description
comment: # I mock some data following the new v2/stakeholder/[stakeholderid] api for the cypress integration test.
Fixes #1769
Type of change
- [x] New feature (non-breaking change which adds functionality)
Screenshots
| Before | After |
|---|---|
| "screenshot before" |
How Has This Been Tested?
- [x] Cypress integration
Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules
@GuningShen your pull request looks pretty good, I added some comment:
- The mock data above
- Please fix the failure unit test, you can check the log by clicking the
details
Hi, @dadiorchen thanks for commenting. I am quite confused looking at the stakeholder schema. It seems the new version does not contain fields like created_at, org_name, etc and I cannot figure out how to render the organization page without mocking those variables.
@GuningShen sorry for the inconvenience, the final definition of stakeholder is here:
Table "stakeholder.stakeholder"
Column | Type | Collation | Nullable | Default
------------+--------------------------+-----------+----------+--------------------
id | uuid | | not null | uuid_generate_v4()
type | character varying | | not null |
org_name | character varying | | |
first_name | character varying | | |
last_name | character varying | | |
email | character varying | | |
phone | character varying | | |
website | character varying | | |
logo_url | character varying | | |
map | character varying | | |
created_at | timestamp with time zone | | not null | now()
updated_at | timestamp with time zone | | not null | now()
active | boolean | | not null | true
entity_id | integer | | |
The yaml file is out of date, so please mock the stakeholder based on this db structure.
Aslo it would be great if you can raise a pr to update our yaml file in query API.
Aslo it would be great if you can raise a pr to update our yaml file in query API.
I just submitted a pr in query API! Please check that out. Thanks.
@GuningShen sorry for the late review, could solve these conflict? we want to merge your pr
@GuningShen sorry for the late review, could solve these conflict? we want to merge your pr
Hi @dadiorchen , I just resolved all the merge conflicts. Could you check whether my code looks good to you?