@ -40,7 +40,21 @@ 
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					const  {  execSync  }  =  require ( 'child_process' ) ; const  {  execSync  }  =  require ( 'child_process' ) ;  
			
		
	
		
		
			
				
					const  {  join  }  =  require ( 'path' ) ; const  {  join  }  =  require ( 'path' ) ;  
			
		
	
		
		
			
				
					
					const  {  existsSync ,  mkdirSync ,  appendFileSync ,  readFileSync ,  writeFileSync  }  =  require ( 'fs' ) ; const  {  existsSync ,  mkdirSync ,  appendFileSync ,  readFileSync ,  writeFileSync ,  readdirSync ,  statSync ,  accessSync  }  =  require ( 'fs' ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					const  readline  =  require ( 'readline' ) ;  
			
		
	
		
		
			
				
					const  rl  =  readline . createInterface ( {  
			
		
	
		
		
			
				
					    input :  process . stdin ,  
			
		
	
		
		
			
				
					    output :  process . stdout  
			
		
	
		
		
			
				
					} ) ;  
			
		
	
		
		
			
				
					const  {  constants  }  =  require ( 'fs' ) ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					const  question  =  ( prompt )  =>  new  Promise ( ( resolve )  =>  rl . question ( prompt ,  resolve ) ) ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					// Make sure to close readline at the end
  
			
		
	
		
		
			
				
					process . on ( 'SIGINT' ,  ( )  =>  {  
			
		
	
		
		
			
				
					    rl . close ( ) ;  
			
		
	
		
		
			
				
					    process . exit ( ) ;  
			
		
	
		
		
			
				
					} ) ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					// Format date as YYYY-MM-DD-HHMMSS
 // Format date as YYYY-MM-DD-HHMMSS
  
			
		
	
		
		
			
				
					const  getLogFileName  =  ( )  =>  { const  getLogFileName  =  ( )  =>  {  
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -316,122 +330,84 @@ const verifyXcodeInstallation = (log) => { 
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					// Generate test data using generate_data.ts
 // Generate test data using generate_data.ts
  
			
		
	
		
		
			
				
					const  generateTestData  =  async  ( log )  =>  { const  generateTestData  =  async  ( log )  =>  {  
			
		
	
		
		
			
				
					
					    log ( '🔄 Generating test data ...' ) ;     log ( '\n🔍 DEBUG: Starting test data generation ...' ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					         
			
		
	
		
		
			
				
					
					    // Check if test-scripts directory exists
     // Check directory structure
  
			
				
				
			
		
	
		
		
			
				
					
					    if  ( ! existsSync ( 'test-scripts' ) )  {     log ( '📁 Current directory:' ,  process . cwd ( ) ) ;  
			
				
				
			
		
	
		
		
			
				
					
					        log ( '⚠️ test-scripts directory not found' ) ;     log ( '📁 Directory contents:' ,  require ( 'fs' ) . readdirSync ( '.' ) ) ;  
			
				
				
			
		
	
		
		
			
				
					        log ( '⚠️ Current directory: '  +  process . cwd ( ) ) ;  
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					         
			
		
	
		
		
			
				
					        // List directories to help debug
  
			
		
	
		
		
			
				
					        const  {  readdirSync  }  =  require ( 'fs' ) ;  
			
		
	
		
		
			
				
					        log ( '📂 Directories in current path:' ) ;  
			
		
	
		
		
			
				
					        try  {  
			
		
	
		
		
			
				
					            const  files  =  readdirSync ( '.' ) ;  
			
		
	
		
		
			
				
					            files . forEach ( file  =>  {  
			
		
	
		
		
			
				
					                const  isDir  =  existsSync ( file )  &&  require ( 'fs' ) . statSync ( file ) . isDirectory ( ) ;  
			
		
	
		
		
			
				
					                log ( ` ${ isDir  ?  '📁'  :  '📄' }   ${ file } ` ) ;  
			
		
	
		
		
			
				
					            } ) ;  
			
		
	
		
		
			
				
					        }  catch  ( err )  {  
			
		
	
		
		
			
				
					            log ( ` ⚠️ Error listing directory:  ${ err . message } ` ) ;  
			
		
	
		
		
			
				
					        }  
			
		
	
		
		
			
				
					    }  else  {  
			
		
	
		
		
			
				
					        log ( '✅ Found test-scripts directory' ) ;  
			
		
	
		
		
			
				
					         
			
		
	
		
		
			
				
					        // Check if generate_data.ts exists
  
			
		
	
		
		
			
				
					        if  ( existsSync ( 'test-scripts/generate_data.ts' ) )  {  
			
		
	
		
		
			
				
					            log ( '✅ Found generate_data.ts' ) ;  
			
		
	
		
		
			
				
					        }  else  {  
			
		
	
		
		
			
				
					            log ( '⚠️ generate_data.ts not found in test-scripts directory' ) ;  
			
		
	
		
		
			
				
					             
			
		
	
		
		
			
				
					            // List files in test-scripts to help debug
  
			
		
	
		
		
			
				
					            const  {  readdirSync  }  =  require ( 'fs' ) ;  
			
		
	
		
		
			
				
					            log ( '📂 Files in test-scripts:' ) ;  
			
		
	
		
		
			
				
					            try  {  
			
		
	
		
		
			
				
					                const  files  =  readdirSync ( 'test-scripts' ) ;  
			
		
	
		
		
			
				
					                files . forEach ( file  =>  {  
			
		
	
		
		
			
				
					                    log ( ` 📄  ${ file } ` ) ;  
			
		
	
		
		
			
				
					                } ) ;  
			
		
	
		
		
			
				
					            }  catch  ( err )  {  
			
		
	
		
		
			
				
					                log ( ` ⚠️ Error listing test-scripts:  ${ err . message } ` ) ;  
			
		
	
		
		
			
				
					            }  
			
		
	
		
		
			
				
					        }  
			
		
	
		
		
			
				
					    }  
			
		
	
		
		
			
				
					     
			
		
	
		
		
			
				
					    // Create .generated directory if it doesn't exist
  
			
		
	
		
		
			
				
					    if  ( ! existsSync ( '.generated' ) )  {     if  ( ! existsSync ( '.generated' ) )  {  
			
		
	
		
		
			
				
					        log ( '📁 Creating .generated directory' ) ;         log ( '📁 Creating .generated directory' ) ;  
			
		
	
		
		
			
				
					        mkdirSync ( '.generated' ,  {  recursive :  true  } ) ;         mkdirSync ( '.generated' ,  {  recursive :  true  } ) ;  
			
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					    try  {     try  {  
			
		
	
		
		
			
				
					
					        // Try to generate test data using the script
         log ( '🔄 Attempting to run generate_data.ts...' ) ;  
			
				
				
			
		
	
		
		
			
				
					        log ( '🔄 Running test data generation script...' ) ;  
			
		
	
		
		
	
		
		
			
				
					        execSync ( 'npx ts-node test-scripts/generate_data.ts' ,  {  stdio :  'inherit'  } ) ;         execSync ( 'npx ts-node test-scripts/generate_data.ts' ,  {  stdio :  'inherit'  } ) ;  
			
		
	
		
		
			
				
					
					        log ( '✅ Test data generation script  completed' ) ;         log ( '✅ Test data generation completed' ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					
					        // Verify the generated files exis t
         // Verify and log generated files content
  
			
				
				
			
		
	
		
		
	
		
		
			
				
					        const  requiredFiles  =  [         const  requiredFiles  =  [  
			
		
	
		
		
			
				
					            '.generated/test-env.json' ,             '.generated/test-env.json' ,  
			
		
	
		
		
			
				
					            '.generated/claim_details.json' ,             '.generated/claim_details.json' ,  
			
		
	
		
		
			
				
					            '.generated/contacts.json'             '.generated/contacts.json'  
			
		
	
		
		
			
				
					        ] ;         ] ;  
			
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					
					        log ( '🔍  Verifying generated files:' ) ;         log ( '\n📝 Verifying generated files:' ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					        for  ( const  file  of  requiredFiles )  {         for  ( const  file  of  requiredFiles )  {  
			
		
	
		
		
			
				
					            if  ( ! existsSync ( file ) )  {             if  ( ! existsSync ( file ) )  {  
			
		
	
		
		
			
				
					
					                log ( ` ⚠️ Required file  ${ file }  was not generated ` ) ;                 log ( ` ❌ Missing file:  ${ file } ` ) ;  
			
				
				
			
		
	
		
		
			
				
					                throw  new  Error ( ` Required file  ${ file }  was not generated ` ) ;  
			
		
	
		
		
	
		
		
			
				
					            }  else  {             }  else  {  
			
		
	
		
		
			
				
					
					                log ( ` ✅  ${ file }  exists ` ) ;                 const  content  =  readFileSync ( file ,  'utf8' ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					                log ( ` \n 📄 Content of  ${ file } : ` ) ;  
			
		
	
		
		
			
				
					                log ( content ) ;  
			
		
	
		
		
			
				
					                try  {  
			
		
	
		
		
			
				
					                    const  parsed  =  JSON . parse ( content ) ;  
			
		
	
		
		
			
				
					                    if  ( file . includes ( 'test-env.json' ) )  {  
			
		
	
		
		
			
				
					                        log ( '🔑 CONTACT1_DID in test-env:' ,  parsed . CONTACT1_DID ) ;  
			
		
	
		
		
			
				
					                    }  
			
		
	
		
		
			
				
					                    if  ( file . includes ( 'contacts.json' ) )  {  
			
		
	
		
		
			
				
					                        log ( '👥 First contact DID:' ,  parsed [ 0 ] ? . did ) ;  
			
		
	
		
		
			
				
					                    }  
			
		
	
		
		
			
				
					                }  catch  ( e )  {  
			
		
	
		
		
			
				
					                    log ( ` ❌ Error parsing  ${ file } : ` ,  e ) ;  
			
		
	
		
		
			
				
					                }  
			
		
	
		
		
			
				
					            }             }  
			
		
	
		
		
			
				
					        }         }  
			
		
	
		
		
			
				
					    }  catch  ( error )  {     }  catch  ( error )  {  
			
		
	
		
		
			
				
					
					        log ( ` ⚠️ Failed to generate test data:  ${ error . message } ` ) ;         log ( ` \n ⚠️ Test data generation failed : ${ error . message } ` ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					        log ( '⚠️ Creating fallback test data...' ) ;         log ( '⚠️ Creating fallback test data...' ) ;  
			
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					
					        // Create minimal fallback test data
         // Create fallback data with detailed logging 
  
			
				
				
			
		
	
		
		
	
		
		
			
				
					        const  fallbackTestEnv  =  {         const  fallbackTestEnv  =  {  
			
		
	
		
		
			
				
					
					            "CONTACT1_DID" :  "did:example:123456789" ,             "CONTACT1_DID" :  "did:ethr:0x35A71Ac3fA0A4D5a4903f10F0f7A3ac4034FaB5B " ,  
			
				
				
			
		
	
		
		
	
		
		
			
				
					            "APP_URL" :  "https://app.timesafari.example"             "APP_URL" :  "https://app.timesafari.example"  
			
		
	
		
		
			
				
					        } ;         } ;  
			
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					        const  fallbackClaimDetails  =  {  
			
		
	
		
		
			
				
					            "claim_id" :  "claim_12345" ,  
			
		
	
		
		
			
				
					            "title" :  "Test Claim" ,  
			
		
	
		
		
			
				
					            "description" :  "This is a test claim"  
			
		
	
		
		
			
				
					        } ;  
			
		
	
		
		
			
				
					         
			
		
	
		
		
			
				
					        const  fallbackContacts  =  [         const  fallbackContacts  =  [  
			
		
	
		
		
			
				
					            {             {  
			
		
	
		
		
			
				
					                "id" :  "contact1" ,                 "id" :  "contact1" ,  
			
		
	
		
		
			
				
					                "name" :  "Test Contact" ,                 "name" :  "Test Contact" ,  
			
		
	
		
		
			
				
					
					                "did" :  "did:example:123456789 "                 "did" :  "did:ethr:0x35A71Ac3fA0A4D5a4903f10F0f7A3ac4034FaB5B"  
			
				
				
			
		
	
		
		
	
		
		
			
				
					            }             }  
			
		
	
		
		
			
				
					        ] ;         ] ;  
			
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					
					        // Use writeFileSync to overwrite any existing files
         log ( '\n📝 Writing fallback data:' ) ;  
			
				
				
			
		
	
		
		
			
				
					
					        const  {  writeFileSync  }  =  require ( 'fs' ) ;         log ( 'TestEnv:' ,  JSON . stringify ( fallbackTestEnv ,  null ,  2 ) ) ;  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					        log ( 'Contacts:' ,  JSON . stringify ( fallbackContacts ,  null ,  2 ) ) ;  
			
		
	
		
		
			
				
					         
			
		
	
		
		
			
				
					        writeFileSync ( '.generated/test-env.json' ,  JSON . stringify ( fallbackTestEnv ,  null ,  2 ) ) ;         writeFileSync ( '.generated/test-env.json' ,  JSON . stringify ( fallbackTestEnv ,  null ,  2 ) ) ;  
			
		
	
		
		
			
				
					        writeFileSync ( '.generated/claim_details.json' ,  JSON . stringify ( fallbackClaimDetails ,  null ,  2 ) ) ;  
			
		
	
		
		
			
				
					        writeFileSync ( '.generated/contacts.json' ,  JSON . stringify ( fallbackContacts ,  null ,  2 ) ) ;         writeFileSync ( '.generated/contacts.json' ,  JSON . stringify ( fallbackContacts ,  null ,  2 ) ) ;  
			
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					
					        log ( '✅ Fallback test data created' ) ;         // Verify fallback data was written
  
			
				
				
			
		
	
		
		
			
				
					
					                log ( '\n🔍 Verifying fallback data:' ) ;  
			
				
				
			
		
	
		
		
			
				
					
					        // Verify files were created
         try  {  
			
				
				
			
		
	
		
		
			
				
					
					        const  requiredFiles  =  [             const  writtenTestEnv  =  JSON . parse ( readFileSync ( '.generated/test-env.json' ,  'utf8' ) ) ;  
			
				
				
			
		
	
		
		
			
				
					
					            '.generated/test-env.json' ,             const  writtenContacts  =  JSON . parse ( readFileSync ( '.generated/contacts.json' ,  'utf8' ) ) ;  
			
				
				
			
		
	
		
		
			
				
					
					            '.generated/claim_details.json' ,             log ( 'Written TestEnv:' ,  writtenTestEnv ) ;  
			
				
				
			
		
	
		
		
			
				
					
					            '.generated/contacts.json'             log ( 'Written Contacts:' ,  writtenContacts ) ;  
			
				
				
			
		
	
		
		
			
				
					
					        ] ;         }  catch  ( e )  {  
			
				
				
			
		
	
		
		
			
				
					
					                    log ( '❌ Error verifying fallback data:' ,  e ) ;  
			
				
				
			
		
	
		
		
			
				
					        log ( '🔍 Verifying fallback files:' ) ;  
			
		
	
		
		
			
				
					        for  ( const  file  of  requiredFiles )  {  
			
		
	
		
		
			
				
					            if  ( ! existsSync ( file ) )  {  
			
		
	
		
		
			
				
					                log ( ` ⚠️ Failed to create  ${ file } ` ) ;  
			
		
	
		
		
			
				
					            }  else  {  
			
		
	
		
		
			
				
					                log ( ` ✅ Created  ${ file } ` ) ;  
			
		
	
		
		
			
				
					            }  
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					        }         }  
			
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					} ; } ;  
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -535,165 +511,129 @@ const runIosApp = async (log, simulator) => { 
			
		
	
		
		
			
				
					    log ( '✅ App launched successfully' ) ;     log ( '✅ App launched successfully' ) ;  
			
		
	
		
		
			
				
					} ; } ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
					/ * * const  validateTestData  =  ( log )  =>  {  
			
				
				
			
		
	
		
		
			
				
					
					 *  Run  deeplink  tests      log ( '\n=== VALIDATING TEST DATA ===' ) ;  
			
				
				
			
		
	
		
		
			
				
					 *  Optionally  tests  deeplinks  if  the  test  data  is  available  
			
		
	
		
		
			
				
					 *   
			
		
	
		
		
			
				
					 *  @ param  { function }  log  -  Logging  function  
			
		
	
		
		
			
				
					 *  @ returns  { Promise < void > }  
			
		
	
		
		
			
				
					 * /  
			
		
	
		
		
			
				
					const  runDeeplinkTests  =  async  ( log )  =>  {  
			
		
	
		
		
			
				
					    log ( '🔗 Starting deeplink tests...' ) ;  
			
		
	
		
		
	
		
		
	
		
		
			
				
					         
			
		
	
		
		
			
				
					
					    // Import readline module for user input
     const  generateFreshTestData  =  ( )  =>  {  
			
				
				
			
		
	
		
		
			
				
					
					    const  readline  =  require ( 'readline' ) ;         log ( '\n🔄 Generating fresh test data...' ) ;  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					        try  {  
			
		
	
		
		
			
				
					            // Ensure .generated directory exists
  
			
		
	
		
		
			
				
					            if  ( ! existsSync ( '.generated' ) )  {  
			
		
	
		
		
			
				
					                mkdirSync ( '.generated' ,  {  recursive :  true  } ) ;  
			
		
	
		
		
			
				
					            }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
					    // Create readline interface
             // Execute the generate_data.ts script synchronously
  
			
				
				
			
		
	
		
		
			
				
					
					    const  rl  =  readline . createInterface ( {             log ( 'Running generate_data.ts...' ) ;  
			
				
				
			
		
	
		
		
			
				
					
					        input :  process . stdin ,             execSync ( 'npx ts-node test-scripts/generate_data.ts' ,  {   
			
				
				
			
		
	
		
		
			
				
					
					        output :  process . stdout                 stdio :  'inherit' ,  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					                encoding :  'utf8'  
			
		
	
		
		
			
				
					            } ) ;             } ) ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
					    // Promisify the question method
             // Read and validate the generated files
  
			
				
				
			
		
	
		
		
			
				
					
					    const  question  =  ( query )  =>  new  Promise ( resolve  =>  rl . question ( query ,  resolve ) ) ;             const  testEnvPath  =  '.generated/test-env.json' ;  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					            const  contactsPath  =  '.generated/contacts.json' ;  
			
		
	
		
		
			
				
					                         
			
		
	
		
		
			
				
					
					    // Register URL scheme if needed
             if  ( ! existsSync ( testEnvPath )  ||  ! existsSync ( contactsPath ) )  {  
			
				
				
			
		
	
		
		
			
				
					
					    checkAndRegisterUrlScheme ( log ) ;                 throw  new  Error ( 'Generated files not found after running generate_data.ts' ) ;  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					            }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
					    // Check if test data files exist first
             const  testEnv  =  JSON . parse ( readFileSync ( testEnvPath ,  'utf8' ) ) ;  
			
				
				
			
		
	
		
		
			
				
					
					    const  requiredFiles  =  [             const  contacts  =  JSON . parse ( readFileSync ( contactsPath ,  'utf8' ) ) ;  
			
				
				
			
		
	
		
		
			
				
					        '.generated/test-env.json' ,  
			
		
	
		
		
			
				
					        '.generated/claim_details.json' ,  
			
		
	
		
		
			
				
					        '.generated/contacts.json'  
			
		
	
		
		
			
				
					    ] ;  
			
		
	
		
		
	
		
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
					    for  ( const  file  of  requiredFiles )  {             // Validate required fields
  
			
				
				
			
		
	
		
		
			
				
					
					        if  ( ! existsSync ( file ) )  {             if  ( ! testEnv . CONTACT1_DID )  {  
			
				
				
			
		
	
		
		
			
				
					
					            log ( ` ⚠️ Required file  ${ file }  does not exist ` ) ;                 throw  new  Error ( 'CONTACT1_DID missing from generated test data' ) ;  
			
				
				
			
		
	
		
		
			
				
					            log ( '⚠️ Skipping deeplink tests' ) ;  
			
		
	
		
		
			
				
					            rl . close ( ) ;  
			
		
	
		
		
			
				
					            return ;  
			
		
	
		
		
			
				
					        }  
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					            }             }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
					    // Check if our app is actually running in the simulator
             log ( 'Generated test data:' ,  {  
			
				
				
			
		
	
		
		
			
				
					
					    log ( '🔍 Checking if app is currently running in simulator...' ) ;                 testEnv :  testEnv ,  
			
				
				
			
		
	
		
		
			
				
					
					    try  {                 contacts :  contacts  
			
				
				
			
		
	
		
		
			
				
					
					        const  runningApps  =  execSync ( 'xcrun simctl listapps booted' ) . toString ( ) ;             } ) ;  
			
				
				
			
		
	
		
		
			
				
					
					        const  appIdentifier  =  getAppIdentifier ( ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					                    return  {  testEnv ,  contacts  } ;  
			
				
				
			
		
	
		
		
			
				
					        if  ( ! runningApps . includes ( appIdentifier ) )  {  
			
		
	
		
		
			
				
					            log ( '⚠️ The app does not appear to be running in the simulator.' ) ;  
			
		
	
		
		
			
				
					            const  shouldLaunch  =  await  question ( 'Would you like to launch the app now? (y/n): ' ) ;  
			
		
	
		
		
			
				
					             
			
		
	
		
		
			
				
					            if  ( shouldLaunch . toLowerCase ( )  ===  'y'  ||  shouldLaunch . toLowerCase ( )  ===  'yes' )  {  
			
		
	
		
		
			
				
					                // Try launching the app again
  
			
		
	
		
		
			
				
					                log ( '🚀 Launching app in simulator...' ) ;  
			
		
	
		
		
			
				
					                const  simulatorInfo  =  JSON . parse ( execSync ( 'xcrun simctl list -j devices booted' ) . toString ( ) ) ;  
			
		
	
		
		
			
				
					                const  booted  =  Object . values ( simulatorInfo . devices )  
			
		
	
		
		
			
				
					                    . flat ( )  
			
		
	
		
		
			
				
					                    . find ( device  =>  device . state  ===  'Booted' ) ;  
			
		
	
		
		
			
				
					                     
			
		
	
		
		
			
				
					                if  ( booted )  {  
			
		
	
		
		
			
				
					                    execSync ( ` npx cap run ios --target=" ${ booted . udid } " ` ,  {  stdio :  'inherit'  } ) ;  
			
		
	
		
		
			
				
					                    log ( '✅ App launched' ) ;  
			
		
	
		
		
			
				
					                }  else  {  
			
		
	
		
		
			
				
					                    log ( '⚠️ No booted simulator found' ) ;  
			
		
	
		
		
			
				
					                }  
			
		
	
		
		
			
				
					            }  else  {  
			
		
	
		
		
			
				
					                log ( '⚠️ Deeplink tests require the app to be running' ) ;  
			
		
	
		
		
			
				
					                log ( '⚠️ Please launch the app manually and restart the tests' ) ;  
			
		
	
		
		
			
				
					                rl . close ( ) ;  
			
		
	
		
		
			
				
					                return ;  
			
		
	
		
		
			
				
					            }  
			
		
	
		
		
			
				
					        }  else  {  
			
		
	
		
		
			
				
					            log ( '✅ App is running in simulator' ) ;  
			
		
	
		
		
			
				
					        }  
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					        }  catch  ( error )  {         }  catch  ( error )  {  
			
		
	
		
		
			
				
					
					        log ( ` ⚠️ Unable to check if app is running:  ${ error . message } ` ) ;             log ( '❌ Test data generation failed:' ,  error ) ;  
			
				
				
			
		
	
		
		
			
				
					
					        log ( '⚠️ Proceeding with deeplink tests, but they may fail if app is not running' ) ;             throw  error ;  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					        }         }  
			
		
	
		
		
			
				
					    } ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
					    // Show instructions for iOS security dialogs
     try  {  
			
				
				
			
		
	
		
		
			
				
					
					    log ( '\n📱 IMPORTANT: iOS Security Dialog Instructions:' ) ;         // Try to read existing data or generate fresh data
  
			
				
				
			
		
	
		
		
			
				
					
					    log ( '1. Each deeplink test will trigger a security confirmation dialog' ) ;         const  testEnvPath  =  '.generated/test-env.json' ;  
			
				
				
			
		
	
		
		
			
				
					
					    log ( '2. You MUST click "Open" on each dialog to continue testing' ) ;         const  contactsPath  =  '.generated/contacts.json' ;  
			
				
				
			
		
	
		
		
			
				
					    log ( '3. The app must be running in the FOREGROUND' ) ;  
			
		
	
		
		
			
				
					    log ( '4. You will need to press Enter in this terminal after handling each dialog' ) ;  
			
		
	
		
		
			
				
					    log ( '5. You can abort the testing process by pressing Ctrl+C\n' ) ;  
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					
					    // Ensure app is in foreground
         let  testData ;  
			
				
				
			
		
	
		
		
			
				
					    log ( '⚠️ IMPORTANT: Please make sure the app is in the FOREGROUND now' ) ;  
			
		
	
		
		
			
				
					    await  question ( 'Press Enter when the app is visible and in the foreground...' ) ;  
			
		
	
		
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					        // If either file is missing or invalid, generate fresh data
  
			
		
	
		
		
			
				
					        if  ( ! existsSync ( testEnvPath )  ||  ! existsSync ( contactsPath ) )  {  
			
		
	
		
		
			
				
					            testData  =  generateFreshTestData ( ) ;  
			
		
	
		
		
			
				
					        }  else  {  
			
		
	
		
		
			
				
					            try  {             try  {  
			
		
	
		
		
			
				
					
					        // Load test data
                 const  testEnv  =  JSON . parse ( readFileSync ( testEnvPath ,  'utf8' ) ) ;  
			
				
				
			
		
	
		
		
			
				
					
					        log ( '📂 Loading test data from .generated directory' ) ;                 const  contacts  =  JSON . parse ( readFileSync ( contactsPath ,  'utf8' ) ) ;  
			
				
				
			
		
	
		
		
			
				
					        let  testEnv ,  claimDetails ,  contacts ;  
			
		
	
		
		
	
		
		
	
		
		
			
				
					                                 
			
		
	
		
		
			
				
					
					        try  {                 // Validate required fields
  
			
				
				
			
		
	
		
		
			
				
					
					            const  testEnvContent  =  readFileSync ( '.generated/test-env.json' ,  'utf8' ) ;                 if  ( ! testEnv . CLAIM_ID  ||  ! testEnv . CONTACT1_DID )  {  
			
				
				
			
		
	
		
		
			
				
					
					            testEnv  =  JSON . parse ( testEnvContent ) ;                     log ( '⚠️ Existing test data missing required fields, regenerating...' ) ;  
			
				
				
			
		
	
		
		
			
				
					
					            log ( '✅ Loaded test-env.json' ) ;                     testData  =  generateFreshTestData ( ) ;  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					                }  else  {  
			
		
	
		
		
			
				
					                    testData  =  {  testEnv ,  contacts  } ;  
			
		
	
		
		
			
				
					                }  
			
		
	
		
		
			
				
					            }  catch  ( error )  {             }  catch  ( error )  {  
			
		
	
		
		
			
				
					
					            log ( ` ⚠️ Failed to load test-env.json:  ${ error . message } ` ) ;                  log ( '⚠️ Error reading existing test data, regenerating...' ) ;  
			
				
				
			
		
	
		
		
			
				
					
					            rl . close ( ) ;                 testData  =  generateFreshTestData  ( ) ;  
			
				
				
			
		
	
		
		
			
				
					
					            return ;             }  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					        }         }  
			
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					
					        try  {         // Final validation of data
  
			
				
				
			
		
	
		
		
			
				
					
					            const  claimDetailsContent  =  readFileSync ( '.generated/claim_details.json' ,  'utf8' ) ;         if  ( ! testData . testEnv . CLAIM_ID  ||  ! testData . testEnv . CONTACT1_DID )  {  
			
				
				
			
		
	
		
		
			
				
					
					            claimDetails  =  JSON . parse ( claimDetailsContent ) ;             throw  new  Error ( 'Test data validation failed even after generation' ) ;  
			
				
				
			
		
	
		
		
			
				
					            log ( '✅ Loaded claim_details.json' ) ;  
			
		
	
		
		
			
				
					        }  catch  ( error )  {  
			
		
	
		
		
			
				
					            log ( ` ⚠️ Failed to load claim_details.json:  ${ error . message } ` ) ;  
			
		
	
		
		
			
				
					            rl . close ( ) ;  
			
		
	
		
		
			
				
					            return ;  
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					        }         }  
			
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					
					        try  {         log ( '✅ Test data validated successfully' ) ;  
			
				
				
			
		
	
		
		
			
				
					
					            const  contactsContent  =  readFileSync ( '.generated/contacts.json' ,  'utf8' ) ;         log ( '📄 Test Environment:' ,  JSON . stringify ( testData . testEnv ,  null ,  2 ) ) ;  
			
				
				
			
		
	
		
		
			
				
					
					            contacts  =  JSON . parse ( contactsContent ) ;          
			
				
				
			
		
	
		
		
			
				
					
					            log ( '✅ Loaded contacts.json' ) ;         return  testData ;  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					         
			
		
	
		
		
			
				
					    }  catch  ( error )  {     }  catch  ( error )  {  
			
		
	
		
		
			
				
					
					            log ( ` ⚠️ Failed to load contacts.json:  ${ error . message } ` ) ;         log ( ` ❌ Test data validation failed:  ${ error . message } ` ) ;  
			
				
				
			
		
	
		
		
			
				
					
					            rl . close ( ) ;         throw  error ;  
			
				
				
			
		
	
		
		
			
				
					            return ;  
			
		
	
		
		
	
		
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					} ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					/ * *  
			
		
	
		
		
			
				
					 *  Run  deeplink  tests   
			
		
	
		
		
			
				
					 *  Optionally  tests  deeplinks  if  the  test  data  is  available  
			
		
	
		
		
			
				
					 *   
			
		
	
		
		
			
				
					 *  @ param  { function }  log  -  Logging  function  
			
		
	
		
		
			
				
					 *  @ returns  { Promise < void > }  
			
		
	
		
		
			
				
					 * /  
			
		
	
		
		
			
				
					const  runDeeplinkTests  =  async  ( log )  =>  {  
			
		
	
		
		
			
				
					    log ( '\n=== Starting Deeplink Tests ===' ) ;  
			
		
	
		
		
			
				
					         
			
		
	
		
		
			
				
					
					        // Check if the app URL scheme is registered in the simulator
     // Validate test data before proceeding 
 
			
				
				
			
		
	
		
		
			
				
					
					        log ( '🔍 Checking if URL scheme is registered in simulator...' ) ;     let  testEnv ,  contacts ;  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					    try  {     try  {  
			
		
	
		
		
			
				
					
					            // Attempt to open a simple URL with the scheme
         ( {  testEnv ,  contacts  }  =  validateTestData ( log ) ) ;  
			
				
				
			
		
	
		
		
			
				
					            log ( '⚠️ A security dialog will appear - Click "Open" to continue' ) ;  
			
		
	
		
		
			
				
					            execSync ( ` xcrun simctl openurl booted "timesafari://test" ` ,  {  stdio :  'pipe'  } ) ;  
			
		
	
		
		
			
				
					            log ( '✅ URL scheme is registered and working' ) ;  
			
		
	
		
		
	
		
		
			
				
					    }  catch  ( error )  {     }  catch  ( error )  {  
			
		
	
		
		
			
				
					
					            const  errorMessage  =  error . message  ||  '' ;         log ( '❌ Cannot proceed with tests due to invalid test data' ) ;  
			
				
				
			
		
	
		
		
			
				
					
					                    log ( ` Error:  ${ error . message } ` ) ;  
			
				
				
			
		
	
		
		
			
				
					
					            // Check for the specific error code that indicates an unregistered URL scheme
         log ( 'Please ensure test data is properly generated before running tests' ) ;  
			
				
				
			
		
	
		
		
			
				
					
					            if  ( errorMessage . includes ( 'OSStatus error -10814' )  ||  errorMessage . includes ( 'NSOSStatusErrorDomain, code=-10814' ) )  {         process . exit ( 1 ) ;  // Exit with error code
  
			
				
				
			
		
	
		
		
			
				
					                log ( '⚠️ URL scheme "timesafari://" is not registered in the app or app is not running' ) ;  
			
		
	
		
		
			
				
					                log ( '⚠️ The scheme was added to Info.plist but the app may need to be rebuilt' ) ;  
			
		
	
		
		
			
				
					                log ( '⚠️ Trying to continue with tests, but they may fail' ) ;  
			
		
	
		
		
			
				
					            }  
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					         
			
		
	
		
		
			
				
					
					        // Wait for user confirmation before proceeding
     // Now we can safely create the deeplink tests knowing we have valid data
  
			
				
				
			
		
	
		
		
			
				
					        await  question ( 'Press Enter to continue with the tests...' ) ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					        // Test URLs
  
			
		
	
		
		
	
		
		
			
				
					    const  deeplinkTests  =  [     const  deeplinkTests  =  [  
			
		
	
		
		
			
				
					        {         {  
			
		
	
		
		
			
				
					
					                 url :  ` timesafari://claim/ ${ claimDetails . claim_id } ` ,             url :  ` timesafari://claim/ ${ testEnv . CLAIM_ID } ` ,  
			
				
				
			
		
	
		
		
	
		
		
			
				
					            description :  'Claim view'             description :  'Claim view'  
			
		
	
		
		
			
				
					        } ,         } ,  
			
		
	
		
		
			
				
					        {         {  
			
		
	
		
		
			
				
					
					                 url :  ` timesafari://claim-cert/ ${ claimDetails . claim_id } ` ,             url :  ` timesafari://claim-cert/ ${ testEnv . CERT_ID  ||  testEnv . CLAIM_ID } ` ,  
			
				
				
			
		
	
		
		
	
		
		
			
				
					            description :  'Claim certificate view'             description :  'Claim certificate view'  
			
		
	
		
		
			
				
					        } ,         } ,  
			
		
	
		
		
			
				
					        {         {  
			
		
	
		
		
			
				
					
					                 url :  ` timesafari://claim-add-raw/ ${ claimDetails . claim_id } ` ,             url :  ` timesafari://claim-add-raw/ ${ testEnv . RAW_CLAIM_ID  ||  testEnv . CLAIM_ID } ` ,  
			
				
				
			
		
	
		
		
	
		
		
			
				
					            description :  'Raw claim addition'             description :  'Raw claim addition'  
			
		
	
		
		
			
				
					        } ,         } ,  
			
		
	
		
		
			
				
					        {         {  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -705,7 +645,14 @@ const runDeeplinkTests = async (log) => { 
			
		
	
		
		
			
				
					            description :  'DID view with contact DID'             description :  'DID view with contact DID'  
			
		
	
		
		
			
				
					        } ,         } ,  
			
		
	
		
		
			
				
					        {         {  
			
		
	
		
		
			
				
					
					                url :  ` timesafari://contact-edit/ ${ testEnv . CONTACT1_DID } ` ,             url :  ( ( )  =>  {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					                if  ( ! testEnv ? . CONTACT1_DID )  {  
			
		
	
		
		
			
				
					                    throw  new  Error ( 'Cannot construct contact-edit URL: CONTACT1_DID is missing' ) ;  
			
		
	
		
		
			
				
					                }  
			
		
	
		
		
			
				
					                const  url  =  ` timesafari://contact-edit/ ${ testEnv . CONTACT1_DID } ` ;  
			
		
	
		
		
			
				
					                log ( 'Created contact-edit URL:' ,  url ) ;  
			
		
	
		
		
			
				
					                return  url ;  
			
		
	
		
		
			
				
					            } ) ( ) ,  
			
		
	
		
		
			
				
					            description :  'Contact editing'             description :  'Contact editing'  
			
		
	
		
		
			
				
					        } ,         } ,  
			
		
	
		
		
			
				
					        {         {  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -714,23 +661,62 @@ const runDeeplinkTests = async (log) => { 
			
		
	
		
		
			
				
					        }         }  
			
		
	
		
		
			
				
					    ] ;     ] ;  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					    // Log the final test configuration
  
			
		
	
		
		
			
				
					    log ( '\n5. Final Test Configuration:' ) ;  
			
		
	
		
		
			
				
					    deeplinkTests . forEach ( ( test ,  i )  =>  {  
			
		
	
		
		
			
				
					        log ( ` \n Test  ${ i  +  1 } : ` ) ;  
			
		
	
		
		
			
				
					        log ( ` Description:  ${ test . description } ` ) ;  
			
		
	
		
		
			
				
					        log ( ` URL:  ${ test . url } ` ) ;  
			
		
	
		
		
			
				
					    } ) ;  
			
		
	
		
		
			
				
					     
			
		
	
		
		
			
				
					    // Show instructions for iOS security dialogs
  
			
		
	
		
		
			
				
					    log ( '\n📱 IMPORTANT: iOS Security Dialog Instructions:' ) ;  
			
		
	
		
		
			
				
					    log ( '1. Each deeplink test will trigger a security confirmation dialog' ) ;  
			
		
	
		
		
			
				
					    log ( '2. You MUST click "Open" on each dialog to continue testing' ) ;  
			
		
	
		
		
			
				
					    log ( '3. The app must be running in the FOREGROUND' ) ;  
			
		
	
		
		
			
				
					    log ( '4. You will need to press Enter in this terminal after handling each dialog' ) ;  
			
		
	
		
		
			
				
					    log ( '5. You can abort the testing process by pressing Ctrl+C\n' ) ;  
			
		
	
		
		
			
				
					     
			
		
	
		
		
			
				
					    // Ensure app is in foreground
  
			
		
	
		
		
			
				
					    log ( '⚠️ IMPORTANT: Please make sure the app is in the FOREGROUND now' ) ;  
			
		
	
		
		
			
				
					    await  question ( 'Press Enter when the app is visible and in the foreground...' ) ;  
			
		
	
		
		
			
				
					     
			
		
	
		
		
			
				
					    try  {  
			
		
	
		
		
			
				
					        // Execute each test
         // Execute each test
  
			
		
	
		
		
			
				
					        let  testsCompleted  =  0 ;         let  testsCompleted  =  0 ;  
			
		
	
		
		
			
				
					        let  testsSkipped  =  0 ;         let  testsSkipped  =  0 ;  
			
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					        for  ( const  test  of  deeplinkTests )  {         for  ( const  test  of  deeplinkTests )  {  
			
		
	
		
		
			
				
					            // Show upcoming test info before execution
  
			
		
	
		
		
			
				
					            log ( '\n📱 NEXT TEST:' ) ;  
			
		
	
		
		
			
				
					            log ( '------------------------' ) ;  
			
		
	
		
		
			
				
					            log ( ` Description:  ${ test . description } ` ) ;  
			
		
	
		
		
			
				
					            log ( ` URL to test:  ${ test . url } ` ) ;  
			
		
	
		
		
			
				
					            log ( '------------------------' ) ;  
			
		
	
		
		
			
				
					             
			
		
	
		
		
			
				
					            // Clear prompt for user action
  
			
		
	
		
		
			
				
					            await  question ( '\n⏎  Press Enter to execute this test (or Ctrl+C to quit)...' ) ;  
			
		
	
		
		
			
				
					             
			
		
	
		
		
			
				
					            try  {             try  {  
			
		
	
		
		
			
				
					
					                log ( ` \n 🔗 Testing deeplink:  ${ test . description } ` ) ;                 log ( '🚀 Executing deeplink test...' ) ;  
			
				
				
			
		
	
		
		
			
				
					                log ( ` URL:  ${ test . url } ` ) ;  
			
		
	
		
		
	
		
		
			
				
					                log ( '⚠️ iOS SECURITY DIALOG WILL APPEAR - Click "Open" to continue' ) ;                 log ( '⚠️ iOS SECURITY DIALOG WILL APPEAR - Click "Open" to continue' ) ;  
			
		
	
		
		
			
				
					                                 
			
		
	
		
		
			
				
					                execSync ( ` xcrun simctl openurl booted " ${ test . url } " ` ,  {  stdio :  'pipe'  } ) ;                 execSync ( ` xcrun simctl openurl booted " ${ test . url } " ` ,  {  stdio :  'pipe'  } ) ;  
			
		
	
		
		
			
				
					                log ( ` ✅ Successfully executed:  ${ test . description } ` ) ;                 log ( ` ✅ Successfully executed:  ${ test . description } ` ) ;  
			
		
	
		
		
			
				
					                testsCompleted ++ ;                 testsCompleted ++ ;  
			
		
	
		
		
			
				
					                                 
			
		
	
		
		
			
				
					
					                // Wait for user to press Enter before continuing to next test
                 // Show progress
  
			
				
				
			
		
	
		
		
	
		
		
			
				
					                log ( ` \n 📊 Progress:  ${ testsCompleted } / ${ deeplinkTests . length }  tests completed ` ) ;  
			
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					                // If there are more tests, show the next one
  
			
		
	
		
		
			
				
					                if  ( testsCompleted  <  deeplinkTests . length )  {                 if  ( testsCompleted  <  deeplinkTests . length )  {  
			
		
	
		
		
			
				
					
					                    await  question ( 'Press Enter to continue to the next test...' ) ;                     const  nextTest  =  deeplinkTests [ testsCompleted ] ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					                    log ( '\n⏭️  NEXT UP:' ) ;  
			
		
	
		
		
			
				
					                    log ( '------------------------' ) ;  
			
		
	
		
		
			
				
					                    log ( ` Next test will be:  ${ nextTest . description } ` ) ;  
			
		
	
		
		
			
				
					                    log ( ` URL:  ${ nextTest . url } ` ) ;  
			
		
	
		
		
			
				
					                    log ( '------------------------' ) ;  
			
		
	
		
		
			
				
					                    await  question ( '\n⏎  Press Enter when ready for the next test...' ) ;  
			
		
	
		
		
			
				
					                }                 }  
			
		
	
		
		
			
				
					            }  catch  ( deeplinkError )  {             }  catch  ( deeplinkError )  {  
			
		
	
		
		
			
				
					                const  errorMessage  =  deeplinkError . message  ||  '' ;                 const  errorMessage  =  deeplinkError . message  ||  '' ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -745,14 +731,22 @@ const runDeeplinkTests = async (log) => { 
			
		
	
		
		
			
				
					                }                 }  
			
		
	
		
		
			
				
					                log ( '⚠️ Continuing with next test...' ) ;                 log ( '⚠️ Continuing with next test...' ) ;  
			
		
	
		
		
			
				
					                                 
			
		
	
		
		
			
				
					
					                // Wait for user to press Enter before continuing to next test 
                 // Show next test info after error handling 
  
			
				
				
			
		
	
		
		
	
		
		
			
				
					                if  ( testsCompleted  +  testsSkipped  <  deeplinkTests . length )  {                 if  ( testsCompleted  +  testsSkipped  <  deeplinkTests . length )  {  
			
		
	
		
		
			
				
					
					                    await  question ( 'Press Enter to continue to the next test...' ) ;                     const  nextTest  =  deeplinkTests [ testsCompleted  +  testsSkipped ] ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					                    log ( '\n⏭️  NEXT UP:' ) ;  
			
		
	
		
		
			
				
					                    log ( '------------------------' ) ;  
			
		
	
		
		
			
				
					                    log ( ` Next test will be:  ${ nextTest . description } ` ) ;  
			
		
	
		
		
			
				
					                    log ( ` URL:  ${ nextTest . url } ` ) ;  
			
		
	
		
		
			
				
					                    log ( '------------------------' ) ;  
			
		
	
		
		
			
				
					                    await  question ( '\n⏎  Press Enter when ready for the next test...' ) ;  
			
		
	
		
		
			
				
					                }                 }  
			
		
	
		
		
			
				
					            }             }  
			
		
	
		
		
			
				
					        }         }  
			
		
	
		
		
			
				
					
 
			
		
	
		
		
			
				
					
					        log ( ` ✅ Deeplink tests completed:  ${ testsCompleted }  successful,  ${ testsSkipped }  skipped ` ) ;         log ( '\n🎉 All deeplink tests completed!' ) ;  
			
				
				
			
		
	
		
		
	
		
		
			
				
					        log ( ` ✅ Successful:  ${ testsCompleted } ` ) ;  
			
		
	
		
		
			
				
					        log ( ` ⚠️ Skipped:  ${ testsSkipped } ` ) ;  
			
		
	
		
		
			
				
					                 
			
		
	
		
		
			
				
					        if  ( testsSkipped  >  0 )  {         if  ( testsSkipped  >  0 )  {  
			
		
	
		
		
			
				
					            log ( '\n📝 Note about skipped tests:' ) ;             log ( '\n📝 Note about skipped tests:' ) ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -762,15 +756,9 @@ const runDeeplinkTests = async (log) => { 
			
		
	
		
		
			
				
					            log ( '4. iOS security dialogs must be manually approved for each deeplink test' ) ;             log ( '4. iOS security dialogs must be manually approved for each deeplink test' ) ;  
			
		
	
		
		
			
				
					            log ( '5. If these conditions are met and tests still fail, check URL handling in the app code' ) ;             log ( '5. If these conditions are met and tests still fail, check URL handling in the app code' ) ;  
			
		
	
		
		
			
				
					        }         }  
			
		
	
		
		
			
				
					         
			
		
	
		
		
			
				
					        // Close readline interface
  
			
		
	
		
		
			
				
					        rl . close ( ) ;  
			
		
	
		
		
			
				
					    }  catch  ( error )  {     }  catch  ( error )  {  
			
		
	
		
		
			
				
					        log ( ` ❌ Deeplink tests setup failed:  ${ error . message } ` ) ;         log ( ` ❌ Deeplink tests setup failed:  ${ error . message } ` ) ;  
			
		
	
		
		
			
				
					        log ( '⚠️ Deeplink tests might be unavailable or test data is missing' ) ;         log ( '⚠️ Deeplink tests might be unavailable or test data is missing' ) ;  
			
		
	
		
		
			
				
					        // Close readline interface
  
			
		
	
		
		
			
				
					        rl . close ( ) ;  
			
		
	
		
		
			
				
					        // Don't rethrow the error to prevent halting the process
  
			
		
	
		
		
			
				
					    }     }  
			
		
	
		
		
			
				
					} ; } ;