chore(e2e): fix user-input test
closes #2065 There seemed to be a timing issue. A simple rewrite using async/await seems to solve the problem.
This commit is contained in:
parent
787ca1600d
commit
1ae7b31f61
|
@ -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 mainEle = element(by.css('key-up3'));
|
||||||
let inputEle = mainEle.element(by.css('input'));
|
let inputEle = mainEle.element(by.css('input'));
|
||||||
let outputTextEle = mainEle.element(by.css('p'));
|
let outputTextEle = mainEle.element(by.css('p'));
|
||||||
expect(outputTextEle.getText()).toEqual('');
|
expect(outputTextEle.getText()).toEqual('');
|
||||||
return sendKeys(inputEle, 'abc').then(function() {
|
await sendKeys(inputEle, 'abc');
|
||||||
expect(outputTextEle.getText()).toEqual('', 'should be blank - have not sent enter yet');
|
expect(outputTextEle.getText()).toEqual('', 'should be blank - have not sent enter yet');
|
||||||
return sendKeys(inputEle, protractor.Key.ENTER);
|
await sendKeys(inputEle, protractor.Key.ENTER);
|
||||||
}).then(function() {
|
expect(outputTextEle.getText()).toEqual('abc');
|
||||||
expect(outputTextEle.getText()).toEqual('abc');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to filter blur events', function () {
|
it('should be able to filter blur events', function () {
|
||||||
|
|
Loading…
Reference in New Issue