From 1d4af5fed6f9b34d5702156c88b02873522a653a Mon Sep 17 00:00:00 2001 From: almouro Date: Thu, 26 Sep 2024 18:25:35 +0200 Subject: [PATCH] chore: update appium version in CI --- .../__snapshots__/createTestSpecFile.ts.snap | 18 ++++-------------- .../aws-device-farm/src/buildYmlSpec.ts | 7 +------ .../aws-device-farm/src/createTestSpecFile.ts | 1 - 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/packages/plugins/aws-device-farm/src/__tests__/__snapshots__/createTestSpecFile.ts.snap b/packages/plugins/aws-device-farm/src/__tests__/__snapshots__/createTestSpecFile.ts.snap index f59325c9..e0e6336a 100644 --- a/packages/plugins/aws-device-farm/src/__tests__/__snapshots__/createTestSpecFile.ts.snap +++ b/packages/plugins/aws-device-farm/src/__tests__/__snapshots__/createTestSpecFile.ts.snap @@ -11,18 +11,13 @@ phases: - echo "Navigate to test package directory" - cd $DEVICEFARM_TEST_PACKAGE_PATH - npm install *.tgz - - export APPIUM_VERSION=1.22.2 - - avm $APPIUM_VERSION - - >- - ln -s /usr/local/avm/versions/$APPIUM_VERSION/node_modules/.bin/appium - /usr/local/avm/versions/$APPIUM_VERSION/node_modules/appium/bin/appium.js - npm install --global yarn pre_test: commands: - echo "Start appium server" - >- - appium --log-timestamp --default-capabilities "{\\"deviceName\\": - \\"$DEVICEFARM_DEVICE_NAME\\", + npx appium@2.11.4 --log-timestamp --default-capabilities + "{\\"deviceName\\": \\"$DEVICEFARM_DEVICE_NAME\\", \\"platformName\\":\\"$DEVICEFARM_DEVICE_PLATFORM_NAME\\",\\"app\\":\\"$DEVICEFARM_APP_PATH\\", \\"udid\\":\\"$DEVICEFARM_DEVICE_UDID\\", \\"platformVersion\\":\\"$DEVICEFARM_DEVICE_OS_VERSION\\",\\"chromedriverExecutable\\":\\"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE\\"}" @@ -72,17 +67,12 @@ phases: - echo "Navigate to test package directory" - cd $DEVICEFARM_TEST_PACKAGE_PATH - npm install *.tgz - - export APPIUM_VERSION=1.22.2 - - avm $APPIUM_VERSION - - >- - ln -s /usr/local/avm/versions/$APPIUM_VERSION/node_modules/.bin/appium - /usr/local/avm/versions/$APPIUM_VERSION/node_modules/appium/bin/appium.js pre_test: commands: - echo "Start appium server" - >- - appium --log-timestamp --default-capabilities "{\\"deviceName\\": - \\"$DEVICEFARM_DEVICE_NAME\\", + npx appium@2.11.4 --log-timestamp --default-capabilities + "{\\"deviceName\\": \\"$DEVICEFARM_DEVICE_NAME\\", \\"platformName\\":\\"$DEVICEFARM_DEVICE_PLATFORM_NAME\\",\\"app\\":\\"$DEVICEFARM_APP_PATH\\", \\"udid\\":\\"$DEVICEFARM_DEVICE_UDID\\", \\"platformVersion\\":\\"$DEVICEFARM_DEVICE_OS_VERSION\\",\\"chromedriverExecutable\\":\\"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE\\"}" diff --git a/packages/plugins/aws-device-farm/src/buildYmlSpec.ts b/packages/plugins/aws-device-farm/src/buildYmlSpec.ts index 8374c248..4cb096e0 100644 --- a/packages/plugins/aws-device-farm/src/buildYmlSpec.ts +++ b/packages/plugins/aws-device-farm/src/buildYmlSpec.ts @@ -6,14 +6,9 @@ export const Commands = { "cd $DEVICEFARM_TEST_PACKAGE_PATH", "npm install *.tgz", ], - INSTALL_APPIUM: [ - "export APPIUM_VERSION=1.22.2", - "avm $APPIUM_VERSION", - "ln -s /usr/local/avm/versions/$APPIUM_VERSION/node_modules/.bin/appium /usr/local/avm/versions/$APPIUM_VERSION/node_modules/appium/bin/appium.js", - ], START_APPIUM: [ 'echo "Start appium server"', - `appium --log-timestamp --default-capabilities "{\\"deviceName\\": \\"$DEVICEFARM_DEVICE_NAME\\", \\"platformName\\":\\"$DEVICEFARM_DEVICE_PLATFORM_NAME\\",\\"app\\":\\"$DEVICEFARM_APP_PATH\\", \\"udid\\":\\"$DEVICEFARM_DEVICE_UDID\\", \\"platformVersion\\":\\"$DEVICEFARM_DEVICE_OS_VERSION\\",\\"chromedriverExecutable\\":\\"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE\\"}" >> $DEVICEFARM_LOG_DIR/appiumlog.txt 2>&1 &`, + `npx appium@2.11.4 --log-timestamp --default-capabilities "{\\"deviceName\\": \\"$DEVICEFARM_DEVICE_NAME\\", \\"platformName\\":\\"$DEVICEFARM_DEVICE_PLATFORM_NAME\\",\\"app\\":\\"$DEVICEFARM_APP_PATH\\", \\"udid\\":\\"$DEVICEFARM_DEVICE_UDID\\", \\"platformVersion\\":\\"$DEVICEFARM_DEVICE_OS_VERSION\\",\\"chromedriverExecutable\\":\\"$DEVICEFARM_CHROMEDRIVER_EXECUTABLE\\"}" >> $DEVICEFARM_LOG_DIR/appiumlog.txt 2>&1 &`, `start_appium_timeout=0; while [ true ]; do diff --git a/packages/plugins/aws-device-farm/src/createTestSpecFile.ts b/packages/plugins/aws-device-farm/src/createTestSpecFile.ts index b31c4ad5..ad5c914a 100644 --- a/packages/plugins/aws-device-farm/src/createTestSpecFile.ts +++ b/packages/plugins/aws-device-farm/src/createTestSpecFile.ts @@ -13,7 +13,6 @@ const buildAppiumYmlSpec = (commands: { installCommands: [ ...Commands.INSTALL_NODE, ...Commands.UNPACKAGE_TEST_PACKAGE, - ...Commands.INSTALL_APPIUM, ...(commands.installCommands || []), ], preTestCommands: [...Commands.START_APPIUM, ...(commands.preTestCommands || [])],