Comments (10)
@geekytime Which version of PhantomJS are you using? Originally, PhantomJS did not support window.open, however latest version do(as such the latest version of FuncUnit doesn't use the Phantom specific conditions).
Also, which version of FuncUnit are you using?
from funcunit.
I'm using FuncUnit 2.0.3, and PhantomJS 1.9.1.
I've been digging through the FuncUnit code trying to track this down. It does indeed make the call to window.open, so it's not an iframe issue.
The call to window.open
succeeds, and a document exists, but FuncUnit.win.location.href
for that window starts as about:blank
, where I'd expect it to start with my supplied url. Then, after a few rounds of polling, FuncUnit.win.location.href
abruptly changes to undefined
, and the document also gets set to undefined
.
The polling just keeps going after that, I'm guessing until something times out.
I tried forcibly re-setting FuncUnit.win.location.href = url;
after the call to window.open
but that didn't help.
from funcunit.
Do you have an isolated test case by chance?
from funcunit.
Meh. No. Not handy. I'd have to send you my whole grunt project and everything, which I'm not sure I've got time to do.
Are these versions of FuncUnit and PhantomJS expected to work properly together? If I create a Jasmine test harness page that runs in Chrome and Firefox, should I be able to simply open the same page in PhantomJS and have it run there, too?
Is there any other configuration or shimming/polyfilling that I should be doing to make FuncUnit more Phantom-friendly?
from funcunit.
For what it's worth, I've run the same basic tests in CasperJS, so I know my app works in PhantomJS okay...
from funcunit.
FuncUnit is geared to be Phantom compliant at this point, without any modification to your tests. However, I don't doubt that there could be a bug with specific setups. I'll leave this case open for the moment, in the event we can create an isolated test.
from funcunit.
I created a isolated test case, but it worked fine on my machine. I guess it's too watered down from my real test. When I have time, I'll try adding bits of my app config until I can replicate the problem. Thanks for your patience.
from funcunit.
No worries at all. I'll close this case for the moment, but once you have a failing test, be sure to reference this issue and we'll be sure to take a look.
from funcunit.
I've tried several tricks to create an isolated test case, and I still can't duplicate this issue without my full developer setup. However, I was using PhantomJS for another project without FuncUnit, and I came across a scenario where I had closed a few popup windows, but still had references to the window objects. The window objects had devolved from DOMWindows into simple objects that just looked like: {closed:true}
.
I haven't figured out exactly how it's happening, but I believe this is what is causing my problems with FuncUnit. I think it's got a reference to an object that it thinks is a DOMWindow, but it is actually one of these closed objects.
I'll keep digging around, but thought this discovery was worth sharing.
from funcunit.
@geekytime No worries! Thanks for the notes. I'm keeping this issue closed for the moment, but I'm noting it for additional testing on our end as well to try and locate the issue.
from funcunit.
Related Issues (20)
- Function.caller does not work strict mode
- Test against Node 8
- Set up Google Analytics
- how can i install funcit from github? HOT 1
- Advertise the community survey on funcunit.com HOT 1
- dist folder not included on npm HOT 4
- Failure while using F.attach(Qunit) HOT 2
- FuncUnit + iframe: click() on link (<a>) tage produces false positive. HOT 1
- Remove the dependency on jquery
- Make FuncUnit use async/await rather than a queue system HOT 1
- dist folder not included on npm HOT 1
- Can't do async operations in QUnit2 before/after hooks
- jQuery is not defined HOT 4
- Lint all the files
- You can't run getters after actions and waits. Please put your getters in a callback or at the beginning of the test. HOT 2
- invalid usage of delete operator HOT 1
- funcunit.com is down with 502 "Bad Gateway" HOT 2
- the `download samples` link is returning 404
- undef error upon reuse of F.open
- FuncUnit 4.0 Prototype HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from funcunit.