add basic e2e tests

merge-requests/1/head
Florian Hartwich 2017-04-10 04:14:24 +02:00
parent 0c11df34bd
commit 21615b5532
3 changed files with 12 additions and 3 deletions

View File

@ -7,13 +7,13 @@ describe('angularjs homepage todo list', function() {
element(by.model('todoList.todoText')).sendKeys('write first protractor test');
element(by.css('[value="add"]')).click();
var todoList = element.all(by.repeater('todo in todoList.todos'));
let todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);
expect(todoList.get(2).getText()).toEqual('write first protractor test');
// You wrote your first test, cross it off the list
todoList.get(2).element(by.css('input')).click();
var completedAmount = element.all(by.css('.done-true'));
let completedAmount = element.all(by.css('.done-true'));
expect(completedAmount.count()).toEqual(2);
});
});

View File

@ -0,0 +1,9 @@
import {browser, element, by} from 'protractor'
describe('Login', function() {
it('should be redirected after login', function() {
browser.get('/');
});
});

View File

@ -3,7 +3,7 @@
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es6",
"target": "es5",
"types":[
"jasmine",
"node"