@@ -35,10 +35,11 @@ test('Android WebDriver facts treat invalid state attributes as false', () => {
3535// by, so a filled field used to read as a node labelled with its own value and no value at all:
3636// `toHaveValue` saw "" on a field holding "Ada Lovelace".
3737test ( "Android WebDriver facts name a node by its text, carry a content description beside it, and read a field's text as its value" , ( ) => {
38- const [ field , label ] = parseWebDriverSourceFacts (
38+ const [ field , label , described ] = parseWebDriverSourceFacts (
3939 '<hierarchy>' +
4040 '<android.widget.EditText text="Ada Lovelace" content-desc="Name field" hint="Your name" bounds="[0,0][100,40]" />' +
4141 '<android.widget.TextView text="Ada Lovelace" bounds="[0,120][100,160]" />' +
42+ '<android.widget.TextView text="" content-desc="Name field" bounds="[0,160][100,200]" />' +
4243 '</hierarchy>' ,
4344 'android' ,
4445 ) . nodes ;
@@ -55,9 +56,10 @@ test("Android WebDriver facts name a node by its text, carry a content descripti
5556 [ 'Ada Lovelace' , 'Ada Lovelace' , 'Name field' , 'Your name' , undefined , undefined ] ,
5657 ) ;
5758 assert . deepEqual (
58- [ label ! . label , label ! . value , 'editable' in label ! ] ,
59- [ 'Ada Lovelace' , undefined , false ] ,
59+ [ label ! . label , label ! . value , 'editable' in label ! , 'text' in label ! , 'text' in field ! ] ,
60+ [ 'Ada Lovelace' , undefined , false , false , false ] ,
6061 ) ;
62+ assert . deepEqual ( [ described ! . label , described ! . text ] , [ 'Name field' , '' ] ) ;
6163} ) ;
6264
6365test ( 'Android WebDriver facts read a hinted field as empty, a masked field as a password, and editability as unavailable when unreported' , ( ) => {
0 commit comments