summaryrefslogtreecommitdiffstats
path: root/js/tests/e2e/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/e2e/main.js')
-rw-r--r--js/tests/e2e/main.js43
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