diff --git a/__tests__/setup.test.js b/__tests__/setup.test.js index 22269a02..d88abbf4 100644 --- a/__tests__/setup.test.js +++ b/__tests__/setup.test.js @@ -51,7 +51,7 @@ describe('Setup Script', () => { const content = fs.readFileSync(setupScriptPath, 'utf8'); // Check for progress tracking - expect(content).toContain('TOTAL_STEPS=8'); + expect(content).toContain('TOTAL_STEPS=9'); expect(content).toContain('CURRENT_STEP=0'); expect(content).toContain('START_TIME='); }); @@ -67,7 +67,8 @@ describe('Setup Script', () => { expect(content).toContain('Step 5: Yarn Package Manager'); expect(content).toContain('Step 6: Project Dependencies'); expect(content).toContain('Step 7: iOS Dependencies'); - expect(content).toContain('Step 8: Final Setup'); + expect(content).toContain('Step 8: Install Maestro'); + expect(content).toContain('Step 9: Final Setup'); }); test('setup script should have enhanced user feedback', () => { diff --git a/example/test/maestro/android/open-help-center.yaml b/example/test/maestro/android/open-help-center.yaml new file mode 100644 index 00000000..68001e49 --- /dev/null +++ b/example/test/maestro/android/open-help-center.yaml @@ -0,0 +1,11 @@ +appId: com.example.intercomreactnative +tags: + - android + - help-center +--- +- launchApp +- tapOn: "Login as an Unidentified User" +- tapOn: "Present Help Center" +- assertVisible: "Help" +- assertVisible: "Untitled Collection" +- tapOn: "Untitled Collection" diff --git a/example/test/maestro/android/open-messenger.yaml b/example/test/maestro/android/open-messenger.yaml new file mode 100644 index 00000000..62ee64fb --- /dev/null +++ b/example/test/maestro/android/open-messenger.yaml @@ -0,0 +1,10 @@ +git appId: com.example.intercomreactnative +tags: + - android + - messenger +--- +- launchApp +- tapOn: "Login as an Unidentified User" +- tapOn: "Present Intercom" +- tapOn: "Messenger Apps" + diff --git a/example/test/maestro/ios/open-help-center.yaml b/example/test/maestro/ios/open-help-center.yaml new file mode 100644 index 00000000..82622cdc --- /dev/null +++ b/example/test/maestro/ios/open-help-center.yaml @@ -0,0 +1,11 @@ +appId: com.example.intercomreactnative +tags: + - ios + - help-center +--- +- launchApp +- tapOn: "Login as an Unidentified User" +- tapOn: "Present Help Center" +- assertVisible: "Help" +- assertVisible: "Untitled collection" +- tapOn: "Untitled collection" diff --git a/example/test/maestro/ios/open-messenger.yaml b/example/test/maestro/ios/open-messenger.yaml new file mode 100644 index 00000000..5a351f1b --- /dev/null +++ b/example/test/maestro/ios/open-messenger.yaml @@ -0,0 +1,10 @@ +appId: com.example.intercomreactnative +tags: + - ios + - messenger +--- +- launchApp +- tapOn: "Login as an Unidentified User" +- tapOn: "Present Intercom" +- tapOn: "Messenger apps" + diff --git a/script/setup b/script/setup index aada7798..b2bb3377 100755 --- a/script/setup +++ b/script/setup @@ -13,7 +13,7 @@ CYAN='\033[0;36m' NC='\033[0m' # No Color # Progress tracking -TOTAL_STEPS=8 +TOTAL_STEPS=9 CURRENT_STEP=0 START_TIME=$(date +%s) @@ -31,7 +31,7 @@ function step_start() { CURRENT_STEP=$((CURRENT_STEP + 1)) local step_name="$1" local icon="$2" - + echo "${CYAN}┌─ Step ${CURRENT_STEP}/${TOTAL_STEPS} ────────────────────────────────────────────────┐${NC}" echo "${CYAN}│${NC} ${icon} ${step_name}" echo "${CYAN}└─────────────────────────────────────────────────────────────┘${NC}" @@ -62,7 +62,7 @@ function show_progress() { local percentage=$((CURRENT_STEP * 100 / TOTAL_STEPS)) local filled=$((CURRENT_STEP * 50 / TOTAL_STEPS)) local empty=$((50 - filled)) - + printf "${CYAN}Progress: [${NC}" printf "%${filled}s" | tr ' ' '█' printf "%${empty}s" | tr ' ' '░' @@ -74,7 +74,7 @@ function final_summary() { local duration=$((end_time - START_TIME)) local minutes=$((duration / 60)) local seconds=$((duration % 60)) - + echo "\n${GREEN}┌─────────────────────────────────────────────────────────────┐${NC}" echo "${GREEN}│ 🎉 Setup Complete! 🎉 │${NC}" echo "${GREEN}└─────────────────────────────────────────────────────────────┘${NC}" @@ -181,7 +181,20 @@ cd - step_success "iOS dependencies installed" show_progress -# Step 8: Final Setup +# Step 8: Install Maestro +step_start "Installing Maestro" "🧪" +if ! [ -x "$(command -v maestro)" ]; then + curl -Ls "https://get.maestro.mobile.dev" | bash + export PATH="$PATH:$HOME/.maestro/bin" + step_success "Maestro installed successfully" +else + step_info "Checking Maestro version..." + maestro -v + step_success "Maestro is already installed" +fi +show_progress + +# Step 9: Final Setup step_start "Finalizing setup" "🏁" step_success "Setup completed successfully" show_progress