-
Notifications
You must be signed in to change notification settings - Fork 77
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
Acceptance Test Error in PhantomJS #138
Comments
We purposefully use Both of these events are wrapped in manual calls to Because VC relies on The other potential problem here is that we don't technically support PhantomJS at the moment, we've been focussing support on all the major modern browsers because Phantom doesn't have the same speed of development as the others, I think when we started it didn't even have RAF. It may work if you get the waiters setup properly, but it may not 😕 The upside is it's now possible to test with headless Chrome which is arguably better overall, since it'll probably reflect Chrome/other browser's behavior much better |
@runspired I think this points to us needing to focus on testing documentation, and possibly add a test helper that can be easily integrated into tradition Ember tests and async/await style tests |
I believe async/await is also hooked into If I am to setup a waiter for this, what's the proper way to detect there's nothing left to wait? I tried with the scheduler, but there's always 1 job on there that's being scheduled. |
It is and it isn't. Async/await just waits for promises, so you can have helper fuctions that wait for anything - but that usually means you want to use Yeah, I wouldn't hook into the scheduler here, it's very much private API. I'll try to get something working using |
I can understand how rAF can improve performance. But how is using |
Under the hood |
So I wrote this addon that adds a test waiter which completes after two RAFs, similar to the custom The other strategy I'm considering at the moment is:
Not sure which one will be more clean/future proof |
Here's another idea. If |
I'm not sure that |
Sure, I'll give the addon a try tomorrow and report back. |
Yup, the test waiter addon works 👍 I'll close this issue. |
I suspect this has to do with the
setTimeout
in{{vertical-collection}}
not registered with Ember run loop. So the test failed to wait for the render cycle to complete. This make sense too as the test I have fails on every fifth build.The text was updated successfully, but these errors were encountered: