From 5cc42be58a0a60c17d967c639eab2e1d8e76c60d Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Tue, 8 Apr 2025 20:31:47 -0600 Subject: [PATCH] fix some test scripts --- scripts/check-prerequisites.js | 10 +++++----- scripts/test-android.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/check-prerequisites.js b/scripts/check-prerequisites.js index c7101e72..b8592ca7 100644 --- a/scripts/check-prerequisites.js +++ b/scripts/check-prerequisites.js @@ -51,7 +51,7 @@ const { existsSync } = require('fs'); */ function checkCommand(command, errorMessage) { try { - execSync(command + ' --version', { stdio: 'ignore' }); + execSync(command, { stdio: 'ignore' }); return true; } catch (e) { console.error(`❌ ${errorMessage}`); @@ -164,10 +164,10 @@ function main() { // Check required command line tools // These are essential for building and testing the application - success &= checkCommand('node', 'Node.js is required'); - success &= checkCommand('npm', 'npm is required'); - success &= checkCommand('gradle', 'Gradle is required for Android builds'); - success &= checkCommand('xcodebuild', 'Xcode is required for iOS builds'); + success &= checkCommand('node --version', 'Node.js is required'); + success &= checkCommand('npm --version', 'npm is required'); + success &= checkCommand('gradle --version', 'Gradle is required for Android builds'); + success &= checkCommand('xcodebuild --help', 'Xcode is required for iOS builds'); // Check platform-specific development environments success &= checkAndroidSetup(); diff --git a/scripts/test-android.js b/scripts/test-android.js index af30f59e..4f22f9fa 100644 --- a/scripts/test-android.js +++ b/scripts/test-android.js @@ -170,7 +170,7 @@ const executeDeeplink = async (url, description, log) => { try { // Stop the app before executing the deep link - execSync('adb shell am force-stop app.timesafari'); + execSync('adb shell am force-stop app.timesafari.app'); await new Promise(resolve => setTimeout(resolve, 1000)); // Wait 1s execSync(`adb shell am start -W -a android.intent.action.VIEW -d "${url}" -c android.intent.category.BROWSABLE`);