Skip to content
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

Support --engine=slimerjs when headless testing (Gecko) #286

Open
marcjansen opened this issue Sep 9, 2014 · 5 comments
Open

Support --engine=slimerjs when headless testing (Gecko) #286

marcjansen opened this issue Sep 9, 2014 · 5 comments

Comments

@marcjansen
Copy link
Member

It'd be great if we could test gecko headlessly. SlimerJS integrates well with CasperJS, so we should see whether we can use it.

@bentrm
Copy link
Member

bentrm commented Sep 14, 2014

As running the tests via SlimerJS is easy, there seems to be a problem with Ext.Loader.syncRequire classes ultimately failing when calling Ext.create. Seems it is loaded asynchronously anyway.

The following throws an error run with SlimerJS:

Ext.Loader.syncRequire([
    'GeoExt.data.LayerModel',
    'GeoExt.data.LayerStore',
    'GeoExt.panel.Map',
    'GeoExt.Action'
    ], function() {
        console.log(GeoExt.Action);
    }
);

GeoExt.Action should be available in the callback as it is when run via PhantomJS.

@marcjansen
Copy link
Member Author

Good findings. Any chance we can work around this by monkey patching syncRequire in the testsuite? Alternatively we could include all GeoExt sourcefiles in plain <script> tags.

@bentrm
Copy link
Member

bentrm commented Sep 15, 2014

I didn't come up with a quick and simple solution. It kind of feels like a problem with ExtJS or SlimerJS, too. Not sure which one though. As the tests work manually in the Firefox browser, I assume this to be a problem with the latter. In the docs they discribe the different handling of openURL() calls to PhantomJS, maybe thats a hint?

@marcjansen
Copy link
Member Author

I think that may be the issue. A simple timeout beforer actually conuing after the page opened may help. This all feels ugly, though.

@bentrm bentrm mentioned this issue Nov 6, 2014
@bentrm
Copy link
Member

bentrm commented Nov 6, 2014

The problem seems to be that the headless tests are run via file:// protocol. This works with PhantomJS but not SlimerJS. I made some changes in #294.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants