1- describe ( 'configuration with no globals' , function ( ) {
2- var URL = '/ng2/#/async' ;
1+ describe ( 'configuration with no globals' , ( ) => {
2+ const URL = '/ng2/#/async' ;
33
4- it ( 'should have objects belonging to protractor namespace' , function ( ) {
4+ it ( 'should have objects belonging to protractor namespace' , ( ) => {
55 expect ( typeof protractor ) . toEqual ( 'object' ) ;
66 expect ( typeof protractor . browser ) . toEqual ( 'object' ) ;
77 expect ( typeof protractor . $ ) . toEqual ( 'function' ) ;
@@ -11,7 +11,7 @@ describe('configuration with no globals', function() {
1111 expect ( typeof protractor . By ) . toEqual ( 'object' ) ;
1212 } ) ;
1313
14- it ( 'should not have other globals' , function ( ) {
14+ it ( 'should not have other globals' , ( ) => {
1515 expect ( typeof browser ) . toEqual ( 'undefined' ) ;
1616 expect ( typeof $ ) . toEqual ( 'undefined' ) ;
1717 expect ( typeof $$ ) . toEqual ( 'undefined' ) ;
@@ -20,11 +20,11 @@ describe('configuration with no globals', function() {
2020 expect ( typeof By ) . toEqual ( 'undefined' ) ;
2121 } ) ;
2222
23- it ( 'should be able to use methods under the protractor namespace' , function ( ) {
24- protractor . browser . get ( URL ) ;
25- var increment = protractor . $ ( '#increment' ) ;
23+ it ( 'should be able to use methods under the protractor namespace' , async ( ) => {
24+ await protractor . browser . get ( URL ) ;
25+ const increment = protractor . $ ( '#increment' ) ;
2626 expect ( typeof increment ) . toEqual ( 'object' ) ;
27- increment . $ ( '.action' ) . click ( ) ;
28- expect ( increment . $ ( '.val' ) . getText ( ) ) . toEqual ( '1' ) ;
27+ await increment . $ ( '.action' ) . click ( ) ;
28+ expect ( await increment . $ ( '.val' ) . getText ( ) ) . toEqual ( '1' ) ;
2929 } ) ;
3030} ) ;
0 commit comments