-
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
feat: Remove duplicated Destination
enums, add Send
test coverage
#3843
Conversation
SendDestination
enums, add Send
test coverage
SendDestination
enums, add Send
test coverageDestination
enums, add Send
test coverage
const url = `${ | ||
import.meta.env.VITE_APP_API_URL | ||
}/create-send-events/${sessionId}`; | ||
const request: any = useAsync(async () => { |
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.
This any
was the cause of a bug where event ids are not logged to the breadcrumb.
The list below has request.value.bops
, request.value.uniform
etc, but it should be request.value.data.bops
, request.value.data.uniform
etc
Removed vultr server and associated DNS entries |
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.
These ids will be UUIDs, just correctly updating mock here.
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.
Nice simplifications throughout here, thanks !
Code looks good, but I admittedly have not tried manual submissions for each destination on the pizza - are we trusting E2E coverage there or waiting until staging or what do you think?
breadcrumbs: { | ||
findProperty: { | ||
data: { | ||
"property.localAuthorityDistrict": ["Some local authority district"] |
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.
nit: more realistic mock here would be ["Buckinghamshire", "Historic district name"]
- eg because I think we want to confirm we are correctly filtering modern council name out of property.localAuthorityDistrict
array !
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.
Ah of course - very good catch - best to be as explicit and through as possible here.
Updated in 480d86b
bopsSendEventId: hasuraEventsResponseMock.bops.event_id, | ||
uniformSendEventId: hasuraEventsResponseMock.uniform.event_id, | ||
})); | ||
}); |
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.
Test coverage is long overdue, clear & thorough here, thank you!!
Likewise - I've not manually tested each submission here, just the event creation which this should only be touching. I've got a good degree of confidence that current test coverage is good here 👍 |
What does this PR do?
SendIntegration
type fromplanx-core
(please see feat: Add send integration types planx-core#540)Destination
enumDestination
enumSend
component - currently this does not work on staging - due to an incorrect type the breadcrumb remains emptyAlso...
Picked up a few associated refactors in the frontend
Send
component, alongside adding some test coverage for theSend
component.What's the motivation here?
As part of the GOSS integration I'm aiming to write some docs on "how to set up a send integration". This work is aiming to simplify this process so that it hopefully boils down to just the following -
SendIntegration
array inplanx-core
planx-new
Editor componentHopefully then TypeScript will do a lot of the heavy lifting for the places where there are references to
SendIntegrations
that need to be updated.There's still some room for improvement here I think - there's repeated logic in a few places still, but I'll pick up additional changes in another PR if they feel necessary. This is a big enough PR for now!