Skip to content

Commit 9c92892

Browse files
refactor: moving tests into new directory and moving maestro installation into setup script
1 parent bf0e0dc commit 9c92892

File tree

6 files changed

+22
-10
lines changed

6 files changed

+22
-10
lines changed

example/e2e/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"build:ios": "xcodebuild build -workspace ../ios/IntercomReactNativeExample.xcworkspace -scheme IntercomReactNativeExampleUI -configuration Release -sdk iphonesimulator -derivedDataPath ./build",
99
"test:android": "npx wdio ./wdio.android.conf.ts",
1010
"test:ios": "npx wdio ./wdio.ios.conf.ts",
11-
"maestro:install": "curl -Ls \"https://get.maestro.mobile.dev\" | bash"
1211
},
1312
"keywords": [],
1413
"author": "",

example/e2e/maestro/android/open-help-center.yaml renamed to example/test/maestro/android/open-help-center.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ tags:
77
- tapOn: "Login as an Unidentified User"
88
- tapOn: "Present Help Center"
99
- assertVisible: "Help"
10-
- assertVisible: "Intercom Overview"
11-
- tapOn: "Intercom Overview"
10+
- assertVisible: "Untitled Collection"
11+
- tapOn: "Untitled Collection"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
appId: com.example.intercomreactnative
1+
git appId: com.example.intercomreactnative
22
tags:
33
- android
44
- messenger
55
---
66
- launchApp
77
- tapOn: "Login as an Unidentified User"
88
- tapOn: "Present Intercom"
9-
- tapOn: "Messages"
9+
- tapOn: "Messenger Apps"
1010

File renamed without changes.
File renamed without changes.

script/setup

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CYAN='\033[0;36m'
1313
NC='\033[0m' # No Color
1414

1515
# Progress tracking
16-
TOTAL_STEPS=8
16+
TOTAL_STEPS=9
1717
CURRENT_STEP=0
1818
START_TIME=$(date +%s)
1919

@@ -31,7 +31,7 @@ function step_start() {
3131
CURRENT_STEP=$((CURRENT_STEP + 1))
3232
local step_name="$1"
3333
local icon="$2"
34-
34+
3535
echo "${CYAN}┌─ Step ${CURRENT_STEP}/${TOTAL_STEPS} ────────────────────────────────────────────────┐${NC}"
3636
echo "${CYAN}${NC} ${icon} ${step_name}"
3737
echo "${CYAN}└─────────────────────────────────────────────────────────────┘${NC}"
@@ -62,7 +62,7 @@ function show_progress() {
6262
local percentage=$((CURRENT_STEP * 100 / TOTAL_STEPS))
6363
local filled=$((CURRENT_STEP * 50 / TOTAL_STEPS))
6464
local empty=$((50 - filled))
65-
65+
6666
printf "${CYAN}Progress: [${NC}"
6767
printf "%${filled}s" | tr ' ' ''
6868
printf "%${empty}s" | tr ' ' ''
@@ -74,7 +74,7 @@ function final_summary() {
7474
local duration=$((end_time - START_TIME))
7575
local minutes=$((duration / 60))
7676
local seconds=$((duration % 60))
77-
77+
7878
echo "\n${GREEN}┌─────────────────────────────────────────────────────────────┐${NC}"
7979
echo "${GREEN}│ 🎉 Setup Complete! 🎉 │${NC}"
8080
echo "${GREEN}└─────────────────────────────────────────────────────────────┘${NC}"
@@ -181,7 +181,20 @@ cd -
181181
step_success "iOS dependencies installed"
182182
show_progress
183183

184-
# Step 8: Final Setup
184+
# Step 8: Install Maestro
185+
step_start "Installing Maestro" "🧪"
186+
if ! [ -x "$(command -v maestro)" ]; then
187+
curl -Ls "https://get.maestro.mobile.dev" | bash
188+
export PATH="$PATH:$HOME/.maestro/bin"
189+
step_success "Maestro installed successfully"
190+
else
191+
step_info "Checking Maestro version..."
192+
maestro -v
193+
step_success "Maestro is already installed"
194+
fi
195+
show_progress
196+
197+
# Step 9: Final Setup
185198
step_start "Finalizing setup" "🏁"
186199
step_success "Setup completed successfully"
187200
show_progress

0 commit comments

Comments
 (0)