-
Notifications
You must be signed in to change notification settings - Fork 149
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
shows requiredError on submit #105
Conversation
@mbrookes when I run the tests, I get these errors (on the master branch, before my modifications): ERROR in ./~/enzyme/build/react-compat.js
Module not found: Error: Cannot resolve module 'react/addons' in /Users/jordankohl/Dev/formsy-material-ui/node_modules/enzyme/build
@ ./~/enzyme/build/react-compat.js 37:16-39
23 05 2016 11:33:45.938:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
23 05 2016 11:33:45.949:INFO [launcher]: Starting browser Chrome
23 05 2016 11:33:46.875:INFO [Chrome 50.0.2661 (Mac OS X 10.11.4)]: Connected on socket /#JRIosFpyaxMPbmezAAAA with id 44639529
FormsyText
✔ renders a material-ui TextField
✖ sends input to the form
✖ renders validation information
_setMuiComponentAndMaybeFocus
✔ exposes a`focus` method if the underlying material-ui component does
the exposed `focus` method
✔ calls `focus` on the material-ui component
Finished in 0.164 secs / 0.132 secs
SUMMARY:
✔ 3 tests completed
✖ 2 tests failed
FAILED TESTS:
FormsyText
✖ sends input to the form
Chrome 50.0.2661 (Mac OS X 10.11.4)
AssertionError: expected '' to equal 'some text'
at Context.<anonymous> (/Users/jordankohl/Dev/formsy-material-ui/test/index.js:41283:33 <- webpack:///test/test.FormsyText.js:45:31)
✖ renders validation information
Chrome 50.0.2661 (Mac OS X 10.11.4)
AssertionError: expected the node in <TestForm /> to contain text 'Text is too long', but it has ''
HTML:
<div style="font-size: 16px; line-height: 24px; width: 256px; height: 48px; display: inline-block; position: relative; font-family: Roboto, sans-serif; transition: height 200ms cubic-bezier(0.23, 1, 0.32, 1) 0ms; background-color: transparent;">
<input type="text" name="text" id="text-undefined-undefined-25538" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); padding: 0px; position: relative; width: 100%; height: 100%; border: none; outline: none; color: rgba(0, 0, 0, 0.870588); font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: inherit; line-height: inherit; font-family: inherit; background-color: rgba(0, 0, 0, 0);">
<div>
<hr style="border-bottom-width: 1px; border-style: none none solid; border-color: rgb(224, 224, 224); bottom: 8px; box-sizing: content-box; margin: 0px; position: ; width: 100%;">
<hr style="border-bottom-width: 2px; border-style: none none solid; border-color: rgb(0, 188, 212); bottom: 8px; box-sizing: content-box; margin: 0px; position: ; width: 100%; transform: scaleX(0); transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;">
</div>
</div>
at Context.<anonymous> (/Users/jordankohl/Dev/formsy-material-ui/test/index.js:41298:43 <- webpack:///test/test.FormsyText.js:56:41) Here's my dependencies: ├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] |
Any idea if/when this will be merged? This looks like a good solution to me. 👍 |
@gordlea Concentrating on the FormsyText validation issue that the moment, I'll ok at this once the solution to that one is known, as it could have an influence here. |
@simpixelated Thanks for your efforts, and sorry this didn't get merged, but now that |
np @mbrookes; I will try resolving conflicts when I get some free time |
No rush, I barely have time to touch fmui these days! (Not actively using it myself at the moment which is obviously an issue!) |
@simpixelated Do you have time to rebase and fix the conflicts? If not, I'm happy to try to do it for you if it helps @rojobuffalo get it merged faster. |
@astonm give me 24 hours; if I can't find time within that, I'll ping you for help :) |
Will display whatever string is passed to
requiredError
on submit, if thererequired
is true and there are no other validation errors. Should fix #28 and #5.Thanks to @albertolive on christianalfoni/formsy-react#334.