-
Notifications
You must be signed in to change notification settings - Fork 15
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
JSDOM-react adapter should implement isDisplayed #52
Comments
I agree it shouldn't return thus, I prefer to either:
Thoughts? any other options we can do in JSDom? |
1. Certainly throwing an Unsupported Error is better than returning false.
2. I this ,again, that jsdom is a special case. And we should have both a React adapter and a React/JSDom adapter.
2.a after such separation, i think jsdom adapter is the only adapter that we should allow to throw Unsupported Error.
… On 2019. Mar 10., at 16:07, Gabriel Grinberg ***@***.***> wrote:
I agree it shouldn't return true
the problem with jsdom is that you don't have proper measuring so you can't know
thus, I prefer to either:
throw an error
always return false
Thoughts? any other options we can do in JSDom?
@borisd9 @hepiyellow
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@hepiyellow what does it mean a "react" adapter alone? what environment does it run on? |
what about implementing this https://github.com/testing-library/jest-dom#tobevisible ? |
or just something like:
|
@dor-itzhaki height and width might be 0 on valid cases too, but I am OK with implementing the same logic the did on testing-library |
Any progress on that? It took me a while to realize how come my tests always fail :( just when I used the debugger, I found this weird behaviour. |
@liorcode no, a PR should be fairly easy, the challenge will be coordinating this release with all users of WSR and ensuring nothing breaks unexpectedly |
hmm I see. did you consider using some flag+warning for the new behavior and then removing it in the next major version of WSR? this is what WSR usually do for breaking changes.
|
I went through our code and didn't see anywhere we're using the |
It happened for me when I used my own drivers, not WSR. I did some tests to make sure some element was not displayed, and I was very surprised when it failed. took me a while to realize that isDisplayed returned |
@GabiGrin
what do you think? |
@AlmogAdziashvili Sounds good |
Currently
isDisplayed
implementation under JSDOM adapter returnstrue
.Source
Method should test element visibility similar to -
Protractor
(e.g Test existence, size over 0 X 0 and display !== 'none')
The text was updated successfully, but these errors were encountered: