-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix saving complaints with coordinates - Bug/CE-447 #276
Conversation
Quality Gate failedFailed conditions 94.3% Duplication on New Code (required ≤ 3%) |
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.
I'm not sure we need a whole new test for this. I think you can just add the coordinates to allegation-details-create.cy.ts and hwcr-details-create.cy.ts
cy.get("#comp-details-edit-x-coordinate-input").click({ force: true });
cy.get("#comp-details-edit-x-coordinate-input").clear().type(createCallDetails.xCoord);
cy.get("#comp-details-edit-y-coordinate-input").click({ force: true });
cy.get("#comp-details-edit-y-coordinate-input").clear().type(createCallDetails.yCoord);
We can add coordinates to the existing tests. However, these tests also accept an address via “Location” field. The app then passes the address to Geocoder and gets the coordinates. If we provide both an address and coordinates the app will bypass address extraction/validation and just use the coordinates we passed. I guess we may still want to preserve the test case when coordinates are obtained from the address and have a separate test with input coordinates. Let me know if otherwise. |
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.
Okay thanks that makes sense.
Description
When attempting to create a complaint with coordinates the application displays a toast “Unable to create complaint” and fails to save the complaint data.
The issue occurs because on the backend PostGIS fails to create geometry object from the input JSON if the object type is not passed. To fix the issue I modified a front-end component to have the object type in addition to coordinates.
Fixes # (CE-447)
How Has This Been Tested?
Checklist
Thanks for the PR!
Any successful deployments (not always required) will be available below.
Backend available
Frontend available
Once merged, code will be promoted and handed off to following workflow run.
Main Merge Workflow