11import 'detox' ;
2- import { expect } from 'detox' ;
3- import { IndexableNativeElement } from 'detox/detox' ;
2+ import { expect } from 'detox' ;
3+ import { IndexableNativeElement } from 'detox/detox' ;
44
55describe ( 'Raw queries' , ( ) => {
66 let testCount = 0 ;
@@ -10,11 +10,10 @@ describe('Raw queries', () => {
1010 const suiteElement = element ( by . id ( 'Raw queries' ) ) ;
1111 await suiteElement . tap ( ) ;
1212
13- const testCounterLabel = ( ( await suiteElement . getAttributes ( ) ) as any )
14- . label ;
13+ const testCounterLabel = ( ( await suiteElement . getAttributes ( ) ) as any ) . label ;
1514 testCount = Number ( testCounterLabel ) ;
1615
17- await waitForAllLoadingIndicatorsToDisappear ( 30000 ) ;
16+ await waitForAllLoadingIndicatorsToDisappear ( 60000 ) ;
1817 } ) ;
1918
2019 // Since tests need to be defined statically, we need to use a loop to evaluate the tests dynamically
@@ -33,7 +32,7 @@ describe('Raw queries', () => {
3332 tests . push ( {
3433 title : title ,
3534 status : 'passed' ,
36- message : 'Test passed' ,
35+ message : 'Test passed'
3736 } ) ;
3837 } catch ( e ) {
3938 try {
@@ -43,17 +42,17 @@ describe('Raw queries', () => {
4342 title : title ,
4443 status : 'failed' ,
4544 message : errorMessage ,
46- trace : ( e as any ) . message ,
45+ trace : ( e as any ) . message
4746 } ) ;
4847 } catch ( _e ) {
4948 tests . push ( {
5049 title : title ,
51- status : 'pending' ,
50+ status : 'pending'
5251 } ) ;
5352 }
5453 }
5554 }
56- let hasErrors = ! ! tests . filter ( t => t . status === 'failed' ) . length ;
55+ let hasErrors = ! ! tests . filter ( ( t ) => t . status === 'failed' ) . length ;
5756
5857 // Dump error traces first
5958 if ( hasErrors ) {
@@ -72,9 +71,7 @@ describe('Raw queries', () => {
7271 if ( t . status === 'passed' ) {
7372 console . log ( `\x1b[32m#${ i + 1 } ${ t . title } \x1b[0m` ) ;
7473 } else if ( t . status === 'failed' ) {
75- console . log (
76- `\x1b[31m#${ i + 1 } ${ t . title } - Failed \x1b[37m${ t . message } ` ,
77- ) ;
74+ console . log ( `\x1b[31m#${ i + 1 } ${ t . title } - Failed \x1b[37m${ t . message } ` ) ;
7875 } else {
7976 console . log ( `\x1b[33m#${ i + 1 } ${ t . title } ` ) ;
8077 }
@@ -104,11 +101,9 @@ async function waitForAllLoadingIndicatorsToDisappear(timeout = 20000) {
104101 // If error, some indicators still exist
105102 console . log ( 'Loading indicators still present, waiting...' ) ;
106103
107- await new Promise ( resolve => setTimeout ( resolve , 500 ) ) ;
104+ await new Promise ( ( resolve ) => setTimeout ( resolve , 500 ) ) ;
108105 }
109106 }
110107
111- throw new Error (
112- `All loading indicators did not disappear within ${ timeout } ms` ,
113- ) ;
108+ throw new Error ( `All loading indicators did not disappear within ${ timeout } ms` ) ;
114109}
0 commit comments