-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Labels
Description
As suggested by @mebibou, the following quotes from #42 directly -
Also, I don't know if you know ripple-emulator, but it allows you to run your app like an Android or iPhone app with some Cordova features (or writing your own bridges if you need more). Here's my full protractor.conf.js to give you an idea:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
seleniumPort: 4444,
chromeDriver: '../node_modules/protractor/selenium/chromedriver',
directConnect: true,
framework: 'jasmine2',
baseUrl: 'http://localhost:8100',
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: ['--disable-web-security']
}
},
specs: [
'protractor/**/*.js'
],
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30 * 1000,
isVerbose: true
},
onPrepare: function() {
// Use ripple emulator to run the tests
var url = 'http://localhost:4400/?enableripple=cordova-3.0.0-' + browser.params.device;
browser.driver.manage().window().maximize();
browser.ignoreSynchronization = true;
browser.driver.get(url);
// Allow ripple to load
browser.driver.wait(function() {
return browser.driver.getCurrentUrl().then(function(actualUrl) {
return url == actualUrl;
});
}, 10000, 'url hasnt changed');
browser.driver.wait(function() {
return element(by.id('document')).isPresent();
}, 10000, 'ripple not loaded');
browser.driver.switchTo().frame(0);
}
};
Although this used to be working before, since I updated to ionic2-beta.3 it doesn't work anymore 😞 (ripple doesn't want to load anymore I don't know why)