-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Get the tests working with 1.0.0 #571
Comments
I'll see what I can do - stretched for time at the moment myself, between real-work and a new testing lib that should make these sort of tests easier. I'll take a look though, maybe there's some quick wins. |
OK, had a play around, and I think I understand the main issue :-) The tests are still assuming the selected value is uncontrolled - ie. When we click on an option, that option is then displayed. Of course, that isn't the case any more. I'm inclined to remove a lot of those tests, as we need to check that I'll go through the tests and work out what doesn't make sense any more, and where we're maybe missing stuff. Prob be the weekend before I get chance though. |
Just a quick update - I've started to get somewhere with this. I'll send a PR as soon as I've got the bulk done. One regression I've found so far is when |
I've started to debug tests too today =). First one issue found:
Legitimate issue since select has no value and does not render placeholder
@bruderstein just found you are also working on this =) Let me know when you pause, push PR, so I can continue on other tests. This way we can split the task |
Another test:
Yes, valueArray has nothing in there. Test legitimately fail. The problem is with expandValue function
Actually, value is compared with |
Hi @nkbt , Thanks for helping out. I've pushed where I'm up to here: https://github.com/bruderstein/react-select/tree/fix-tests-1.0 Could you maybe edit your comment with the names of the tests that are actual regressions - it's a bit tricky to know which tests you're talking about with just the error message. I've tried to keep each "change" on a separate commit, so we can follow if there's work to be done later. For example, I've removed some tests that really need redoing, using the new logic. But step 1 is to get us back to green. Thanks |
PS, @nkbt - I'm probably not going to be able to do much more until Thursday, so if you get any further, how about you send a PR to my branch, then we can coordinate efforts? We will be green again 🎉 |
@brianreavis I'll have a look at your branch then (hopefully tomorrow and later). Fork, update, pr - that would work totally ok. Cheers. |
@nkbt I think you meant @bruderstein :) Thanks guys, really appreciate the help! re:
This is working as designed in the new version, I'll have to document the change. Using values that aren't in the options is still supported, but you have to provide value objects (we're not expanding strings as before) ... unless someone thinks that's a bad design decision? I think it makes sense that if you want this behaviour, it's fine to pass value as an object. One less piece of magic. Also plays nicely with the "controlled" value behaviour change. |
Think we can close this now. I've added a new issue for the async tests. |
👍 🎉 |
Small note for you @JedWatson. CHANGES.md says:
I think that's reversed... it used to be default.css, now it's react-select.css |
Thanks for the heads up @MalcolmDwyer! |
There are a lot of failing tests at the moment. @bruderstein, if you've got time at the moment I could really use your help, it feels like a lot of them should be passing but there's something I'm missing (updates on render don't seem to complete before the DOM is queried, for one)
I've already fixed quite a few tests, updated others to use new class names, etc. and added some TODO notes where major API changes mean tests need to be rewritten.
The text was updated successfully, but these errors were encountered: