diff options
Diffstat (limited to 'js/protractor.phantomjs.conf.js')
-rw-r--r-- | js/protractor.phantomjs.conf.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/js/protractor.phantomjs.conf.js b/js/protractor.phantomjs.conf.js new file mode 100644 index 000000000..73fdd153f --- /dev/null +++ b/js/protractor.phantomjs.conf.js @@ -0,0 +1,38 @@ +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright Bernhard Posselt 2014 + */ + +var baseUrl = 'http://localhost'; + +exports.config = { + seleniumAddress: 'http://localhost:4444/wd/hub', + specs: ['tests/e2e/**/*.js'], + onPrepare: function () { + 'use strict'; + + browser.ignoreSynchronization = true; + browser.get(baseUrl + '/owncloud/'); + browser.findElement(By.id('user')).sendKeys('admin'); + browser.findElement(By.id('password')).sendKeys('admin'); + browser.findElement(By.id('submit')).click(); + + browser.driver.wait(function () { + return browser.driver.getCurrentUrl().then(function (url) { + var regex = /apps/; + return regex.test(url); + }); + }); + }, + capabilities: { + browserName: 'phantomjs', + version: '', + platform: 'ANY' + }, + baseUrl: baseUrl +};
\ No newline at end of file |