Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix plugin for latest appium version #109

Merged
merged 5 commits into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .azure-template/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: '$(NODE_VERSION)'
- script: |
npm config delete prefix
npm config set prefix $NVM_DIR/versions/node/`node --version`
node --version
npm install -g appium
npm install -g wait-on
10 changes: 6 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
env: {
node: true,
es6: true,
mocha: true,
},
parser: 'babel-eslint',
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2016,
sourceType: 'module',
babelOptions: {
plugins: ['@babel/plugin-proposal-class-properties'],
},
},
plugins: ['prettier'],
plugins: ['prettier', '@typescript-eslint'],
rules: {
'prettier/prettier': ['error', { singleQuote: true }],
quotes: ['error', 'single'],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
},
settings: {
'import/resolver': {
Expand Down
44 changes: 44 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Gradle
# Build your Java project and run tests with Gradle using a Gradle wrapper script.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
trigger:
- main

variables:
ANDROID_EMU_NAME: test
ANDROID_EMU_ABI: x86
ANDROID_EMU_TARGET: android-28
ANDROID_EMU_TAG: default
XCODE_VERSION: 14.2
IOS_PLATFORM_VERSION: 16.2
IOS_DEVICE_NAME: iPhone 12
NODE_VERSION: 18.x
JDK_VERSION: 1.8

jobs:
- job: Android_E2E_Tests
pool:
vmImage: 'macOS-latest'
steps:
- template: .azure-template/bootstrap.yml
- script: $NVM_DIR/versions/node/`node --version`/bin/appium driver install uiautomator2
displayName: Install UIA2 driver
- script: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;$(ANDROID_EMU_TARGET);$(ANDROID_EMU_TAG);$(ANDROID_EMU_ABI)'
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
echo $ANDROID_HOME/emulator/emulator -list-avds

echo "Starting emulator"
nohup $ANDROID_HOME/emulator/emulator -avd "$(ANDROID_EMU_NAME)" -no-snapshot -delay-adb > /dev/null 2>&1 &
$ANDROID_HOME/platform-tools/adb wait-for-device
$ANDROID_HOME/platform-tools/adb devices -l
echo "Emulator started"
displayName: Emulator configuration
- script: |
npm ci
$NVM_DIR/versions/node/$(node --version)/bin/appium plugin install --source=local .
nohup $NVM_DIR/versions/node/$(node --version)/bin/appium server -ka 800 --use-plugins=gestures -pa /wd/hub &
$NVM_DIR/versions/node/$(node --version)/bin/wait-on http://127.0.0.1:4723/wd/hub/status
PLATFORM=android npm run test-e2e
displayName: Android E2E Test
Loading
Loading