Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions __tests__/setup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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=');
});
Expand All @@ -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', () => {
Expand Down
11 changes: 11 additions & 0 deletions example/test/maestro/android/open-help-center.yaml
Original file line number Diff line number Diff line change
@@ -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"
10 changes: 10 additions & 0 deletions example/test/maestro/android/open-messenger.yaml
Original file line number Diff line number Diff line change
@@ -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"

11 changes: 11 additions & 0 deletions example/test/maestro/ios/open-help-center.yaml
Original file line number Diff line number Diff line change
@@ -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"
10 changes: 10 additions & 0 deletions example/test/maestro/ios/open-messenger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
appId: com.example.intercomreactnative
tags:
- ios
- messenger
---
- launchApp
- tapOn: "Login as an Unidentified User"
- tapOn: "Present Intercom"
- tapOn: "Messenger apps"

23 changes: 18 additions & 5 deletions script/setup
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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}"
Expand Down Expand Up @@ -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 ' ' '░'
Expand All @@ -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}"
Expand Down Expand Up @@ -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
Expand Down