summaryrefslogtreecommitdiffstats
path: root/js/config/protractor.js
blob: e1ed3d14d1e90fea822b733589b683d0c6f1326f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
 * 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 () {
        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) {
                return /apps/.test(url);
            });
        });
    },
    capabilities: {
        browserName: 'phantomjs',
        version: '',
        platform: 'ANY'
    },
    baseUrl: baseUrl
};