-
Notifications
You must be signed in to change notification settings - Fork 7
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(ui-library): align hint and error message icons #1059
Conversation
@@ -34,6 +34,23 @@ describe('blr-checkbox', () => { | |||
expect(className).to.contain('input-control'); | |||
}); | |||
|
|||
it('has error Icon is set to undefined', 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.
Please adjust it to it('has error Icon set to undefined'...) [remove 'is'] so that it will be consistency with others.
); | ||
|
||
const formCaption = querySelectorDeep('.blr-form-caption', element?.getRootNode() as HTMLElement); | ||
|
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.
Please remove this extra new line.
BlrRadioGroupRenderFunction({ | ||
...sampleParams, | ||
hasHint: false, | ||
hasError: false, |
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.
hasError needs to be true
BlrRadioRenderFunction({ | ||
...sampleParams, | ||
hasHint: false, | ||
hasError: false, |
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.
hasError needs to be true
const labelWrapper = querySelectorDeep('.label-wrapper', element.getRootNode() as HTMLElement); | ||
const captionWrapper = querySelectorDeep('.caption-wraper', labelWrapper?.getRootNode() as HTMLElement); | ||
const formCaption = querySelectorDeep('.blr-form-caption', captionWrapper?.getRootNode() as HTMLElement); | ||
|
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 extra new line can be removed for the consistency purpose. Right now they are mixed up.
BlrTextareaRenderFunction({ | ||
...sampleParams, | ||
hasHint: false, | ||
hasError: false, |
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.
hasError needs to be true
|
||
const textarea = querySelectorDeep('textarea', element.getRootNode() as HTMLElement); | ||
const formCaption = querySelectorDeep('.blr-form-caption', textarea?.getRootNode() as HTMLElement); | ||
|
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.
Please remove this extra new line.
const formCaptions = querySelectorAllDeep('blr-form-caption', captionWrapper?.getRootNode() as HTMLElement); | ||
|
||
const formCaptionError = querySelectorDeep('.blr-form-caption', formCaptions[1] as HTMLElement); | ||
const errorIcon = formCaptionError?.getAttribute('errorIcon'); |
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.
Please adjust this like other test and also adjust the line 51.
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.
Hey @RubirajAccenture , I just found one small thing. If I set the Input Field Text component to "hasError"=true, I see a blrInfo icon. This should not be there, the default icon should be undefined. Please also check that the test that you implemented also works and finds this issue.
2df90fa
to
5c13e91
Compare
5c13e91
to
7908799
Compare
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.
LGTM
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.
Approved
closes #515