From 0ee2e25632783c1b46824390ca33ed8e2c189013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Carden=CC=83a?= <35935591+luisecm@users.noreply.github.com> Date: Mon, 18 Dec 2023 09:31:44 -0600 Subject: [PATCH 1/2] chore(appium): pass discovery disable flag --- config/wdio.mac.app.conf.ts | 2 +- config/wdio.mac.ci.conf.ts | 2 +- config/wdio.mac.multiremote.conf.ts | 2 +- config/wdio.windows.app.conf.ts | 1 + config/wdio.windows.ci.conf.ts | 1 + config/wdio.windows.multiremote.conf.ts | 4 ++-- config/wdio.windows.onetime.conf.ts | 2 +- tests/helpers/commands.ts | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/config/wdio.mac.app.conf.ts b/config/wdio.mac.app.conf.ts index 47f296fb98f..b3b53eb3802 100644 --- a/config/wdio.mac.app.conf.ts +++ b/config/wdio.mac.app.conf.ts @@ -54,7 +54,7 @@ export const config: WebdriverIO.Config = { platformName: "mac", "appium:automationName": MACOS_DRIVER, "appium:bundleId": MACOS_BUNDLE_ID, - "appium:arguments": ["--path", homedir() + "/.uplink"], + "appium:arguments": ["--discovery disable", "--path", homedir() + "/.uplink"], "appium:systemPort": 4724, "appium:prerun": { command: 'do shell script "rm -rf ~/.uplink"', diff --git a/config/wdio.mac.ci.conf.ts b/config/wdio.mac.ci.conf.ts index 5859f95d8b1..e2a4ca73fb2 100644 --- a/config/wdio.mac.ci.conf.ts +++ b/config/wdio.mac.ci.conf.ts @@ -54,7 +54,7 @@ export const config: WebdriverIO.Config = { platformName: "mac", "appium:automationName": MACOS_DRIVER, "appium:bundleId": MACOS_BUNDLE_ID, - "appium:arguments": ["--path", homedir() + "/.uplink"], + "appium:arguments": ["--discovery disable", "--path", homedir() + "/.uplink"], "appium:systemPort": 4724, "appium:prerun": { command: 'do shell script "rm -rf ~/.uplink"', diff --git a/config/wdio.mac.multiremote.conf.ts b/config/wdio.mac.multiremote.conf.ts index f42d82b6429..d466da78769 100644 --- a/config/wdio.mac.multiremote.conf.ts +++ b/config/wdio.mac.multiremote.conf.ts @@ -54,7 +54,7 @@ export const config: WebdriverIO.Config = { platformName: "mac", "appium:automationName": MACOS_DRIVER, "appium:bundleId": MACOS_USER_A_BUNDLE_ID, - "appium:arguments": ["--path", homedir() + "/.uplink"], + "appium:arguments": ["--discovery disable", "--path", homedir() + "/.uplink"], "appium:systemPort": 4725, "appium:prerun": { command: 'do shell script "rm -rf ~/.uplink && rm -rf ~/.uplinkUserB"', diff --git a/config/wdio.windows.app.conf.ts b/config/wdio.windows.app.conf.ts index 0b1848e28ff..ae50591c09a 100644 --- a/config/wdio.windows.app.conf.ts +++ b/config/wdio.windows.app.conf.ts @@ -53,6 +53,7 @@ export const config: WebdriverIO.Config = { "appium:deviceName": "WindowsPC", "appium:automationName": "windows", "appium:app": join(process.cwd(), "\\apps\\bin\\uplink.exe"), + "appium:appArguments": "--discovery disable", "ms:waitForAppLaunch": 30, "appium:prerun": { command: 'If (Test-Path $home/.uplink/.user) {Remove-Item -Recurse -Force $home/.uplink/.user} Else { Break }', diff --git a/config/wdio.windows.ci.conf.ts b/config/wdio.windows.ci.conf.ts index 121d549f2f0..04ba0d1bfc1 100644 --- a/config/wdio.windows.ci.conf.ts +++ b/config/wdio.windows.ci.conf.ts @@ -53,6 +53,7 @@ export const config: WebdriverIO.Config = { "appium:deviceName": "WindowsPC", "appium:automationName": "windows", "appium:app": join(process.cwd(), "\\apps\\bin\\uplink.exe"), + "appium:appArguments": "--discovery disable", "ms:waitForAppLaunch": 50, "appium:prerun": { command: 'If (Test-Path $home/.uplink/.user) {Remove-Item -Recurse -Force $home/.uplink/.user} Else { Break }', diff --git a/config/wdio.windows.multiremote.conf.ts b/config/wdio.windows.multiremote.conf.ts index d577c112f50..fe7c1b1f120 100644 --- a/config/wdio.windows.multiremote.conf.ts +++ b/config/wdio.windows.multiremote.conf.ts @@ -56,7 +56,7 @@ export const config: WebdriverIO.Config = { "appium:systemPort": 4725, "appium:createSessionTimeout": 40000, "ms:waitForAppLaunch": 50, - "appium:appArguments": "--path " + join(process.cwd(), "\\apps\\ChatUserA"), + "appium:appArguments": "--discovery disable --path " + join(process.cwd(), "\\apps\\ChatUserA"), "appium:prerun": { command: `If (Test-Path ${userACacheFolder}) {Remove-Item -Recurse -Force ${userACacheFolder}} Else { Break }`, }, @@ -71,7 +71,7 @@ export const config: WebdriverIO.Config = { "appium:systemPort": 4726, "appium:createSessionTimeout": 40000, "ms:waitForAppLaunch": 50, - "appium:appArguments": "--path " + join(process.cwd(), "\\apps\\ChatUserB"), + "appium:appArguments": "--discovery disable --path " + join(process.cwd(), "\\apps\\ChatUserB"), "appium:prerun": { command: `If (Test-Path ${userBCacheFolder}) {Remove-Item -Recurse -Force ${userBCacheFolder}} Else { Break }`, }, diff --git a/config/wdio.windows.onetime.conf.ts b/config/wdio.windows.onetime.conf.ts index 65ea4f58d43..9d6e45dcbc5 100644 --- a/config/wdio.windows.onetime.conf.ts +++ b/config/wdio.windows.onetime.conf.ts @@ -52,7 +52,7 @@ export const config: WebdriverIO.Config = { "appium:deviceName": "WindowsPC", "appium:automationName": "windows", "appium:app": join(process.cwd(), "\\apps\\bin\\uplink.exe"), - "appium:appArguments": "--path " + join(process.cwd(), "\\apps\\onetimescript2") + " trace2", + "appium:appArguments": "--discovery disable --path " + join(process.cwd(), "\\apps\\onetimescript2") + " trace2", "appium:prerun": { command: 'If (Test-Path $home/.uplink/.user) {Remove-Item -Recurse -Force $home/.uplink/.user} Else { Break }', }, diff --git a/tests/helpers/commands.ts b/tests/helpers/commands.ts index 887ea9b582b..36dd0a52b9b 100644 --- a/tests/helpers/commands.ts +++ b/tests/helpers/commands.ts @@ -228,7 +228,7 @@ export async function launchSecondApplication() { await driver[USER_A_INSTANCE].executeScript("macos: launchApp", [ { bundleId: MACOS_USER_B_BUNDLE_ID, - arguments: ["--path", homedir() + "/.uplinkUserB"], + arguments: ["--discovery disable", "--path", homedir() + "/.uplinkUserB"], }, ]); await browser.pause(5000); From f656e7d7b79435659ef73d84dbe7cd949bf72ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Carden=CC=83a?= <35935591+luisecm@users.noreply.github.com> Date: Mon, 18 Dec 2023 10:44:42 -0600 Subject: [PATCH 2/2] chore(appium): fix ci arguments on config files --- config/wdio.mac.app.conf.ts | 2 +- config/wdio.mac.ci.conf.ts | 2 +- config/wdio.mac.multiremote.conf.ts | 2 +- tests/helpers/commands.ts | 7 ++++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/config/wdio.mac.app.conf.ts b/config/wdio.mac.app.conf.ts index b3b53eb3802..c5faeb38996 100644 --- a/config/wdio.mac.app.conf.ts +++ b/config/wdio.mac.app.conf.ts @@ -54,7 +54,7 @@ export const config: WebdriverIO.Config = { platformName: "mac", "appium:automationName": MACOS_DRIVER, "appium:bundleId": MACOS_BUNDLE_ID, - "appium:arguments": ["--discovery disable", "--path", homedir() + "/.uplink"], + "appium:arguments": ["--discovery", "disable", "--path", homedir() + "/.uplink"], "appium:systemPort": 4724, "appium:prerun": { command: 'do shell script "rm -rf ~/.uplink"', diff --git a/config/wdio.mac.ci.conf.ts b/config/wdio.mac.ci.conf.ts index e2a4ca73fb2..650601c82ad 100644 --- a/config/wdio.mac.ci.conf.ts +++ b/config/wdio.mac.ci.conf.ts @@ -54,7 +54,7 @@ export const config: WebdriverIO.Config = { platformName: "mac", "appium:automationName": MACOS_DRIVER, "appium:bundleId": MACOS_BUNDLE_ID, - "appium:arguments": ["--discovery disable", "--path", homedir() + "/.uplink"], + "appium:arguments": ["--discovery", "disable", "--path", homedir() + "/.uplink"], "appium:systemPort": 4724, "appium:prerun": { command: 'do shell script "rm -rf ~/.uplink"', diff --git a/config/wdio.mac.multiremote.conf.ts b/config/wdio.mac.multiremote.conf.ts index d466da78769..692f8ac4252 100644 --- a/config/wdio.mac.multiremote.conf.ts +++ b/config/wdio.mac.multiremote.conf.ts @@ -54,7 +54,7 @@ export const config: WebdriverIO.Config = { platformName: "mac", "appium:automationName": MACOS_DRIVER, "appium:bundleId": MACOS_USER_A_BUNDLE_ID, - "appium:arguments": ["--discovery disable", "--path", homedir() + "/.uplink"], + "appium:arguments": ["--discovery", "disable", "--path", homedir() + "/.uplink"], "appium:systemPort": 4725, "appium:prerun": { command: 'do shell script "rm -rf ~/.uplink && rm -rf ~/.uplinkUserB"', diff --git a/tests/helpers/commands.ts b/tests/helpers/commands.ts index 36dd0a52b9b..92fedc201e5 100644 --- a/tests/helpers/commands.ts +++ b/tests/helpers/commands.ts @@ -228,7 +228,12 @@ export async function launchSecondApplication() { await driver[USER_A_INSTANCE].executeScript("macos: launchApp", [ { bundleId: MACOS_USER_B_BUNDLE_ID, - arguments: ["--discovery disable", "--path", homedir() + "/.uplinkUserB"], + arguments: [ + "--discovery", + "disable", + "--path", + homedir() + "/.uplinkUserB", + ], }, ]); await browser.pause(5000);