angular4-testing/project-manager/e2e/tasks/task-list-no-page-object.e2...

26 lines
718 B
TypeScript
Raw Normal View History

2017-03-22 06:37:47 +01:00
import { browser, element, by } from 'protractor';
import {takeScreenshot} from '../helpers/take_screenshot';
describe('Task List (without Page Object)', () => {
beforeEach(() => {
browser.get('/tasks')
});
it('should allow searching for tasks', () => {
element(by.css('#search-tasks')).sendKeys('Ersten');
browser.sleep(500);
const count = element.all(by.className('task-list-entry')).count();
expect(count).toEqual(1);
});
it('should work with no search results', () => {
element(by.css('#search-tasks')).sendKeys('Ich existiere nicht');
browser.sleep(500);
const count = element.all(by.className('task-list-entry')).count();
expect(count).toEqual(0);
});
});