Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

chore(e2e): fix user-input test #2065

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions public/docs/_examples/user-input/e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,15 @@ describe('User Input Tests', function () {
});
});

it('should be able to filter key events', function () {
it('should be able to filter key events', async () => {
let mainEle = element(by.css('key-up3'));
let inputEle = mainEle.element(by.css('input'));
let outputTextEle = mainEle.element(by.css('p'));
expect(outputTextEle.getText()).toEqual('');
return sendKeys(inputEle, 'abc').then(function() {
expect(outputTextEle.getText()).toEqual('', 'should be blank - have not sent enter yet');
return sendKeys(inputEle, protractor.Key.ENTER);
}).then(function() {
expect(outputTextEle.getText()).toEqual('abc');
});
await sendKeys(inputEle, 'abc');
expect(outputTextEle.getText()).toEqual('', 'should be blank - have not sent enter yet');
await sendKeys(inputEle, protractor.Key.ENTER);
expect(outputTextEle.getText()).toEqual('abc');
});

it('should be able to filter blur events', function () {
Expand Down