Skip to content

Commit 911dd8a

Browse files
committed
mac changes in win-changes branch done by samiran
1 parent 2d635fb commit 911dd8a

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

mac/common-utils.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ fetch_plan_details() {
231231
local web_unauthorized=false
232232
local mobile_unauthorized=false
233233

234-
if [[ "$test_type" == "web" || "$test_type" == "both" ]]; then
234+
if [[ "$test_type" == "web" ]]; then
235235
RESPONSE_WEB=$(curl -s -w "\n%{http_code}" -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_ACCESS_KEY" https://api.browserstack.com/automate/plan.json)
236236
HTTP_CODE_WEB=$(echo "$RESPONSE_WEB" | tail -n1)
237237
RESPONSE_WEB_BODY=$(echo "$RESPONSE_WEB" | sed '$d')
@@ -246,7 +246,7 @@ fetch_plan_details() {
246246
fi
247247
fi
248248

249-
if [[ "$test_type" == "app" || "$test_type" == "both" ]]; then
249+
if [[ "$test_type" == "app" ]]; then
250250
RESPONSE_MOBILE=$(curl -s -w "\n%{http_code}" -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_ACCESS_KEY" https://api-cloud.browserstack.com/app-automate/plan.json)
251251
HTTP_CODE_MOBILE=$(echo "$RESPONSE_MOBILE" | tail -n1)
252252
RESPONSE_MOBILE_BODY=$(echo "$RESPONSE_MOBILE" | sed '$d')
@@ -264,11 +264,21 @@ fetch_plan_details() {
264264
log_info "Plan summary: Web $WEB_PLAN_FETCHED ($TEAM_PARALLELS_MAX_ALLOWED_WEB max), Mobile $MOBILE_PLAN_FETCHED ($TEAM_PARALLELS_MAX_ALLOWED_MOBILE max)"
265265

266266
if [[ "$test_type" == "web" && "$web_unauthorized" == true ]] || \
267-
[[ "$test_type" == "app" && "$mobile_unauthorized" == true ]] || \
268-
[[ "$test_type" == "both" && "$web_unauthorized" == true && "$mobile_unauthorized" == true ]]; then
267+
[[ "$test_type" == "app" && "$mobile_unauthorized" == true ]]; then
269268
log_msg_to "❌ Unauthorized to fetch required plan(s). Exiting."
270269
exit 1
271270
fi
271+
272+
if [[ "$RUN_MODE" == *"--silent"* ]]; then
273+
if [[ "$test_type" == "web" ]]; then
274+
TEAM_PARALLELS_MAX_ALLOWED_WEB=5
275+
export TEAM_PARALLELS_MAX_ALLOWED_WEB=5
276+
else
277+
TEAM_PARALLELS_MAX_ALLOWED_MOBILE=5
278+
export TEAM_PARALLELS_MAX_ALLOWED_MOBILE=5
279+
fi
280+
log_info "Resetting Plan summary: Web $WEB_PLAN_FETCHED ($TEAM_PARALLELS_MAX_ALLOWED_WEB max), Mobile $MOBILE_PLAN_FETCHED ($TEAM_PARALLELS_MAX_ALLOWED_MOBILE max)"
281+
fi
272282
}
273283

274284
# Function to check if IP is private
@@ -447,4 +457,3 @@ detect_os() {
447457

448458
export NOW_OS=$response
449459
}
450-

mac/env-setup-run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,4 +545,4 @@ detect_setup_python_env() {
545545
source .venv/bin/activate
546546
fi
547547
log_success "Virtual environment created and activated."
548-
}
548+
}

mac/user-interaction.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@ perform_next_steps_based_on_test_type() {
137137
"app")
138138
get_upload_app
139139
;;
140-
"both")
141-
get_test_url
142-
get_upload_app
143-
;;
144140
esac
145141
}
146142

0 commit comments

Comments
 (0)