diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-23 17:55:30 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-23 17:55:30 +0200 |
commit | 6208debf043fc8af28de13515dec4d10ace99bc3 (patch) | |
tree | 3d1cfc3a94b622f5fc7c65fac0a8f9fb8aadfb37 /js/protractor.conf.js | |
parent | 4fa9c6d6cfc24b848bc8bb1526ef8ef50f046cb3 (diff) |
use firefox for ci and e2e
Diffstat (limited to 'js/protractor.conf.js')
-rw-r--r-- | js/protractor.conf.js | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/js/protractor.conf.js b/js/protractor.conf.js new file mode 100644 index 000000000..2651c89ab --- /dev/null +++ b/js/protractor.conf.js @@ -0,0 +1,46 @@ +/** + * 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/index.php'); + 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); + }); + }); + + browser.get(baseUrl + '/owncloud/index.php/apps/news/'); + browser.driver.wait(function () { + return browser.driver.getCurrentUrl().then(function (url) { + var regex = /apps\/news/; + return regex.test(url); + }); + }); + }, + capabilities: { + browserName: 'firefox', + version: '', + platform: 'ANY' + }, + baseUrl: baseUrl +};
\ No newline at end of file |