-
Notifications
You must be signed in to change notification settings - Fork 348
Enable ref as valid prop #862
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
Conversation
| let button = getByRole("FancyButton", container); | ||
| expect(button->innerHTML)->toBe("Click me"); |
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.
Shouldn't we test here something about the ref? This test just shows that Button_with_ref is rendering ok.
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, added another assertion but didn't want to go to clicks and other events to keep the test simple and fast
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. (I think the expect in line 27 can be removed, because it doesn't test anything related to the ref)
…esting-libraries
* '19' of github.com:/reasonml/reason-react:
Add deprecations on ReactDOMTestUtils
Add uri comment back on action
Update src/React.re
Update src/React.re
Update src/React.re
Snapshot with lower {}
…on-react into replace-testing-libraries * 'replace-testing-libraries' of github.com:/reasonml/reason-react: Bind React.act and React.actAsync
…on-react into ref-as-valid-prop
* 'replace-testing-libraries' of github.com:/reasonml/reason-react:
Bind React.act and React.actAsync
Bind React.act and React.actAsync
Add deprecations on ReactDOMTestUtils
Add uri comment back on action
Add comment on install --force
Remove jest from demo/dune
Update src/React.re
Update src/React.re
Update src/React.re
Snapshot with lower {}
…lid-prop * '19' of github.com:/reasonml/reason-react: Replace react dom's testing library with ReactTestingLibrary (#859)
2d60883 to
15e0877
Compare
…ises-as-annotations * '19' of github.com:/reasonml/reason-react: Enable ref as valid prop (#862) Replace react dom's testing library with ReactTestingLibrary (#859) Add deprecations on ReactDOMTestUtils Add uri comment back on action Update src/React.re Update src/React.re Update src/React.re Snapshot with lower {}
* Add useTransition with async support
* Add useTransitionAsync into the interface
* Add useOptimistic
* Rename use to usePromise and add useContext
* Move useTransitionAsync to Experimental
* Add formStatus to interface
* Leftover from removing useTransitionAsync to Experimental
* Add action_ and action_Async in ReactDOM props
* Fix reference to function on formStatus
* Embed FormData for now
* Add test of Form with useOptimistic
* Embed FormData into ReactDOM
* Move formStatus into ReactDOM
* Run formatter
* Bind React.useActionState instead of ReactDOM.useFormState
* Remove React.use being 'a => 'b
* Revert change on ReactDOM's prop 'action'
* useAction state published in React.rei
* Remove React.use being 'a => 'b
* Use act from 'react' inseat of react-dom/test-utils
* Snapshot with lower {}
* Update src/React.re
Co-authored-by: Javier Chávarri <[email protected]>
* Update src/React.re
Co-authored-by: Javier Chávarri <[email protected]>
* Update src/React.re
Co-authored-by: Javier Chávarri <[email protected]>
* Add uri comment back on action
* Add deprecations on ReactDOMTestUtils
* Replace react dom's testing library with ReactTestingLibrary (#859)
* Install melange-testing-library
* Install melange-testing-library npm deps
* Vendor melange-testing-library
* Fix Form__test with RTL
* Start migrating Hooks__test
* Remove dependency
* Remove unused code from Form__test
* Add a jest-devtoolsgs
* Add a jest-devtools
* Migrate Hooks and Form into RTL
* Add demo to manually test easily
* Use Uncurried for tests
* Migrate all React__test
* Force install since we are dealing with R19
* Snapshot with lower {}
* Remove jest from demo/dune
* Add comment on install --force
* Bind React.act and React.actAsync
* Bind React.act and React.actAsync
* Use React.act as async version only
* Test react.act and react.actasync
* Fix hola test :(
* Enable ref as valid prop (#862)
* Install melange-testing-library
* Install melange-testing-library npm deps
* Vendor melange-testing-library
* Fix Form__test with RTL
* Start migrating Hooks__test
* Remove dependency
* Remove unused code from Form__test
* Add a jest-devtoolsgs
* Add a jest-devtools
* Migrate Hooks and Form into RTL
* Add demo to manually test easily
* Use Uncurried for tests
* Migrate all React__test
* Force install since we are dealing with R19
* Snapshot with lower {}
* Enable ref in ppx
* Add jest test for ref
* Remove jest from demo/dune
* Add comment on install --force
* Improve test from checking ref
* Bind React.act and React.actAsync
* Bind React.act and React.actAsync
* Migrate custom childrens test to RTL
* Fix role for React__test
* Rollback change on _ppx
* Install latest react version with the useState fix
* Use [email protected]
---------
Co-authored-by: Javier Chávarri <[email protected]>
Depends on #859, that depends on #846
Allows to have a prop with
~refThis PR also adds the cleanup function on
refas a new constructor: added another "constructor" instead of changing the current callbackRef to avoid a breaking change, we might add deprecations and further cleanup in the future versions to keep those constructors to the minimum