Has anyone gotten phantomjs selenium tests working with Sencha Touch?
I can run my cucumber tests with chrome, but if I switch to PhantomJS, it looks like nothing ever loads. The ext components aren't written to the dom, so I don't know what's going on.
I'd love to switch my test run over to phantom, so it would be great if anyone has gotten this working.
I have an Ext.Application which uses Ext.create to instantiate a number of components, which either add components in their constructor() or in their initialize listener callbacks.
Everything works great in Safari, Mobile Safari, Chrome, and Dolphin, but the app never loads with phantom.
I'll create a minimal failing github project and post it here.
A simple app with just a button looks like it works. I'm not sure why my app never loads. I rely on localstorage proxies to load data, so perhaps that is related.
I'm having the same problem. PhantomJS/CasperJS works when the app is built with "sencha app build production" but it doesn't work in "development" mode. For some reason in development mode it never gets past the loading indicator.
I'm not sure what's the difference between the two but it's a real PITA.
I got around it by looking at the development.js microloader and more or less manually doing what it does. The key was to add the sencha-touch-all-debug.js script to my index.html. Now I keep an index-debug.html for testing and an index.html for building.
This is what I added to index-debug.html:
<link rel="stylesheet" type="text/css" href="resources/css/app.css">
<script type="text/javascript" src="touch/sencha-touch-all-debug.js"></script>
<script type="text/javascript" src="app.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">