Skip to content

Commit f8b4839

Browse files
Fix plugin for latest appium version (#109)
* Fix plugin for latest appium version * bump version * add azure pipelines * Install wait plugin * fix gestures plugin tests
1 parent 686581e commit f8b4839

8 files changed

Lines changed: 6925 additions & 2999 deletions

File tree

.azure-template/bootstrap.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
steps:
2+
- task: NodeTool@0
3+
inputs:
4+
versionSpec: '$(NODE_VERSION)'
5+
- script: |
6+
npm config delete prefix
7+
npm config set prefix $NVM_DIR/versions/node/`node --version`
8+
node --version
9+
npm install -g appium
10+
npm install -g wait-on

.eslintrc.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
module.exports = {
22
extends: [
33
'eslint:recommended',
4-
'plugin:import/errors',
5-
'plugin:import/warnings',
4+
'plugin:@typescript-eslint/eslint-recommended',
5+
'plugin:@typescript-eslint/recommended',
66
'prettier',
77
],
88
env: {
99
node: true,
1010
es6: true,
1111
mocha: true,
1212
},
13-
parser: 'babel-eslint',
13+
parser: '@typescript-eslint/parser',
1414
parserOptions: {
1515
ecmaVersion: 2016,
1616
sourceType: 'module',
1717
babelOptions: {
1818
plugins: ['@babel/plugin-proposal-class-properties'],
1919
},
2020
},
21-
plugins: ['prettier'],
21+
plugins: ['prettier', '@typescript-eslint'],
2222
rules: {
2323
'prettier/prettier': ['error', { singleQuote: true }],
2424
quotes: ['error', 'single'],
25+
'@typescript-eslint/no-explicit-any': 'off',
26+
'@typescript-eslint/no-empty-function': 'off',
2527
},
2628
settings: {
2729
'import/resolver': {

azure-pipelines.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Gradle
2+
# Build your Java project and run tests with Gradle using a Gradle wrapper script.
3+
# Add steps that analyze code, save build artifacts, deploy, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
5+
trigger:
6+
- main
7+
8+
variables:
9+
ANDROID_EMU_NAME: test
10+
ANDROID_EMU_ABI: x86
11+
ANDROID_EMU_TARGET: android-28
12+
ANDROID_EMU_TAG: default
13+
XCODE_VERSION: 14.2
14+
IOS_PLATFORM_VERSION: 16.2
15+
IOS_DEVICE_NAME: iPhone 12
16+
NODE_VERSION: 18.x
17+
JDK_VERSION: 1.8
18+
19+
jobs:
20+
- job: Android_E2E_Tests
21+
pool:
22+
vmImage: 'macOS-latest'
23+
steps:
24+
- template: .azure-template/bootstrap.yml
25+
- script: $NVM_DIR/versions/node/`node --version`/bin/appium driver install uiautomator2
26+
displayName: Install UIA2 driver
27+
- script: |
28+
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;$(ANDROID_EMU_TARGET);$(ANDROID_EMU_TAG);$(ANDROID_EMU_ABI)'
29+
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n "$(ANDROID_EMU_NAME)" -k 'system-images;$(ANDROID_EMU_TARGET);$(ANDROID_EMU_TAG);$(ANDROID_EMU_ABI)' --force
30+
echo $ANDROID_HOME/emulator/emulator -list-avds
31+
32+
echo "Starting emulator"
33+
nohup $ANDROID_HOME/emulator/emulator -avd "$(ANDROID_EMU_NAME)" -no-snapshot -delay-adb > /dev/null 2>&1 &
34+
$ANDROID_HOME/platform-tools/adb wait-for-device
35+
$ANDROID_HOME/platform-tools/adb devices -l
36+
echo "Emulator started"
37+
displayName: Emulator configuration
38+
- script: |
39+
npm ci
40+
$NVM_DIR/versions/node/$(node --version)/bin/appium plugin install --source=local .
41+
nohup $NVM_DIR/versions/node/$(node --version)/bin/appium server -ka 800 --use-plugins=gestures -pa /wd/hub &
42+
$NVM_DIR/versions/node/$(node --version)/bin/wait-on http://127.0.0.1:4723/wd/hub/status
43+
PLATFORM=android npm run test-e2e
44+
displayName: Android E2E Test

0 commit comments

Comments
 (0)