From 83226fc3cb2baac6eaceee980ce6e241647ff1aa Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 15 May 2014 05:36:41 +0200 Subject: add first protractor test --- js/tests/e2e/main.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 js/tests/e2e/main.js (limited to 'js/tests/e2e') diff --git a/js/tests/e2e/main.js b/js/tests/e2e/main.js new file mode 100644 index 000000000..94e31ee62 --- /dev/null +++ b/js/tests/e2e/main.js @@ -0,0 +1,34 @@ +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(); + }); + + + 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'); + }); + }); + + }); +}); \ No newline at end of file -- cgit v1.2.3