-
Notifications
You must be signed in to change notification settings - Fork 221
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
(test) O3-2224: add tests for text-person-attribute-field.component.tsx
#766
Conversation
expect(screen.getByRole('textbox')).toBeInTheDocument(); | ||
}); | ||
|
||
it.skip('validates the input with the provided validationRegex', () => { |
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 test is failing because we are not getting the error in the test UI.
<div>
<form
action="#"
>
<div
class="customField halfWidthInDesktopView"
>
<div
style="margin-bottom: 1rem;"
>
<div
class="cds--layer-two"
>
<div
class="cds--form-item cds--text-input-wrapper"
>
<div
class="cds--text-input__label-wrapper"
>
<label
class="cds--label"
for="attributeId"
>
Referred by (optional)
</label>
</div>
<div
class="cds--text-input__field-outer-wrapper"
>
<div
class="cds--text-input__field-wrapper"
>
<input
class="cds--text-input cds--text-input--md"
id="attributeId"
name="attributes.4dd56a75-14ab-4148-8700-1f4f704dc5b0"
type="text"
value="abc"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</body>
89 | });
90 | screen.debug();
> 91 | expect(screen.getByText(/Invalid Input/i)).toBeInTheDocument();
| ^
92 | });
93 |
This is the ui that is getting rendered. As you can see there is only input field and no errors indicating that input is not valid.
cc/ @denniskigen @jayasanka-sack @anjula-sack @Piumal1999
Thank you so much @denniskigen for the help. |
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.
Looks good to me. Thanks @ayush-AI
@ayush-AI could you please resolve the conflicts |
Hi @Piumal1999 I resolved the conflicts have a look. |
Requirements
Summary
In this PR I have added missing tests for text-person-attribute-field.component.tsx.
Screenshots
None.
Related Issue
O3-2224
None.
Other
One of the test is failing because the validation errors of the input field are not coming in the test ui.