add basic e2e tests
parent
0c11df34bd
commit
21615b5532
|
@ -7,13 +7,13 @@ describe('angularjs homepage todo list', function() {
|
||||||
element(by.model('todoList.todoText')).sendKeys('write first protractor test');
|
element(by.model('todoList.todoText')).sendKeys('write first protractor test');
|
||||||
element(by.css('[value="add"]')).click();
|
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.count()).toEqual(3);
|
||||||
expect(todoList.get(2).getText()).toEqual('write first protractor test');
|
expect(todoList.get(2).getText()).toEqual('write first protractor test');
|
||||||
|
|
||||||
// You wrote your first test, cross it off the list
|
// You wrote your first test, cross it off the list
|
||||||
todoList.get(2).element(by.css('input')).click();
|
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);
|
expect(completedAmount.count()).toEqual(2);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
import {browser, element, by} from 'protractor'
|
||||||
|
|
||||||
|
describe('Login', function() {
|
||||||
|
|
||||||
|
it('should be redirected after login', function() {
|
||||||
|
browser.get('/');
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
|
@ -3,7 +3,7 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../out-tsc/e2e",
|
"outDir": "../out-tsc/e2e",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es6",
|
"target": "es5",
|
||||||
"types":[
|
"types":[
|
||||||
"jasmine",
|
"jasmine",
|
||||||
"node"
|
"node"
|
||||||
|
|
Loading…
Reference in New Issue