summaryrefslogtreecommitdiffstats
path: root/js/tests/e2e
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-15 05:36:41 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-15 05:36:41 +0200
commit83226fc3cb2baac6eaceee980ce6e241647ff1aa (patch)
tree662624b38922748732168eb0b07d764930f160eb /js/tests/e2e
parent1ab7ba56d852c6a2c082b92c004444b5fd88bc8c (diff)
add first protractor test
Diffstat (limited to 'js/tests/e2e')
-rw-r--r--js/tests/e2e/main.js34
1 files changed, 34 insertions, 0 deletions
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