-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[RichTextInput] add tests and fix bugs #3223
Conversation
when removing event listener, it's important to pass same function as argument. This PR makes sure, that onTextInput is the same function when adding and removing event listener
they broke because body input is not required
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.
Thanks 👍
Let me know If there's anything blocking this PR from merging |
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.
Nice 👍 Thanks!
cypress/integration/create.js
Outdated
@@ -212,4 +232,45 @@ describe('Create Page', () => { | |||
expect(el).to.have.value('The real Slim Shady!') | |||
); | |||
}); | |||
|
|||
it('should not show rich text input error message when field is untouched', () => { | |||
cy.get('.ra-input-body .ra-rich-text-input > p').should('not.exist'); |
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.
Looking for a p
seems fragile. Would you mind adding a className (error
?) on the FormHelperText
used to display validation errors?
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.
Sure. done!
@djhi can you rerun travis ci build? It's failed because of timeout error:
which seems to be caused by network issues. e2e tests are passing locally. |
Thanks! |
As suggested in #3209 (comment), I've added tests.
Fixes #3206, #3207 and #3209 (comment)
Closes #3209, #3221 and #3208 patches, since it contains them all.