diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-15 12:26:42 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-15 12:26:42 +0200 |
commit | d6625bc44524500e11c9072c6ba294112cd52d43 (patch) | |
tree | cd1e93b6b21434d6aba7725821d811d312d687f7 /js/tests/e2e/main.js | |
parent | 866f17fe43f841691a8858d671962d623369d3b3 (diff) |
fix protractor tests
Diffstat (limited to 'js/tests/e2e/main.js')
-rw-r--r-- | js/tests/e2e/main.js | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/js/tests/e2e/main.js b/js/tests/e2e/main.js index 94e31ee62..40ab73c38 100644 --- a/js/tests/e2e/main.js +++ b/js/tests/e2e/main.js @@ -1,34 +1,27 @@ +/** + * 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 2012, 2014 + */ + +var auth = require('./include/auth.js'); + describe('news page', function () { 'use strict'; - var ptor = protractor.getInstance(); - - beforeEach(function () { - browser.ignoreSynchronization = true; - return browser.ignoreSynchronization; - }); - beforeEach(function () { - ptor.get('http://localhost/owncloud/'); - ptor.findElement(By.id('user')).sendKeys('admin'); - ptor.findElement(By.id('password')).sendKeys('admin'); - ptor.findElement(By.id('submit')).click(); + auth.login(browser); }); - - describe('should log in', function () { - - beforeEach(function () { - browser.ignoreSynchronization = false; - return browser.ignoreSynchronization; - }); - - it('should go to the news page', function () { - ptor.get('http://localhost/owncloud/index.php/apps/news/'); - ptor.getTitle().then(function (title) { - expect(title).toBe('News - ownCloud'); - }); + it('should go to the news page', function () { + browser.get('http://localhost/owncloud/index.php/apps/news/'); + browser.getTitle().then(function (title) { + expect(title).toBe('News - ownCloud'); }); - }); + });
\ No newline at end of file |