-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: #1160 update validation of textareaeditor
- Loading branch information
Cuong Vu
committed
May 12, 2020
1 parent
3e0d0c7
commit fc2e8d2
Showing
7 changed files
with
113 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 50 additions & 53 deletions
103
packages/elements/src/components/TextAreaEditor/__tests__/__snapshots__/index.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,55 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`TextAreaEditor renderTextAreaEditor should match snapshot 1`] = ` | ||
<div> | ||
<div | ||
className="field pb-2" | ||
> | ||
<div | ||
className="control" | ||
> | ||
<label | ||
className="label" | ||
htmlFor="123" | ||
> | ||
mockLabel | ||
</label> | ||
<Component | ||
defaultContent="1" | ||
hasError={false} | ||
onChange={[Function]} | ||
placeholder="mockPlaceholder" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`TextAreaEditor renderTextAreaEditor should match snapshot 2`] = ` | ||
<div> | ||
<div | ||
className="field pb-2" | ||
> | ||
<div | ||
className="control" | ||
> | ||
<label | ||
className="label" | ||
htmlFor="123" | ||
> | ||
mockLabel | ||
</label> | ||
<Component | ||
hasError={false} | ||
onChange={[Function]} | ||
placeholder="mockPlaceholder" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`TextAreaEditor should match a snapshot 1`] = ` | ||
<Field | ||
name="username" | ||
<ContextProvider | ||
value={ | ||
Object { | ||
"dirty": false, | ||
"errors": Object {}, | ||
"getFieldHelpers": [Function], | ||
"getFieldMeta": [Function], | ||
"getFieldProps": [Function], | ||
"handleBlur": [Function], | ||
"handleChange": [Function], | ||
"handleReset": [Function], | ||
"handleSubmit": [Function], | ||
"initialErrors": Object {}, | ||
"initialStatus": undefined, | ||
"initialTouched": Object {}, | ||
"initialValues": Object {}, | ||
"isSubmitting": false, | ||
"isValid": true, | ||
"isValidating": false, | ||
"registerField": [Function], | ||
"resetForm": [Function], | ||
"setErrors": [Function], | ||
"setFieldError": [Function], | ||
"setFieldTouched": [Function], | ||
"setFieldValue": [Function], | ||
"setFormikState": [Function], | ||
"setStatus": [Function], | ||
"setSubmitting": [Function], | ||
"setTouched": [Function], | ||
"setValues": [Function], | ||
"status": undefined, | ||
"submitCount": 0, | ||
"submitForm": [Function], | ||
"touched": Object {}, | ||
"unregisterField": [Function], | ||
"validateField": [Function], | ||
"validateForm": [Function], | ||
"validateOnBlur": true, | ||
"validateOnChange": true, | ||
"validateOnMount": false, | ||
"values": Object {}, | ||
} | ||
} | ||
> | ||
<Component /> | ||
</Field> | ||
<Component | ||
id="username" | ||
labelText="User name" | ||
name="username" | ||
placeholder="enter your name here" | ||
/> | ||
</ContextProvider> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters