-
Notifications
You must be signed in to change notification settings - Fork 9
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
#292 | Service Check - Add diff on expected vs actual body #402
base: master
Are you sure you want to change the base?
Conversation
{bodyMessage === 'NO MATCH' ? ( | ||
<StyledPopoverTextWrapper> | ||
<StyledPopoverText> | ||
<StyledPopoverHeader>EXPECTED RESPONSE BODY</StyledPopoverHeader> |
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.
just EXPECTED RESPONSE
and ACTUAL RESPONSE
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.
Yeah and please move this to const too
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.
Fixed in commit 297f448
@@ -39,7 +46,20 @@ export const PopoverWithControls = ({ | |||
> | |||
{withCopy ? <Button onClick={copyBody}>Copy</Button> : null} | |||
<Button onClick={handlePopoverClose}>Close</Button> | |||
<StyledPopoverText>{body}</StyledPopoverText> | |||
{bodyMessage === 'NO MATCH' ? ( |
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.
You can move 'NO MATCH' string to const
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.
Fixed in commit 297f448
{expectedResponseBody} | ||
</StyledPopoverText> | ||
<StyledPopoverText> | ||
<StyledPopoverHeader>RECIVED RESPONSE BODY</StyledPopoverHeader> |
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 guess you wanted to write 'RECEIVED' 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.
Fixed in commit 297f448
@@ -128,12 +128,29 @@ export const StyledFormControl = styled(FormControl)` | |||
max-width: 300px; | |||
`; | |||
|
|||
export const StyledPopoverText = styled(Typography)` | |||
export const StyledPopoverText = styled('div')` |
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 you create a styled component for html selector you can simply write
export const StyledPopoverText = styled('div')` | |
export const StyledPopoverText = styled.div` |
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.
Fixed in commit 297f448
#292 Widget | Service Check - Add diff on expected vs actual body
Description
Added split view for Request and Expected Response body when Responses do not match.
Motivation and Context
Thanks to split view user will be able to quickly diagnose what was expected and what was recived.
Screenshots (if appropriate)
Types of changes
Checklist:
I hereby agree to the terms of the Cogboard Contributor License Agreement.