77 expectTextWithin ,
88 getReceiveAddress ,
99 sleep ,
10+ swipeFullScreen ,
1011 tap ,
1112 typeText ,
1213} from '../helpers/actions' ;
@@ -26,11 +27,19 @@ describe('@receive - Receive', () => {
2627 }
2728
2829 // Onchain/Lightning details
29- await dragOnElement ( 'ReceiveSlider' , 'left' , 0.7 ) ;
30+ if ( driver . isIOS ) {
31+ await tap ( 'ShowDetails' ) ;
32+ } else {
33+ await dragOnElement ( 'ReceiveSlider' , 'left' , 0.7 ) ;
34+ }
3035 await elementById ( 'ReceiveScreen' ) . waitForDisplayed ( ) ;
3136
3237 // ReceiveDetail
33- await dragOnElement ( 'ReceiveScreen' , 'right' , 0.7 ) ;
38+ if ( driver . isIOS ) {
39+ await tap ( 'QRCode' ) ;
40+ } else {
41+ await dragOnElement ( 'ReceiveScreen' , 'right' , 0.7 ) ;
42+ }
3443 await sleep ( 1000 ) ;
3544 await tap ( 'SpecifyInvoiceButton' ) ;
3645
@@ -59,31 +68,41 @@ describe('@receive - Receive', () => {
5968
6069 // Show QR
6170 await tap ( 'ShowQrReceive' ) ;
71+ await sleep ( 500 ) ;
6272
6373 // Back to ReceiveDetail
6474 // data should still be there
6575 await tap ( 'SpecifyInvoiceButton' ) ;
6676 await expectText ( '123' ) ;
6777 await expectTextWithin ( 'ReceiveNote' , note ) ;
68- await expectText ( tag ) ;
78+ // tags not shown on iOS
79+ // https://github.com/synonymdev/bitkit-ios/issues/197
80+ if ( driver . isAndroid ) {
81+ await expectText ( tag ) ;
82+ }
6983
7084 // Close & reopen
71- await dragOnElement ( 'ReceiveScreen' , ' down', 0.7 ) ;
85+ await swipeFullScreen ( ' down') ;
7286 await sleep ( 1000 ) ;
7387 await elementById ( 'Receive' ) . waitForDisplayed ( ) ;
7488 await tap ( 'Receive' ) ;
7589
7690 // data should be reset
91+ await sleep ( 500 ) ;
7792 await tap ( 'SpecifyInvoiceButton' ) ;
7893 await expectText ( '123' , { visible : false } ) ;
7994 await expectTextWithin ( 'ReceiveNote' , note , { visible : false } ) ;
8095 await expectText ( tag , { visible : false } ) ;
8196
82- // check previous tags & delete
83- await tap ( 'TagsAdd' ) ;
84- await tap ( `Tag-${ tag } ` ) ;
85- await expectText ( tag ) ;
86- await tap ( `Tag-${ tag } -delete` ) ;
87- await expectText ( tag , { visible : false } ) ;
97+ // tags not shown on iOS
98+ // https://github.com/synonymdev/bitkit-ios/issues/197
99+ if ( driver . isAndroid ) {
100+ // check previous tags & delete
101+ await tap ( 'TagsAdd' ) ;
102+ await tap ( `Tag-${ tag } ` ) ;
103+ await expectText ( tag ) ;
104+ await tap ( `Tag-${ tag } -delete` ) ;
105+ await expectText ( tag , { visible : false } ) ;
106+ }
88107 } ) ;
89108} ) ;
0 commit comments