This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
public/docs/_examples/user-input Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -54,17 +54,15 @@ describe('User Input Tests', function () {
54
54
} ) ;
55
55
} ) ;
56
56
57
- it ( 'should be able to filter key events' , function ( ) {
57
+ it ( 'should be able to filter key events' , async ( ) => {
58
58
let mainEle = element ( by . css ( 'key-up3' ) ) ;
59
59
let inputEle = mainEle . element ( by . css ( 'input' ) ) ;
60
60
let outputTextEle = mainEle . element ( by . css ( 'p' ) ) ;
61
61
expect ( outputTextEle . getText ( ) ) . toEqual ( '' ) ;
62
- return sendKeys ( inputEle , 'abc' ) . then ( function ( ) {
63
- expect ( outputTextEle . getText ( ) ) . toEqual ( '' , 'should be blank - have not sent enter yet' ) ;
64
- return sendKeys ( inputEle , protractor . Key . ENTER ) ;
65
- } ) . then ( function ( ) {
66
- expect ( outputTextEle . getText ( ) ) . toEqual ( 'abc' ) ;
67
- } ) ;
62
+ await sendKeys ( inputEle , 'abc' ) ;
63
+ expect ( outputTextEle . getText ( ) ) . toEqual ( '' , 'should be blank - have not sent enter yet' ) ;
64
+ await sendKeys ( inputEle , protractor . Key . ENTER ) ;
65
+ expect ( outputTextEle . getText ( ) ) . toEqual ( 'abc' ) ;
68
66
} ) ;
69
67
70
68
it ( 'should be able to filter blur events' , function ( ) {
You can’t perform that action at this time.
0 commit comments