mirror of
https://github.com/appium/appium.git
synced 2026-11-08 10:45:05 +08:00
Compare commits
65
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c26af8f852 | ||
|
|
bfef2db517 | ||
|
|
4c0181fb81 | ||
|
|
49d6a81973 | ||
|
|
ce44fc0fcf | ||
|
|
5ab78297e1 | ||
|
|
3764149753 | ||
|
|
21b7aa9b93 | ||
|
|
b67d72e4f3 | ||
|
|
e916a58d93 | ||
|
|
4090b56931 | ||
|
|
d48283cdca | ||
|
|
b2ad5a49db | ||
|
|
89cf01fda3 | ||
|
|
7d7bb7abc3 | ||
|
|
337241b8f6 | ||
|
|
0c62fc00e4 | ||
|
|
f0608a5d01 | ||
|
|
04c44260ac | ||
|
|
9bf9cc70fa | ||
|
|
0c70d27679 | ||
|
|
44422a1e58 | ||
|
|
21dc828306 | ||
|
|
f3a393aed8 | ||
|
|
12cdbb7fdd | ||
|
|
d14a0c5c0b | ||
|
|
74378cca66 | ||
|
|
92f4677b94 | ||
|
|
e2b3bdb09d | ||
|
|
6820f5ec4e | ||
|
|
743c764d5e | ||
|
|
ca1480adcf | ||
|
|
8ea98b1fe9 | ||
|
|
e09e5051c8 | ||
|
|
44e5f1ba05 | ||
|
|
0f735774af | ||
|
|
61de659616 | ||
|
|
07d4a81d27 | ||
|
|
d2a92c8bc1 | ||
|
|
c37f4500c2 | ||
|
|
b6c7533513 | ||
|
|
108b8c0209 | ||
|
|
41289724dc | ||
|
|
58d359d944 | ||
|
|
cf4f533022 | ||
|
|
0eb56a055e | ||
|
|
94dd88fc98 | ||
|
|
39d5cee1b7 | ||
|
|
17a803da27 | ||
|
|
3470ec5101 | ||
|
|
f5bc702c9a | ||
|
|
0668bc45dc | ||
|
|
a815e3be9d | ||
|
|
b5947991cf | ||
|
|
afc15599c0 | ||
|
|
75a9154366 | ||
|
|
8eea316484 | ||
|
|
ef9b99feee | ||
|
|
7dbf3c2127 | ||
|
|
d3c4d40b44 | ||
|
|
6357b30051 | ||
|
|
cfdf898e04 | ||
|
|
159703744f | ||
|
|
7ae4b5cb6a | ||
|
|
887cb449e6 |
+22
-2
@@ -4,7 +4,7 @@
|
||||
version: 3
|
||||
|
||||
project:
|
||||
id: github.com/appium/appium
|
||||
id: appium
|
||||
name: appium
|
||||
|
||||
paths:
|
||||
@@ -35,6 +35,26 @@ targets:
|
||||
path: ./packages/support
|
||||
- type: npm
|
||||
path: ./packages/test-support
|
||||
- type: npm
|
||||
path: ./packages/types
|
||||
- type: npm
|
||||
path: ./packages/schema
|
||||
- type: npm
|
||||
path: ./packages/universal-xmlplugin
|
||||
- type: npm
|
||||
path: ./packages/opencv
|
||||
- type: npm
|
||||
path: ./packages/images-plugin
|
||||
- type: npm
|
||||
path: ./packages/base-plugin
|
||||
- type: npm
|
||||
path: ./packages/relaxed-caps-plugin
|
||||
- type: npm
|
||||
path: ./packages/fake-plugin
|
||||
- type: npm
|
||||
path: ./packages/docutils
|
||||
|
||||
|
||||
|
||||
revision:
|
||||
branch: 2.0
|
||||
branch: master
|
||||
|
||||
@@ -28,13 +28,7 @@ jobs:
|
||||
uses: bahmutov/npm-install@cb39a46f27f14697fec763d60fb23ad347e2befa # tag=v1
|
||||
with:
|
||||
useRollingCache: true
|
||||
- name: Run smoke tests
|
||||
uses: boneskull/nodejs-production-test-action@v1
|
||||
with:
|
||||
script: test:smoke
|
||||
workspaces: true
|
||||
quiet: true
|
||||
- name: Run unit & E2E tests
|
||||
- name: Run smoke, unit & E2E tests
|
||||
run: npm run test:ci
|
||||
|
||||
lint:
|
||||
@@ -43,7 +37,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
uses: bahmutov/npm-install@cb39a46f27f14697fec763d60fb23ad347e2befa # tag=v1
|
||||
with:
|
||||
useRollingCache: true
|
||||
- name: ESLint
|
||||
run: npm run lint
|
||||
- name: Check types
|
||||
@@ -56,6 +52,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
uses: bahmutov/npm-install@cb39a46f27f14697fec763d60fb23ad347e2befa # tag=v1
|
||||
with:
|
||||
useRollingCache: true
|
||||
- name: Generate docs
|
||||
run: npm run generate-docs
|
||||
|
||||
@@ -13,11 +13,12 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||
with:
|
||||
ref: 'master'
|
||||
- name: fossa analyze
|
||||
run: |
|
||||
npm install
|
||||
curl -sS -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
|
||||
ref: master
|
||||
- name: Install dependencies
|
||||
uses: bahmutov/npm-install@cb39a46f27f14697fec763d60fb23ad347e2befa # tag=v1
|
||||
- name: Install fossa-cli
|
||||
run: ./scripts/install-fossa.sh -d
|
||||
- name: Run FOSSA analysis
|
||||
fossa analyze
|
||||
fossa test
|
||||
env:
|
||||
|
||||
@@ -13,7 +13,11 @@ Appium is an open-source, cross-platform test automation tool for native,
|
||||
hybrid, mobile web and desktop apps. We support simulators (iOS), emulators
|
||||
(Android), and real devices (iOS, Android, Windows, Mac).
|
||||
|
||||
Want to skip straight to the action? Check out our [getting started](/docs/en/about-appium/getting-started.md) doc.
|
||||
:bangbang: Major documentation revision in progress
|
||||
|
||||
Appium is in the final stages of a major revision (to version 2.0). As such, the documentation
|
||||
found around the web may not be correct. The current Appium 2.0 documentation is very much in
|
||||
progress. Currently, it can be found [here](https://appium.github.io/appium/docs/en/2.0/).
|
||||
|
||||
### Drivers
|
||||
|
||||
@@ -130,6 +134,7 @@ plugin then don't hesitate to create a PR and add a link to your plugin into the
|
||||
Name | Description
|
||||
--- | ---
|
||||
[appium-device-farm](https://github.com/AppiumTestDistribution/appium-device-farm) | This is an Appium plugin designed to manage and create driver session on connected android devices and iOS Simulators.
|
||||
[appium-reporter-plugin](https://github.com/AppiumTestDistribution/appium-reporter-plugin) | This Plugin generates standalone consolidated html report with screenshots. Report can be fetched from appium server, without worrying about heavy lifting such as screenshot capturing, report generation etc.
|
||||
</details>
|
||||
|
||||
### Server Command Line Interface
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
# parameters: # No params yet, but may add later
|
||||
jobs:
|
||||
- job: generate_docs
|
||||
pool:
|
||||
vmImage: "macOS 10.14"
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '12.x'
|
||||
- script: |
|
||||
# do git stuff
|
||||
npm install
|
||||
brew install hub
|
||||
hub --version
|
||||
git remote add triager https://triager:$GITHUB_TOKEN@github.com/appium/appium
|
||||
git checkout -b generate-docs-$BUILD_SOURCEVERSION
|
||||
git status
|
||||
displayName: Checkout Generate Docs Branch
|
||||
env:
|
||||
GITHUB_TOKEN: $(GITHUB_TOKEN)
|
||||
- script: |
|
||||
# Generate the docs
|
||||
npm run generate-docs
|
||||
git add .
|
||||
|
||||
# log the status so we know what is going on, on failure
|
||||
git status -s
|
||||
|
||||
# If docs were generated, make a PR to update the docs
|
||||
if [[ -n $(git status -s) ]]; then
|
||||
git commit -a -n -m 'Update generated docs [ci skip]'
|
||||
git push triager generate-docs-$BUILD_SOURCEVERSION
|
||||
hub pull-request -b "appium:master" -h "appium:generate-docs-$BUILD_SOURCEVERSION" -m "docs: Update auto-generated docs"
|
||||
fi
|
||||
displayName: Generate Docs and Make PR
|
||||
env:
|
||||
GITHUB_TOKEN: $(GITHUB_TOKEN)
|
||||
@@ -1,8 +1,14 @@
|
||||
# parameters: # No params yet, but may add later
|
||||
|
||||
parameters:
|
||||
vmImage: 'macOS-latest'
|
||||
bundleNodeJSVersion: '16.17.0'
|
||||
nodeJSVersion: '16.x'
|
||||
|
||||
jobs:
|
||||
- job: bundle_and_upload_appium_zip
|
||||
pool:
|
||||
vmImage: 'macOS 10.14'
|
||||
vmImage: ${{ parameters.vmImage }}
|
||||
variables:
|
||||
CC: gcc
|
||||
CXX: g++
|
||||
@@ -11,7 +17,7 @@ jobs:
|
||||
displayName: Print GCC Version
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '12.x'
|
||||
versionSpec: ${{ parameters.nodeJSVersion }}
|
||||
- script: npm install
|
||||
displayName: Install NPM Dependencies
|
||||
- script: npm run build
|
||||
@@ -19,13 +25,13 @@ jobs:
|
||||
- script: npm prune --production
|
||||
displayName: Get rid of dev dependencies
|
||||
- script: |
|
||||
curl -o node-darwin.tar.gz https://nodejs.org/dist/v12.16.1/node-v12.16.1-darwin-x64.tar.gz
|
||||
curl -o node-darwin.tar.gz https://nodejs.org/dist/v${{ parameters.bundleNodeJSVersion }}/node-v${{ parameters.bundleNodeJSVersion }}-darwin-x64.tar.gz
|
||||
mkdir node-darwin-unpacked
|
||||
tar -xzf node-darwin.tar.gz -C node-darwin-unpacked/ --strip-components 1
|
||||
rm -f node-darwin.tar.gz
|
||||
cp node-darwin-unpacked/bin/node node-darwin
|
||||
rm -rf node-darwin-unpacked
|
||||
displayName: Download NodeJS
|
||||
displayName: Download NodeJS to bundle it
|
||||
- script: npm run zip
|
||||
displayName: Create the bundle zip
|
||||
- script: npm install
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"appium": ["../packages/appium"]
|
||||
"appium": ["../packages/appium"],
|
||||
"appium/plugin": ["../packages/appium/plugin"],
|
||||
"@appium/plugin-test-support": ["../packages/plugin-test-support"]
|
||||
},
|
||||
"types": ["webdriverio/async"]
|
||||
},
|
||||
"extends": "./tsconfig.base.json",
|
||||
"references": [{"path": "../packages/appium"}, {"path": "../packages/base-plugin"}, {"path": "../packages/types"}]
|
||||
"references": [
|
||||
{"path": "../packages/appium"},
|
||||
{"path": "../packages/base-plugin"},
|
||||
{"path": "../packages/types"},
|
||||
{"path": "../packages/plugin-test-support"}
|
||||
]
|
||||
}
|
||||
|
||||
Generated
+1370
-1164
File diff suppressed because it is too large
Load Diff
+14
-11
@@ -53,9 +53,10 @@
|
||||
"sync-pkgs:keywords": "sync-monorepo-packages --field=keywords --packages=\"packages/*\" --packages=\"!packages/eslint-config-appium\" --packages=\"!packages/types\"",
|
||||
"sync-pkgs:license": "sync-monorepo-packages --force --no-package-json LICENSE",
|
||||
"test": "run-s build test:unit lint",
|
||||
"test:ci": "run-s install-fake-driver test:unit test:ci:e2e",
|
||||
"test:ci": "run-s test:smoke install-fake-driver test:unit test:ci:e2e",
|
||||
"test:ci:e2e": "lerna run test:e2e",
|
||||
"test:e2e": "lerna run --parallel --max-buffer=128 test:e2e",
|
||||
"test:smoke": "smoker --all test:smoke",
|
||||
"test:unit": "lerna run test",
|
||||
"uninstall-fake-driver": "npm start -- driver uninstall fake",
|
||||
"upload": "gulp github-upload",
|
||||
@@ -83,6 +84,7 @@
|
||||
"@appium/base-plugin": "file:packages/base-plugin",
|
||||
"@appium/doctor": "file:packages/doctor",
|
||||
"@appium/docutils": "file:packages/docutils",
|
||||
"@appium/driver-test-support": "file:packages/driver-test-support",
|
||||
"@appium/eslint-config-appium": "file:packages/eslint-config-appium",
|
||||
"@appium/execute-driver-plugin": "file:packages/execute-driver-plugin",
|
||||
"@appium/fake-driver": "file:packages/fake-driver",
|
||||
@@ -90,6 +92,7 @@
|
||||
"@appium/gulp-plugins": "file:packages/gulp-plugins",
|
||||
"@appium/images-plugin": "file:packages/images-plugin",
|
||||
"@appium/opencv": "file:packages/opencv",
|
||||
"@appium/plugin-test-support": "file:packages/plugin-test-support",
|
||||
"@appium/relaxed-caps-plugin": "file:packages/relaxed-caps-plugin",
|
||||
"@appium/schema": "file:packages/schema",
|
||||
"@appium/support": "file:packages/support",
|
||||
@@ -102,18 +105,17 @@
|
||||
"devDependencies": {
|
||||
"@appium/fake-plugin": "1.3.1",
|
||||
"@babel/cli": "7.18.10",
|
||||
"@babel/core": "7.18.10",
|
||||
"@babel/eslint-parser": "7.18.9",
|
||||
"@babel/core": "7.19.0",
|
||||
"@babel/plugin-transform-runtime": "7.18.10",
|
||||
"@babel/preset-env": "7.18.10",
|
||||
"@babel/preset-env": "7.19.0",
|
||||
"@babel/register": "7.18.9",
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@types/chai": "4.3.3",
|
||||
"@types/chai-as-promised": "7.1.5",
|
||||
"@types/mocha": "9.1.1",
|
||||
"@types/node": "16.11.47",
|
||||
"@types/semver": "7.3.10",
|
||||
"@types/node": "16.11.57",
|
||||
"@types/semver": "7.3.12",
|
||||
"@types/sinon": "10.0.13",
|
||||
"@types/sinon-chai": "3.2.8",
|
||||
"@types/teen_process": "1.16.1",
|
||||
@@ -124,12 +126,12 @@
|
||||
"chai": "4.3.6",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"chai-webdriverio-async": "2.7.0",
|
||||
"eslint": "7.32.0",
|
||||
"eslint": "8.23.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-find-rules": "4.1.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-mocha": "9.0.0",
|
||||
"eslint-plugin-promise": "6.0.0",
|
||||
"eslint-plugin-mocha": "10.1.0",
|
||||
"eslint-plugin-promise": "6.0.1",
|
||||
"fancy-log": "2.0.0",
|
||||
"finalhandler": "1.2.0",
|
||||
"get-port": "5.1.1",
|
||||
@@ -139,6 +141,7 @@
|
||||
"lerna": "4.0.0",
|
||||
"lint-staged": "13.0.3",
|
||||
"log-symbols": "4.1.0",
|
||||
"midnight-smoker": "1.1.1",
|
||||
"mjpeg-consumer": "2.0.0",
|
||||
"mjpeg-server": "0.3.1",
|
||||
"mocha": "10.0.0",
|
||||
@@ -154,7 +157,7 @@
|
||||
"through2": "4.0.2",
|
||||
"typescript": "4.7.4",
|
||||
"validate.js": "0.13.1",
|
||||
"webdriverio": "7.20.9",
|
||||
"webdriverio": "7.24.0",
|
||||
"ws": "8.8.1",
|
||||
"yaml-js": "0.3.1"
|
||||
},
|
||||
|
||||
@@ -3,6 +3,36 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [2.0.0-beta.44](https://github.com/appium/appium/compare/appium@2.0.0-beta.43...appium@2.0.0-beta.44) (2022-09-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **appium:** do not throw ENAMETOOLONG on long cli arg ([cfdf898](https://github.com/appium/appium/commit/cfdf898e04e94032e3dd48b595caa4b6f0828289))
|
||||
* **appium:** eat update info errors ([7d7bb7a](https://github.com/appium/appium/commit/7d7bb7abc3173d29b843b3b238465d9914eaf091)), closes [#17357](https://github.com/appium/appium/issues/17357)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* **appium:** remove test export ([6820f5e](https://github.com/appium/appium/commit/6820f5ec4e62fbb5e91ce739d8aadb7f7b7a7a74)), closes [#17398](https://github.com/appium/appium/issues/17398)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **appium:** Adjust NODE_PATH so NPM could properly resolve component peer dependencies ([#17325](https://github.com/appium/appium/issues/17325)) ([39d5cee](https://github.com/appium/appium/commit/39d5cee1b71f611e810900d3faed8e0fed6e1ce0))
|
||||
* **support:** Move module root detection utility into support package ([#17427](https://github.com/appium/appium/issues/17427)) ([5ab7829](https://github.com/appium/appium/commit/5ab78297e172bc6a5751c636f81b3b202fbe2743))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **appium:** This removes the `test` export from `appium`. `import * from 'appium/test'` is no longer supported.
|
||||
|
||||
Use `@appium/test-support`, `@appium/driver-test-support` or `@appium/plugin-test-support` instead.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-beta.43](https://github.com/appium/appium/compare/appium@2.0.0-beta.42...appium@2.0.0-beta.43) (2022-08-10)
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ const {version} = require('../../package.json');
|
||||
|
||||
const branch = process.env.APPIUM_DOCS_BRANCH || DOCS_BRANCH;
|
||||
const prefix = process.env.APPIUM_DOCS_PREFIX || DOCS_PREFIX;
|
||||
const remote = process.env.APPIUM_DOCS_PREFIX || DOCS_REMOTE;
|
||||
const remote = process.env.APPIUM_DOCS_REMOTE || DOCS_REMOTE;
|
||||
|
||||
const shouldPush = !!process.env.APPIUM_DOCS_PUBLISH;
|
||||
|
||||
|
||||
@@ -783,6 +783,11 @@ class AppiumDriver extends DriverCore {
|
||||
return dstSession && _.isFunction(dstSession.proxyActive) && dstSession.proxyActive(sessionId);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} sessionId
|
||||
* @returns {import('@appium/types').RouteMatcher[]}
|
||||
*/
|
||||
getProxyAvoidList(sessionId) {
|
||||
const dstSession = this.sessions[sessionId];
|
||||
return dstSession ? dstSession.getProxyAvoidList() : [];
|
||||
|
||||
@@ -576,13 +576,14 @@ class ExtensionCommand {
|
||||
// this is a helper method, 'ext' is assumed to already be installed here, and of the npm
|
||||
// install type
|
||||
const {version, pkgName} = this.config.installedExtensions[ext];
|
||||
/** @type {string?} */
|
||||
let unsafeUpdate = await npm.getLatestVersion(this.config.appiumHome, pkgName);
|
||||
let safeUpdate = await npm.getLatestSafeUpgradeVersion(
|
||||
this.config.appiumHome,
|
||||
pkgName,
|
||||
version
|
||||
);
|
||||
if (!util.compareVersions(unsafeUpdate, '>', version)) {
|
||||
if (unsafeUpdate !== null && !util.compareVersions(unsafeUpdate, '>', version)) {
|
||||
// the latest version is not greater than the current version, so there's no possible update
|
||||
unsafeUpdate = null;
|
||||
safeUpdate = null;
|
||||
|
||||
@@ -26,7 +26,7 @@ import {loadExtensions, getActivePlugins, getActiveDrivers} from './extension';
|
||||
import {DRIVER_TYPE, PLUGIN_TYPE, SERVER_SUBCOMMAND} from './constants';
|
||||
import registerNode from './grid-register';
|
||||
import {getDefaultsForSchema, validate} from './schema/schema';
|
||||
import {inspect} from './utils';
|
||||
import {inspect, adjustNodePath} from './utils';
|
||||
|
||||
const {resolveAppiumHome} = env;
|
||||
|
||||
@@ -172,6 +172,8 @@ function areServerCommandArgs(args) {
|
||||
async function init(args) {
|
||||
const appiumHome = args?.appiumHome ?? (await resolveAppiumHome());
|
||||
|
||||
adjustNodePath();
|
||||
|
||||
const {driverConfig, pluginConfig} = await loadExtensions(appiumHome);
|
||||
|
||||
const parser = getParser();
|
||||
|
||||
@@ -94,8 +94,9 @@ export const transformers = {
|
||||
json = readFileSync(jsonOrPath, 'utf8');
|
||||
loadedFromFile = true;
|
||||
} catch (err) {
|
||||
// unreadable files don't count... but other problems do.
|
||||
if (err.code !== 'ENOENT') {
|
||||
// unreadable files don't count.
|
||||
// also `ENAMETOOLONG` can happen if we try to open a file that's a huge JSON string.
|
||||
if (err.code !== 'ENOENT' && err.code !== 'ENAMETOOLONG') {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ import _ from 'lodash';
|
||||
import logger from './logger';
|
||||
import {processCapabilities, PROTOCOLS} from '@appium/base-driver';
|
||||
import {inspect as dump} from 'util';
|
||||
import {node} from '@appium/support';
|
||||
import path from 'path';
|
||||
|
||||
const W3C_APPIUM_PREFIX = 'appium';
|
||||
|
||||
@@ -209,6 +211,63 @@ function getPackageVersion(pkgName) {
|
||||
return pkgInfo.version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjusts NODE_PATH environment variable,
|
||||
* so drivers and plugins could load their peer dependencies.
|
||||
* Read https://nodejs.org/api/modules.html#loading-from-the-global-folders
|
||||
* for more details.
|
||||
* @returns {void}
|
||||
*/
|
||||
function adjustNodePath() {
|
||||
const selfRoot = node.getModuleRootSync('appium', __filename);
|
||||
if (!selfRoot || path.dirname(selfRoot).length >= selfRoot.length) {
|
||||
return;
|
||||
}
|
||||
const nodeModulesRoot = path.dirname(selfRoot);
|
||||
|
||||
const refreshRequirePaths = () => {
|
||||
try {
|
||||
// ! This hack allows us to avoid modification of import
|
||||
// ! statements in client modules. It uses a private API though,
|
||||
// ! so it could break (maybe, eventually).
|
||||
// See https://gist.github.com/branneman/8048520#7-the-hack
|
||||
// @ts-ignore
|
||||
require('module').Module._initPaths();
|
||||
return true;
|
||||
} catch (e) {
|
||||
logger.info(`Module init paths cannot be refreshed. Original error: ${e.message}`);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
if (!process.env.NODE_PATH) {
|
||||
process.env.NODE_PATH = nodeModulesRoot;
|
||||
if (refreshRequirePaths()) {
|
||||
logger.info(`Setting NODE_PATH to '${nodeModulesRoot}'`);
|
||||
process.env.APPIUM_OMIT_PEER_DEPS = '1';
|
||||
} else {
|
||||
delete process.env.NODE_PATH;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const nodePathParts = process.env.NODE_PATH.split(path.delimiter);
|
||||
if (nodePathParts.includes(nodeModulesRoot)) {
|
||||
logger.info(`NODE_PATH already includes '${nodeModulesRoot}'`);
|
||||
process.env.APPIUM_OMIT_PEER_DEPS = '1';
|
||||
return;
|
||||
}
|
||||
|
||||
nodePathParts.push(nodeModulesRoot);
|
||||
process.env.NODE_PATH = nodePathParts.join(path.delimiter);
|
||||
if (refreshRequirePaths()) {
|
||||
logger.info(`Adding '${nodeModulesRoot}' to NODE_PATH`);
|
||||
process.env.APPIUM_OMIT_PEER_DEPS = '1';
|
||||
} else {
|
||||
process.env.NODE_PATH = _.without(nodePathParts, nodeModulesRoot).join(path.delimiter);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Pulls the initial values of Appium settings from the given capabilities argument.
|
||||
* Each setting item must satisfy the following format:
|
||||
@@ -250,6 +309,7 @@ export {
|
||||
getPackageVersion,
|
||||
pullSettings,
|
||||
removeAppiumPrefixes,
|
||||
adjustNodePath,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "appium",
|
||||
"version": "2.0.0-beta.43",
|
||||
"version": "2.0.0-beta.44",
|
||||
"description": "Automation for Apps.",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -37,7 +37,6 @@
|
||||
"driver.*",
|
||||
"support.*",
|
||||
"plugin.*",
|
||||
"test.*",
|
||||
"scripts/autoinstall-extensions.js",
|
||||
"types"
|
||||
],
|
||||
@@ -61,19 +60,18 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-driver": "^8.7.0",
|
||||
"@appium/base-plugin": "^1.10.2",
|
||||
"@appium/docutils": "^0.0.10",
|
||||
"@appium/base-driver": "^8.7.1",
|
||||
"@appium/base-plugin": "^1.10.3",
|
||||
"@appium/docutils": "^0.0.11",
|
||||
"@appium/schema": "^0.0.9",
|
||||
"@appium/support": "^2.59.5",
|
||||
"@appium/test-support": "^1.5.0",
|
||||
"@appium/types": "^0.4.0",
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@appium/support": "^2.60.0",
|
||||
"@appium/types": "^0.4.1",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@sidvind/better-ajv-errors": "2.0.0",
|
||||
"@types/argparse": "2.0.10",
|
||||
"@types/bluebird": "3.5.36",
|
||||
"@types/fancy-log": "2.0.0",
|
||||
"@types/semver": "7.3.10",
|
||||
"@types/semver": "7.3.12",
|
||||
"@types/teen_process": "1.16.1",
|
||||
"@types/wrap-ansi": "3.0.0",
|
||||
"ajv": "8.11.0",
|
||||
@@ -95,7 +93,7 @@
|
||||
"semver": "7.3.7",
|
||||
"source-map-support": "0.5.21",
|
||||
"teen_process": "1.16.0",
|
||||
"type-fest": "2.18.0",
|
||||
"type-fest": "2.19.0",
|
||||
"winston": "3.8.1",
|
||||
"wrap-ansi": "7.0.0",
|
||||
"yaml": "2.1.1"
|
||||
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
export * from '@appium/test-support';
|
||||
/**
|
||||
* @typedef {import('@appium/test-support').SessionHelpers} SessionHelpers
|
||||
*/
|
||||
/**
|
||||
* @typedef {import('@appium/test-support').E2ESetupOpts} E2ESetupOpts
|
||||
*/
|
||||
@@ -1,13 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
// @ts-check
|
||||
|
||||
/**
|
||||
* This module is here to re-export `@appium/test-support` for Appium extensions.
|
||||
*
|
||||
* @see https://npm.im/@appium/test-support
|
||||
* @example
|
||||
* const { getPort } = require('appium/test');
|
||||
*/
|
||||
|
||||
module.exports = require('@appium/test-support');
|
||||
@@ -1,5 +1,7 @@
|
||||
// @ts-check
|
||||
|
||||
import getPort from 'get-port';
|
||||
import {exec} from 'teen_process';
|
||||
import {npm, env, fs, tempDir, util} from '@appium/support';
|
||||
import B from 'bluebird';
|
||||
import path from 'path';
|
||||
@@ -15,13 +17,14 @@ import {
|
||||
KNOWN_DRIVERS,
|
||||
PLUGIN_TYPE,
|
||||
} from '../../lib/constants';
|
||||
import {FAKE_DRIVER_DIR, resolveFixture} from '../helpers';
|
||||
import {FAKE_DRIVER_DIR, PACKAGE_ROOT, resolveFixture} from '../helpers';
|
||||
import {
|
||||
installLocalExtension,
|
||||
runAppiumJson,
|
||||
runAppiumRaw,
|
||||
readAppiumArgErrorFixture,
|
||||
formatAppiumArgErrorOutput,
|
||||
EXECUTABLE,
|
||||
} from './e2e-helpers';
|
||||
|
||||
const {MANIFEST_RELATIVE_PATH} = env;
|
||||
@@ -38,6 +41,22 @@ describe('CLI behavior', function () {
|
||||
resolveFixture('test-driver-invalid-peer-dep/package.json')
|
||||
);
|
||||
|
||||
describe('when appium is already installed', function () {
|
||||
before(async function () {
|
||||
appiumHome = await tempDir.openDir();
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
await fs.rimraf(appiumHome);
|
||||
});
|
||||
|
||||
it('should not duplicate it as peer dependencies for drivers', async function () {
|
||||
const run = runAppiumJson(appiumHome);
|
||||
await run([DRIVER_TYPE, INSTALL, 'appium-fake-driver', '--source', 'npm']);
|
||||
await fs.exists(path.join(appiumHome, 'node_modules', 'appium')).should.eventually.be.false;
|
||||
});
|
||||
});
|
||||
|
||||
describe('when appium is a dependency of the project in the current working directory', function () {
|
||||
/** @type {string} */
|
||||
let hashPath;
|
||||
@@ -152,7 +171,7 @@ describe('CLI behavior', function () {
|
||||
|
||||
it('should update package.json', async function () {
|
||||
const newPkg = JSON.parse(await fs.readFile(appiumHomePkgPath, 'utf8'));
|
||||
expect(newPkg).to.have.nested.property('devDependencies.test-driver');
|
||||
expect(newPkg).to.have.nested.property('devDependencies.@appium/test-driver');
|
||||
});
|
||||
|
||||
it('should update the hash', async function () {
|
||||
@@ -170,7 +189,7 @@ describe('CLI behavior', function () {
|
||||
|
||||
it('should actually install both drivers', function () {
|
||||
expect(() => resolveFrom(appiumHome, '@appium/fake-driver')).not.to.throw;
|
||||
expect(() => resolveFrom(appiumHome, 'test-driver')).not.to.throw;
|
||||
expect(() => resolveFrom(appiumHome, '@appium/test-driver')).not.to.throw;
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -267,6 +286,14 @@ describe('CLI behavior', function () {
|
||||
const {stderr} = await runAppiumRaw(appiumHome, [DRIVER_TYPE, LIST, '--updates'], {});
|
||||
stderr.should.match(new RegExp(`fake.+[${fake.updateVersion} available]`));
|
||||
});
|
||||
|
||||
describe('if a driver is not published to npm', function () {
|
||||
it('should not throw an error', async function () {
|
||||
await clear();
|
||||
await installLocalExtension(appiumHome, DRIVER_TYPE, testDriverPath);
|
||||
await expect(runList(['--updates'])).not.to.be.rejected;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe(INSTALL, function () {
|
||||
@@ -523,7 +550,41 @@ describe('CLI behavior', function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe('argument error handling', function () {
|
||||
describe('argument parsing', function () {
|
||||
describe('when the user provides a very long string for an arg accepting a blob or filename', function () {
|
||||
describe('when the very long string is a JSON blob', function () {
|
||||
it('should not throw an ENAMETOOLONG exception', async function () {
|
||||
this.timeout(10000);
|
||||
const capsArg = JSON.stringify({
|
||||
'appium:platformName': 'ANDROID',
|
||||
'appium:platformVersion': '11',
|
||||
'appium:deviceName':
|
||||
'Spicy jalapeno bacon ipsum dolor amet deserunt tempor pork belly aliqua drumstick, occaecat dolor venison et labore. Rump meatball pork chop tail. Consequat adipisicing kielbasa occaecat laborum pig. Qui pork chop chicken nostrud boudin fugiat. Proident ut culpa, chuck nulla sunt pastrami ut tri-tip. Buffalo dolore adipisicing, labore venison elit beef fatback kevin burgdoggen tail pancetta filet mignon. Dolor turducken rump, anim kevin sunt exercitation ham filet mignon beef ribs ad officia eiusmod id cillum.',
|
||||
});
|
||||
|
||||
await expect(
|
||||
exec(
|
||||
process.execPath,
|
||||
[
|
||||
EXECUTABLE,
|
||||
'-pa=/wd/hub',
|
||||
'--session-override',
|
||||
'--local-timezone',
|
||||
'--relaxed-security',
|
||||
`--default-capabilities=${capsArg}`,
|
||||
'--port',
|
||||
await getPort(),
|
||||
],
|
||||
{
|
||||
env: {APPIUM_HOME: appiumHome, PATH: process.env.PATH},
|
||||
cwd: PACKAGE_ROOT,
|
||||
timeout: 5000,
|
||||
}
|
||||
)
|
||||
).to.be.rejectedWith(Error, /timed out/);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('when the user provides an string where a number was expected', function () {
|
||||
describe('when color output is supported', function () {
|
||||
it('should output a fancy error message', async function () {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "test-driver",
|
||||
"name": "@appium/test-driver",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -4,12 +4,14 @@ import {
|
||||
pullSettings,
|
||||
removeAppiumPrefixes,
|
||||
inspect,
|
||||
adjustNodePath,
|
||||
} from '../../lib/utils';
|
||||
import {BASE_CAPS, W3C_CAPS} from '../helpers';
|
||||
import _ from 'lodash';
|
||||
import {stripColors} from '@colors/colors';
|
||||
import {createSandbox} from 'sinon';
|
||||
import logger from '../../lib/logger';
|
||||
import {fs} from '@appium/support';
|
||||
|
||||
describe('utils', function () {
|
||||
describe('parseCapsForInnerDriver()', function () {
|
||||
@@ -252,4 +254,25 @@ describe('utils', function () {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('adjustNodePath()', function () {
|
||||
const prevValue = process.env.NODE_PATH;
|
||||
|
||||
beforeEach(function () {
|
||||
if (process.env.NODE_PATH) {
|
||||
delete process.env.NODE_PATH;
|
||||
}
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
if (prevValue) {
|
||||
process.env.NODE_PATH = prevValue;
|
||||
}
|
||||
});
|
||||
|
||||
it('should adjust NODE_PATH', async function () {
|
||||
adjustNodePath();
|
||||
(await fs.exists(process.env.NODE_PATH)).should.be.true;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"@appium/base-plugin": ["../base-plugin"],
|
||||
"@appium/types": ["../types"],
|
||||
"@appium/schema": ["../schema"],
|
||||
"@appium/test-support": ["../test-support"],
|
||||
"appium": ["."]
|
||||
},
|
||||
"checkJs": true
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [8.7.1](https://github.com/appium/appium/compare/@appium/base-driver@8.7.0...@appium/base-driver@8.7.1) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-driver
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [8.7.0](https://github.com/appium/appium/compare/@appium/base-driver@8.6.1...@appium/base-driver@8.7.0) (2022-08-10)
|
||||
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ class DriverCore {
|
||||
/**
|
||||
*
|
||||
* @param {string} sessionId
|
||||
* @returns {[string, RegExp][]}
|
||||
* @returns {import('@appium/types').RouteMatcher[]}
|
||||
*/
|
||||
getProxyAvoidList(sessionId) {
|
||||
return [];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/base-driver",
|
||||
"version": "8.7.0",
|
||||
"version": "8.7.1",
|
||||
"description": "Base driver class for Appium drivers",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -45,8 +45,8 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^2.59.5",
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@appium/support": "^2.60.0",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@types/async-lock": "1.1.5",
|
||||
"@types/bluebird": "3.5.36",
|
||||
@@ -62,12 +62,12 @@
|
||||
"express": "4.18.1",
|
||||
"http-status-codes": "2.2.0",
|
||||
"lodash": "4.17.21",
|
||||
"lru-cache": "7.13.2",
|
||||
"lru-cache": "7.14.0",
|
||||
"method-override": "3.0.0",
|
||||
"morgan": "1.10.0",
|
||||
"serve-favicon": "2.5.0",
|
||||
"source-map-support": "0.5.21",
|
||||
"type-fest": "2.18.0",
|
||||
"type-fest": "2.19.0",
|
||||
"validate.js": "0.13.1"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
getTestPort,
|
||||
TEST_HOST,
|
||||
createSessionHelpers,
|
||||
} from '@appium/test-support';
|
||||
} from '@appium/driver-test-support';
|
||||
|
||||
const {expect} = chai;
|
||||
|
||||
@@ -68,5 +68,5 @@ describe('BaseDriver', function () {
|
||||
});
|
||||
|
||||
/**
|
||||
* @typedef {import('@appium/test-support').SessionHelpers} SessionHelpers
|
||||
* @typedef {import('@appium/driver-test-support').SessionHelpers} SessionHelpers
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@ import finalhandler from 'finalhandler';
|
||||
import serveStatic from 'serve-static';
|
||||
import contentDisposition from 'content-disposition';
|
||||
import B from 'bluebird';
|
||||
import {TEST_HOST, getTestPort} from '@appium/test-support';
|
||||
import {TEST_HOST, getTestPort} from '@appium/driver-test-support';
|
||||
|
||||
function getFixture(file) {
|
||||
// XXX: __dirname disallowed in native ESM
|
||||
|
||||
@@ -3,7 +3,7 @@ import {server, routeConfiguringFunction, DEFAULT_WS_PATHNAME_PREFIX} from '../.
|
||||
import {FakeDriver} from '../protocol/fake-driver';
|
||||
import WebSocket from 'ws';
|
||||
import B from 'bluebird';
|
||||
import {TEST_HOST, getTestPort} from '@appium/test-support';
|
||||
import {TEST_HOST, getTestPort} from '@appium/driver-test-support';
|
||||
|
||||
describe('Websockets (e2e)', function () {
|
||||
let baseServer;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
// transpile:mocha
|
||||
|
||||
import {server} from '../../../lib';
|
||||
import axios from 'axios';
|
||||
import {createSandbox} from 'sinon';
|
||||
import B from 'bluebird';
|
||||
import _ from 'lodash';
|
||||
import {TEST_HOST, getTestPort} from '@appium/test-support';
|
||||
import {TEST_HOST, getTestPort} from '@appium/driver-test-support';
|
||||
|
||||
describe('server', function () {
|
||||
let hwServer;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// transpile:mocha
|
||||
|
||||
import {server, routeConfiguringFunction, errors, JWProxy, BaseDriver} from '../../../lib';
|
||||
import {FakeDriver} from './fake-driver';
|
||||
import axios from 'axios';
|
||||
@@ -7,7 +5,7 @@ import {createSandbox} from 'sinon';
|
||||
import {StatusCodes as HTTPStatusCodes} from 'http-status-codes';
|
||||
import {createProxyServer} from './helpers';
|
||||
import {MJSONWP_ELEMENT_KEY, W3C_ELEMENT_KEY} from '../../../lib/constants';
|
||||
import {TEST_HOST, getTestPort} from '@appium/test-support';
|
||||
import {TEST_HOST, getTestPort} from '@appium/driver-test-support';
|
||||
|
||||
let port;
|
||||
let baseUrl;
|
||||
|
||||
@@ -22,6 +22,14 @@ describe('DeviceSettings', function () {
|
||||
expect(() => new DeviceSettings()).not.to.throw();
|
||||
});
|
||||
});
|
||||
|
||||
it('should not hold on to reference of defaults in constructor', function () {
|
||||
let obj = {foo: 'bar'};
|
||||
let d1 = new DeviceSettings(obj);
|
||||
let d2 = new DeviceSettings(obj);
|
||||
d1.getSettings().foo = 'baz';
|
||||
expect(d1.getSettings()).to.not.eql(d2.getSettings());
|
||||
});
|
||||
});
|
||||
|
||||
describe('instance method', function () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import BaseDriver from '../../../lib';
|
||||
import {driverUnitTestSuite} from '@appium/test-support';
|
||||
import {driverUnitTestSuite} from '@appium/driver-test-support';
|
||||
|
||||
driverUnitTestSuite(BaseDriver, {
|
||||
platformName: 'iOS',
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import {server, routeConfiguringFunction} from '../../../lib';
|
||||
import {configureServer, normalizeBasePath} from '../../../lib/express/server';
|
||||
import {createSandbox} from 'sinon';
|
||||
import {getTestPort} from '@appium/test-support';
|
||||
import {getTestPort} from '@appium/driver-test-support';
|
||||
|
||||
const newMethodMap = {
|
||||
'/session/:sessionId/fake': {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
// transpile:mocha
|
||||
|
||||
import {JWProxy} from '../../../lib';
|
||||
import request from './mock-request';
|
||||
import {isErrorType, errors} from '../../../lib/protocol/errors';
|
||||
import {getTestPort, TEST_HOST} from '@appium/test-support';
|
||||
import {getTestPort, TEST_HOST} from '@appium/driver-test-support';
|
||||
|
||||
function buildReqRes(url, method, body) {
|
||||
let req = {originalUrl: url, method, body};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {JWProxy} from '../../../lib';
|
||||
import {getTestPort, TEST_HOST, createAppiumURL} from '@appium/test-support';
|
||||
import {getTestPort, TEST_HOST, createAppiumURL} from '@appium/driver-test-support';
|
||||
import _ from 'lodash';
|
||||
|
||||
describe('JWProxy', function () {
|
||||
|
||||
@@ -5,10 +5,14 @@
|
||||
"paths": {
|
||||
"@appium/base-driver": ["."],
|
||||
"@appium/support": ["../support"],
|
||||
"@appium/types": ["../types"]
|
||||
"@appium/types": ["../types"],
|
||||
"@appium/driver-test-support": ["../driver-test-support"]
|
||||
},
|
||||
"checkJs": true
|
||||
},
|
||||
"include": ["lib"],
|
||||
"references": [{"path": "../support"}, {"path": "../types"}]
|
||||
"references": [
|
||||
{"path": "../support"},
|
||||
{"path": "../types"}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.10.3](https://github.com/appium/appium/compare/@appium/base-plugin@1.10.2...@appium/base-plugin@1.10.3) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.10.2](https://github.com/appium/appium/compare/@appium/base-plugin@1.10.1...@appium/base-plugin@1.10.2) (2022-08-10)
|
||||
|
||||
**Note:** Version bump only for package @appium/base-plugin
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/base-plugin",
|
||||
"version": "1.10.2",
|
||||
"version": "1.10.3",
|
||||
"description": "The base plugin used to create Appium 2.0 plugins",
|
||||
"bugs": {
|
||||
"url": "https://github.com/appium/appium/issues"
|
||||
@@ -31,7 +31,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^2.59.5"
|
||||
"@appium/support": "^2.60.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
@@ -42,5 +42,15 @@
|
||||
"tags": [
|
||||
"appium"
|
||||
],
|
||||
"homepage": "https://appium.io"
|
||||
"homepage": "https://appium.io",
|
||||
"keywords": [
|
||||
"automation",
|
||||
"javascript",
|
||||
"selenium",
|
||||
"webdriver",
|
||||
"ios",
|
||||
"android",
|
||||
"firefoxos",
|
||||
"testing"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.16.26](https://github.com/appium/appium/compare/@appium/doctor@1.16.25...@appium/doctor@1.16.26) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @appium/doctor
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.16.25](https://github.com/appium/appium/compare/@appium/doctor@1.16.24...@appium/doctor@1.16.25) (2022-08-10)
|
||||
|
||||
**Note:** Version bump only for package @appium/doctor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/doctor",
|
||||
"version": "1.16.25",
|
||||
"version": "1.16.26",
|
||||
"description": "Test environment for fitness to run Appium",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -49,12 +49,12 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^2.59.5",
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@appium/support": "^2.60.0",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@types/bluebird": "3.5.36",
|
||||
"@types/teen_process": "1.16.1",
|
||||
"appium-adb": "9.10.2",
|
||||
"appium-adb": "9.10.9",
|
||||
"bluebird": "3.7.2",
|
||||
"inquirer": "8.2.4",
|
||||
"lodash": "4.17.21",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.0.11](https://github.com/appium/appium/compare/@appium/docutils@0.0.10...@appium/docutils@0.0.11) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @appium/docutils
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.0.10](https://github.com/appium/appium/compare/@appium/docutils@0.0.9...@appium/docutils@0.0.10) (2022-08-10)
|
||||
|
||||
**Note:** Version bump only for package @appium/docutils
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
{
|
||||
"name": "@appium/docutils",
|
||||
"version": "0.0.10",
|
||||
"version": "0.0.11",
|
||||
"description": "Documentation generation utilities for Appium and related projects",
|
||||
"keywords": [
|
||||
"appium",
|
||||
"docs"
|
||||
"automation",
|
||||
"javascript",
|
||||
"selenium",
|
||||
"webdriver",
|
||||
"ios",
|
||||
"android",
|
||||
"firefoxos",
|
||||
"testing"
|
||||
],
|
||||
"homepage": "https://appium.io",
|
||||
"bugs": {
|
||||
@@ -41,8 +47,8 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/support": "^2.59.5",
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@appium/support": "^2.60.0",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"docdash": "1.2.0",
|
||||
"jsdoc": "3.6.11",
|
||||
"jsdoc-plugin-typescript": "2.1.1",
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# 0.2.0 (2022-09-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **driver-test-support:** create package ([4128972](https://github.com/appium/appium/commit/41289724dc860e28dbe9a34710fa2d07d4a46e61))
|
||||
@@ -0,0 +1,112 @@
|
||||
# @appium/driver-test-support
|
||||
|
||||
> Testing utilities for [Appium](https://appium.io) drivers
|
||||
|
||||
This package is for driver authors to help test their drivers.
|
||||
|
||||
[Mocha](https://mochajs.org) is the supported test framework.
|
||||
|
||||
## Usage
|
||||
|
||||
### For E2E Tests
|
||||
|
||||
The `driverE2ETestSuite` method creates a Mocha test suite which makes HTTP requests to an in-memory server leveraging your driver.
|
||||
|
||||
Note that this method must be run within a _suite callback_—not a _test callback_.
|
||||
|
||||
```js
|
||||
import {driverE2ETestSuite} from '@appium/driver-test-support';
|
||||
|
||||
const defaultW3CCapabilities = {
|
||||
// some capabilities
|
||||
};
|
||||
|
||||
describe('MyDriverClass', function() {
|
||||
driverE2ETestSuite(MyDriverClass, defaultW3CCapabilities);
|
||||
|
||||
describe('more tests', function() {
|
||||
// ...
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
### For Unit Tests
|
||||
|
||||
The `driverUnitTestSuite` method creates a Mocha test suite which performs assertions on an isolated instance of your driver.
|
||||
|
||||
Note that this method must be run within a _suite callback_—not a _test callback_.
|
||||
|
||||
```js
|
||||
import {driverUnitTestSuite} from '@appium/driver-test-support';
|
||||
|
||||
const defaultW3CCapabilities = {
|
||||
// some capabilities
|
||||
};
|
||||
|
||||
describe('MyDriverClass', function() {
|
||||
driverUnitTestSuite(MyDriverClass, defaultW3CCapabilities);
|
||||
|
||||
describe('more tests', function() {
|
||||
// ...
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
### Helpers
|
||||
|
||||
These are just some helpers (mainly for E2E tests):
|
||||
|
||||
```js
|
||||
import {TEST_HOST, getTestPort, createAppiumURL} from '@appium/driver-test-support';
|
||||
import assert from 'node:assert';
|
||||
import _ from 'lodash';
|
||||
|
||||
describe('TEST_HOST', function() {
|
||||
it('should be localhost', function() {
|
||||
assert.strictEqual(TEST_HOST, '127.0.0.1');
|
||||
});
|
||||
});
|
||||
|
||||
describe('getTestPort()', function() {
|
||||
it('should get a free test port', async function() {
|
||||
const port = await getTestPort();
|
||||
assert.ok(port > 0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('createAppiumURL()', function() {
|
||||
it('should create a "new session" URL', function() {
|
||||
const actual = createAppiumURL(TEST_HOST, 31337, '', 'session');
|
||||
const expected = `http://${TEST_HOST}:31337/session`;
|
||||
assert.strictEqual(actual, expected);
|
||||
});
|
||||
|
||||
it('should create a URL to get an existing session', function() {
|
||||
const sessionId = '12345';
|
||||
const createGetSessionURL = createAppiumURL(TEST_HOST, 31337, _, 'session');
|
||||
const actual = createGetSessionURL(sessionId);
|
||||
const expected = `http://${TEST_HOST}:31337/session/${sessionId}/session`;
|
||||
assert.strictEqual(actual, expected);
|
||||
});
|
||||
|
||||
it('should create a URL for a command using an existing session', function() {
|
||||
const sessionId = '12345';
|
||||
const createURLWithPath = createAppiumURL('127.0.0.1', 31337, sessionId);
|
||||
const actual = createURLWithPath('moocow');
|
||||
const expected = `http://${TEST_HOST}:31337/session/${sessionId}/moocow`;
|
||||
assert.strictEqual(actual, expected);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
`appium` and `mocha` are peer dependencies.
|
||||
|
||||
```bash
|
||||
npm install appium mocha @appium/driver-test-support --save-dev
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = require('./build/lib');
|
||||
@@ -0,0 +1,9 @@
|
||||
export * from './e2e-suite';
|
||||
export * from './unit-suite';
|
||||
export * from './helpers';
|
||||
|
||||
/**
|
||||
* @typedef {import('@appium/types').DriverClass} DriverClass
|
||||
* @typedef {import('@appium/types').W3CCapabilities} W3CCapabilities
|
||||
* @typedef {import('@appium/types').AppiumW3CCapabilities} AppiumW3CCapabilities
|
||||
*/
|
||||
+1
-11
@@ -1,6 +1,5 @@
|
||||
import _ from 'lodash';
|
||||
import B from 'bluebird';
|
||||
import {DeviceSettings} from '@appium/base-driver';
|
||||
import {createSandbox} from 'sinon';
|
||||
|
||||
import chai from 'chai';
|
||||
@@ -448,6 +447,7 @@ export function driverUnitTestSuite(DriverClass, defaultCaps = {}) {
|
||||
const avoidStub = sandbox.stub(d, 'getProxyAvoidList');
|
||||
avoidStub.returns([
|
||||
['POST', /^foo/],
|
||||
// @ts-expect-error
|
||||
['BAZETE', /^bar/],
|
||||
]);
|
||||
(() => {
|
||||
@@ -581,16 +581,6 @@ export function driverUnitTestSuite(DriverClass, defaultCaps = {}) {
|
||||
});
|
||||
});
|
||||
|
||||
describe('DeviceSettings', function () {
|
||||
it('should not hold on to reference of defaults in constructor', function () {
|
||||
let obj = {foo: 'bar'};
|
||||
let d1 = new DeviceSettings(obj);
|
||||
let d2 = new DeviceSettings(obj);
|
||||
d1.getSettings().foo = 'baz';
|
||||
d1.getSettings().should.not.eql(d2.getSettings());
|
||||
});
|
||||
});
|
||||
|
||||
describe('.isFeatureEnabled', function () {
|
||||
let d;
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"name": "@appium/driver-test-support",
|
||||
"version": "0.2.0",
|
||||
"description": "Test utilities for Appium drivers",
|
||||
"keywords": [
|
||||
"automation",
|
||||
"javascript",
|
||||
"selenium",
|
||||
"webdriver",
|
||||
"ios",
|
||||
"android",
|
||||
"firefoxos",
|
||||
"testing"
|
||||
],
|
||||
"homepage": "https://appium.io",
|
||||
"bugs": {
|
||||
"url": "https://github.com/appium/appium/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appium/appium.git",
|
||||
"directory": "packages/driver-test-support"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"author": "https://github.com/appium",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"lib": "lib"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"lib",
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:smoke": "node ./index.js",
|
||||
"test:unit": "mocha \"test/unit/**/*.spec.js\""
|
||||
},
|
||||
"types": "./build/lib/index.d.ts",
|
||||
"dependencies": {
|
||||
"@appium/types": "^0.4.1",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@types/lodash": "4.14.184",
|
||||
"axios": "0.27.2",
|
||||
"bluebird": "3.7.2",
|
||||
"chai": "4.3.6",
|
||||
"get-port": "5.1.1",
|
||||
"lodash": "4.17.21",
|
||||
"sinon": "14.0.0",
|
||||
"source-map-support": "0.5.21"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"appium": "^2.0.0-beta.43",
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
"npm": ">=8"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import {TEST_HOST, getTestPort, createAppiumURL} from '../../lib';
|
||||
import _ from 'lodash';
|
||||
|
||||
const {expect} = chai;
|
||||
|
||||
describe('TEST_HOST', function () {
|
||||
it('should be localhost', function () {
|
||||
expect(TEST_HOST).to.equal('127.0.0.1');
|
||||
});
|
||||
});
|
||||
|
||||
describe('getTestPort()', function () {
|
||||
it('should get a free test port', async function () {
|
||||
const port = await getTestPort();
|
||||
expect(port).to.be.a('number');
|
||||
});
|
||||
});
|
||||
|
||||
describe('createAppiumURL()', function () {
|
||||
it('should create a "new session" URL', function () {
|
||||
const actual = createAppiumURL(TEST_HOST, 31337, '', 'session');
|
||||
const expected = `http://${TEST_HOST}:31337/session`;
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
|
||||
it('should create a URL to get an existing session', function () {
|
||||
const sessionId = '12345';
|
||||
const createGetSessionURL = createAppiumURL(TEST_HOST, 31337, _, 'session');
|
||||
const actual = createGetSessionURL(sessionId);
|
||||
const expected = `http://${TEST_HOST}:31337/session/${sessionId}/session`;
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
|
||||
it('should create a URL for a command using an existing session', function () {
|
||||
const sessionId = '12345';
|
||||
const createURLWithPath = createAppiumURL('127.0.0.1', 31337, sessionId);
|
||||
const actual = createURLWithPath('moocow');
|
||||
const expected = `http://${TEST_HOST}:31337/session/${sessionId}/moocow`;
|
||||
expect(actual).to.equal(expected);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"extends": "../../config/tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": ".",
|
||||
"outDir": "build",
|
||||
"checkJs": true,
|
||||
"paths": {
|
||||
"@appium/types": ["../types"],
|
||||
"appium/driver": ["../base-driver"],
|
||||
},
|
||||
"types": [
|
||||
"mocha", "chai", "chai-as-promised"
|
||||
]
|
||||
},
|
||||
"include": ["./lib"],
|
||||
"references": [
|
||||
{"path": "../types"},
|
||||
{"path": "../base-driver"}
|
||||
]
|
||||
}
|
||||
@@ -3,6 +3,30 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [7.0.0](https://github.com/appium/appium/compare/@appium/eslint-config-appium@6.0.4...@appium/eslint-config-appium@7.0.0) (2022-09-07)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* **eslint-config-appium:** upgrade to ESLint v8 ([887cb44](https://github.com/appium/appium/commit/887cb449e61be585c084af2f6422d2e02be5028b))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **eslint-config-appium:** This change upgrades to ESLint v8 and removes `@babel/eslint-parser`, which is only necessary if we're using mid-stage TC39 proposals (which we aren't). I think `@babel/core` was a peer dep of `@babel/eslint-parser`, so I removed that too. And removed cruft from the main configuration.
|
||||
|
||||
ESLint rules _very likely_ had breaking changes, but I didn't experience any on our codebase. However, this version of ESLint seems to be incompatible with `gulp-eslint`, so `@appium/gulp-plugins` should be held back from upgrading.
|
||||
|
||||
In addition:
|
||||
|
||||
- Updated `README.md`
|
||||
- Updated some fields in `package.json`
|
||||
- Loosened `peerDependencies`, as they're supposed to be loose.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [6.0.4](https://github.com/appium/appium/compare/@appium/eslint-config-appium@6.0.3...@appium/eslint-config-appium@6.0.4) (2022-08-03)
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
## Appium ESLint Shared Configuation
|
||||
# @appium/eslint-config-appium
|
||||
|
||||
This package works to provide [eslint](http://eslint.org/) [shared configuration](http://eslint.org/docs/developer-guide/shareable-configs) to replace the need for a local `.eslintrc` file.
|
||||
> Provides a reusable [ESLint](http://eslint.org/) [shared configuration](http://eslint.org/docs/developer-guide/shareable-configs) for [Appium](https://github.com/appium/appium) and Appium-adjacent projects.
|
||||
|
||||
It uses [babel-eslint](https://github.com/babel/babel-eslint) as a parser.
|
||||
## Usage
|
||||
|
||||
### Usage
|
||||
|
||||
Install the package
|
||||
Install the package with **`npm` v7 or newer** (for automatic installation of peer dependencies):
|
||||
|
||||
```bash
|
||||
npm install @appium/eslint-config-appium eslint-plugin-import eslint-plugin-mocha eslint-plugin-promise -D
|
||||
npm install @appium/eslint-config-appium --save-dev
|
||||
```
|
||||
|
||||
And then, in your `.eslintrc` file extend the configuration
|
||||
And then, in your `.eslintrc` file, extend the configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -20,18 +18,21 @@ And then, in your `.eslintrc` file extend the configuration
|
||||
}
|
||||
```
|
||||
|
||||
If you are using [@appium/gulp-plugins](https://www.npmjs.com/package/@appium/gulp-plugins) you can then run
|
||||
## Peer Dependencies
|
||||
|
||||
```bash
|
||||
gulp eslint
|
||||
```
|
||||
This config requires the following packages be installed (as dev dependencies) in your project. See the `package.json` for the required versions.
|
||||
|
||||
### Peer Dependencies
|
||||
- [eslint](https://www.npmjs.com/package/eslint)
|
||||
- [eslint-config-prettier](https://www.npmjs.com/package/eslint-config-prettier)
|
||||
- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)
|
||||
- [eslint-plugin-mocha](https://www.npmjs.com/package/eslint-plugin-mocha)
|
||||
- [eslint-plugin-promise](https://www.npmjs.com/package/eslint-plugin-promise)
|
||||
|
||||
This config requires the following packages be installed (as dev dependencies) in your project:
|
||||
## Notes
|
||||
|
||||
* [babel-eslint](https://www.npmjs.com/package/babel-eslint)
|
||||
* [eslint](https://www.npmjs.com/package/eslint)
|
||||
* [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import)
|
||||
* [eslint-plugin-mocha](https://www.npmjs.com/package/eslint-plugin-mocha)
|
||||
* [eslint-plugin-promise](https://www.npmjs.com/package/eslint-plugin-promise)
|
||||
- This configuration is intended to be used alongside [Prettier](https://www.npmjs.com/package/prettier).
|
||||
- This package was previously published as `eslint-config-appium`.
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2016 OpenJS Foundation. Licensed Apache-2.0
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
module.exports = {
|
||||
parser: '@babel/eslint-parser',
|
||||
parserOptions: {
|
||||
requireConfigFile: false,
|
||||
ecmaVersion: 12,
|
||||
sourceType: 'module',
|
||||
ecmaFeatures: {
|
||||
impliedStrict: true,
|
||||
experimentalObjectRestSpread: true,
|
||||
},
|
||||
},
|
||||
env: {
|
||||
node: true,
|
||||
mocha: true,
|
||||
es6: true,
|
||||
es2022: true,
|
||||
},
|
||||
plugins: ['import', 'mocha', 'promise'],
|
||||
globals: {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{
|
||||
"name": "@appium/eslint-config-appium",
|
||||
"version": "6.0.4",
|
||||
"description": "Shared config for Appium's eslint style",
|
||||
"version": "7.0.0",
|
||||
"description": "Shared ESLint config for Appium projects",
|
||||
"keywords": [
|
||||
"eslint",
|
||||
"eslintconfig",
|
||||
"appium",
|
||||
"es2015"
|
||||
"appium"
|
||||
],
|
||||
"homepage": "https://appium.io",
|
||||
"bugs": {
|
||||
@@ -32,13 +31,11 @@
|
||||
"test:smoke": "node ./index.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "7.18.10",
|
||||
"@babel/eslint-parser": "7.18.9",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-mocha": "9.0.0",
|
||||
"eslint-plugin-promise": "6.0.0"
|
||||
"eslint": "^8.21.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-mocha": "^10.1.0",
|
||||
"eslint-plugin-promise": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.0.5](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@2.0.4...@appium/execute-driver-plugin@2.0.5) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @appium/execute-driver-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.0.4](https://github.com/appium/appium/compare/@appium/execute-driver-plugin@2.0.3...@appium/execute-driver-plugin@2.0.4) (2022-08-03)
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
{
|
||||
"name": "@appium/execute-driver-plugin",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.5",
|
||||
"description": "Plugin for batching and executing driver commands with Appiums",
|
||||
"keywords": [
|
||||
"appium",
|
||||
"automation",
|
||||
"webdriver"
|
||||
"javascript",
|
||||
"selenium",
|
||||
"webdriver",
|
||||
"ios",
|
||||
"android",
|
||||
"firefoxos",
|
||||
"testing"
|
||||
],
|
||||
"homepage": "https://appium.io",
|
||||
"bugs": {
|
||||
@@ -35,13 +40,13 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@types/bluebird": "3.5.36",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
"source-map-support": "0.5.21",
|
||||
"vm2": "3.9.10",
|
||||
"webdriverio": "7.20.9"
|
||||
"vm2": "3.9.11",
|
||||
"webdriverio": "7.24.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"appium": "^2.0.0-beta.35"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import path from 'path';
|
||||
|
||||
import {pluginE2EHarness} from 'appium/test';
|
||||
import {pluginE2EHarness} from '@appium/plugin-test-support';
|
||||
import {remote as wdio} from 'webdriverio';
|
||||
import {W3C_ELEMENT_KEY, MJSONWP_ELEMENT_KEY} from '../../lib/execute-child';
|
||||
import {fs} from 'appium/support';
|
||||
@@ -39,7 +39,7 @@ describe('ExecuteDriverPlugin', function () {
|
||||
|
||||
const basicScript = `return 'foo'`;
|
||||
/**
|
||||
* @type {import('appium/test').E2ESetupOpts}
|
||||
* @type {import('@appium/plugin-test-support').E2ESetupOpts}
|
||||
*/
|
||||
const e2eSetupOpts = {
|
||||
before,
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [4.2.1](https://github.com/appium/appium/compare/@appium/fake-driver@4.2.0...@appium/fake-driver@4.2.1) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @appium/fake-driver
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [4.2.0](https://github.com/appium/appium/compare/@appium/fake-driver@4.1.0...@appium/fake-driver@4.2.0) (2022-08-10)
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// transpile:main
|
||||
|
||||
import * as driver from './driver';
|
||||
import * as server from './server';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/fake-driver",
|
||||
"version": "4.2.0",
|
||||
"version": "4.2.1",
|
||||
"description": "Mock driver used internally by Appium for testing. Ignore",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -47,7 +47,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@types/bluebird": "3.5.36",
|
||||
"@xmldom/xmldom": "0.8.2",
|
||||
"asyncbox": "2.9.2",
|
||||
@@ -80,5 +80,6 @@
|
||||
"fake-success": "./build/lib/scripts/fake-success.js"
|
||||
}
|
||||
},
|
||||
"types": "./build/lib/index.d.ts",
|
||||
"gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import {driverE2ETestSuite} from 'appium/test';
|
||||
import {driverE2ETestSuite} from '@appium/driver-test-support';
|
||||
import {FakeDriver, startServer} from '../../lib/index.js';
|
||||
import {
|
||||
BASE_CAPS,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ from 'lodash';
|
||||
import {FakeDriver} from '../../lib';
|
||||
import {W3C_CAPS, W3C_PREFIXED_CAPS} from '../helpers';
|
||||
import {driverUnitTestSuite} from 'appium/test';
|
||||
import {driverUnitTestSuite} from '@appium/driver-test-support';
|
||||
|
||||
// test the same things as for base driver
|
||||
driverUnitTestSuite(FakeDriver, _.cloneDeep(W3C_PREFIXED_CAPS));
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": "../../config/tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "build",
|
||||
"paths": {
|
||||
"@appium/types": ["../types"],
|
||||
"appium/support": ["../appium/support"],
|
||||
"appium/driver": ["../appium/driver"],
|
||||
"@appium/driver-test-support": ["../driver-test-support"]
|
||||
}
|
||||
},
|
||||
"include": ["./lib"],
|
||||
"references": [
|
||||
{"path": "../types"},
|
||||
{"path": "../support"},
|
||||
{"path": "../driver-test-support"}
|
||||
]
|
||||
}
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.1.1](https://github.com/appium/appium/compare/@appium/fake-plugin@2.1.0...@appium/fake-plugin@2.1.1) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @appium/fake-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.1.0](https://github.com/appium/appium/compare/@appium/fake-plugin@2.0.5...@appium/fake-plugin@2.1.0) (2022-08-10)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/fake-plugin",
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.1",
|
||||
"description": "A fake Appium 2.0 plugin",
|
||||
"homepage": "https://appium.io",
|
||||
"bugs": {
|
||||
@@ -33,9 +33,9 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/base-plugin": "^1.10.2",
|
||||
"@appium/support": "^2.59.5",
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@appium/base-plugin": "^1.10.3",
|
||||
"@appium/support": "^2.60.0",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@types/bluebird": "3.5.36",
|
||||
"bluebird": "3.7.2",
|
||||
"lodash": "4.17.21",
|
||||
@@ -59,5 +59,15 @@
|
||||
"gitHead": "5c7af8ee73078018e4ec52fccf19fe3f77249d72",
|
||||
"tags": [
|
||||
"appium"
|
||||
],
|
||||
"keywords": [
|
||||
"automation",
|
||||
"javascript",
|
||||
"selenium",
|
||||
"webdriver",
|
||||
"ios",
|
||||
"android",
|
||||
"firefoxos",
|
||||
"testing"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [7.0.6](https://github.com/appium/appium/compare/@appium/gulp-plugins@7.0.5...@appium/gulp-plugins@7.0.6) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @appium/gulp-plugins
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [7.0.5](https://github.com/appium/appium/compare/@appium/gulp-plugins@7.0.4...@appium/gulp-plugins@7.0.5) (2022-08-10)
|
||||
|
||||
**Note:** Version bump only for package @appium/gulp-plugins
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/gulp-plugins",
|
||||
"version": "7.0.5",
|
||||
"version": "7.0.6",
|
||||
"description": "Custom gulp plugins to be used across all appium modules",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -43,16 +43,16 @@
|
||||
"test:smoke": "node ./index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/eslint-config-appium": "^6.0.4",
|
||||
"@babel/core": "7.18.10",
|
||||
"@appium/eslint-config-appium": "^7.0.0",
|
||||
"@babel/core": "7.19.0",
|
||||
"@babel/eslint-parser": "7.18.9",
|
||||
"@babel/plugin-transform-runtime": "7.18.10",
|
||||
"@babel/preset-env": "7.18.10",
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@babel/preset-env": "7.19.0",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@octokit/rest": "18.12.0",
|
||||
"@types/fancy-log": "2.0.0",
|
||||
"@types/gulp": "4.0.9",
|
||||
"@types/semver": "7.3.10",
|
||||
"@types/semver": "7.3.12",
|
||||
"@types/through2": "2.0.36",
|
||||
"ansi-red": "0.1.1",
|
||||
"axios": "0.27.2",
|
||||
@@ -60,11 +60,11 @@
|
||||
"babel-plugin-source-map-support": "2.2.0",
|
||||
"bluebird": "3.7.2",
|
||||
"del": "6.1.1",
|
||||
"eslint": "7.32.0",
|
||||
"eslint": "8.23.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-mocha": "9.0.0",
|
||||
"eslint-plugin-promise": "6.0.0",
|
||||
"eslint-plugin-mocha": "10.1.0",
|
||||
"eslint-plugin-promise": "6.0.1",
|
||||
"fancy-log": "2.0.0",
|
||||
"form-data": "4.0.0",
|
||||
"glob": "8.0.3",
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.3.6](https://github.com/appium/appium/compare/@appium/images-plugin@1.3.5...@appium/images-plugin@1.3.6) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @appium/images-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.3.5](https://github.com/appium/appium/compare/@appium/images-plugin@1.3.4...@appium/images-plugin@1.3.5) (2022-08-10)
|
||||
|
||||
**Note:** Version bump only for package @appium/images-plugin
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
{
|
||||
"name": "@appium/images-plugin",
|
||||
"version": "1.3.5",
|
||||
"version": "1.3.6",
|
||||
"description": "Plugin for working with images and image elements in Appium",
|
||||
"keywords": [
|
||||
"appium",
|
||||
"opencv",
|
||||
"automation",
|
||||
"image",
|
||||
"webdriver"
|
||||
"javascript",
|
||||
"selenium",
|
||||
"webdriver",
|
||||
"ios",
|
||||
"android",
|
||||
"firefoxos",
|
||||
"testing"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/appium/appium/issues"
|
||||
@@ -37,9 +40,9 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/opencv": "^1.0.11",
|
||||
"@babel/runtime": "7.18.9",
|
||||
"lru-cache": "7.13.2",
|
||||
"@appium/opencv": "^1.0.12",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"lru-cache": "7.14.0",
|
||||
"source-map-support": "0.5.21"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -2,7 +2,7 @@ import path from 'path';
|
||||
import {remote as wdio} from 'webdriverio';
|
||||
import {MATCH_FEATURES_MODE, GET_SIMILARITY_MODE} from '../../lib/compare';
|
||||
import {TEST_IMG_1_B64, TEST_IMG_2_B64, APPSTORE_IMG_PATH} from '../fixtures';
|
||||
import {pluginE2EHarness} from 'appium/test';
|
||||
import {pluginE2EHarness} from '@appium/plugin-test-support';
|
||||
|
||||
const THIS_PLUGIN_DIR = path.join(__dirname, '..', '..');
|
||||
const APPIUM_HOME = path.join(THIS_PLUGIN_DIR, 'local_appium_home');
|
||||
|
||||
@@ -2,18 +2,14 @@
|
||||
"compilerOptions": {
|
||||
"outDir": "build",
|
||||
"paths": {
|
||||
"@appium/opencv": ["../opencv"],
|
||||
"appium": ["../appium"]
|
||||
"@appium/opencv": ["../opencv"]
|
||||
}
|
||||
},
|
||||
"extends": "../../config/tsconfig.base.json",
|
||||
"extends": "../../config/tsconfig.plugin.json",
|
||||
"include": ["lib"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../opencv"
|
||||
},
|
||||
{
|
||||
"path": "../appium"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.0.12](https://github.com/appium/appium/compare/@appium/opencv@1.0.11...@appium/opencv@1.0.12) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @appium/opencv
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.0.11](https://github.com/appium/appium/compare/@appium/opencv@1.0.10...@appium/opencv@1.0.11) (2022-08-03)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/opencv",
|
||||
"version": "1.0.11",
|
||||
"version": "1.0.12",
|
||||
"description": "OpenCV-related helper library",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -44,7 +44,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@types/bluebird": "3.5.36",
|
||||
"bluebird": "3.7.2",
|
||||
"jimp": "0.16.1",
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# 0.2.0 (2022-09-07)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **plugin-test-support:** create @appium/plugin-test-support ([108b8c0](https://github.com/appium/appium/commit/108b8c0209dc3f5755de82f1b6e622c76ece5ac3))
|
||||
@@ -0,0 +1,49 @@
|
||||
# @appium/plugin-test-support
|
||||
|
||||
> Testing utilities for [Appium](https://appium.io) plugins
|
||||
|
||||
This package is for plugin authors to help test their plugins.
|
||||
|
||||
[Mocha](https://mochajs.org) is the supported test framework (but can theoretically be used with others).
|
||||
|
||||
## Usage
|
||||
|
||||
### For E2E Tests
|
||||
|
||||
The `pluginE2EHarness` method configures a server and driver for testing via "before all" and "after all"-style hooks.
|
||||
|
||||
This example uses [WebdriverIO](https://webdriver.io) to communicate with a test Appium server.
|
||||
|
||||
```js
|
||||
import {pluginE2EHarness} from '@appium/plugin-test-support';
|
||||
import {remote} from 'webdriverio';
|
||||
|
||||
describe('MyPlugin', function() {
|
||||
pluginE2EHarness({
|
||||
before: global.before, // from mocha
|
||||
after: global.after, // from mocha
|
||||
serverArgs: SOME_EXTRA_SERVER_ARGS,
|
||||
port: 31337,
|
||||
host: '127.0.0.1',
|
||||
appiumHome: process.env.APPIUM_HOME, // best practice: use a temp dir instead
|
||||
driverName: 'fake', // driver to test with
|
||||
driverSource: 'local', // use "local" unless you want appium to install from npm every time
|
||||
driverSpec: FAKE_DRIVER_DIR, // path to local driver working copy or installation
|
||||
pluginName: 'MyPlugin', // your plugin
|
||||
pluginSource: 'local', // use "local" for this
|
||||
pluginSpec: THIS_PLUGIN_DIR, // dir of this plugin's `package.json`
|
||||
});
|
||||
|
||||
it('should use my plugin', async function() {
|
||||
// at this point, the Appium server will be running with the plugin/driver combination of your
|
||||
// choosing
|
||||
|
||||
// port/host should match what you provided to `pluginE2EHarness`
|
||||
const browser = await remote({port: 31337, hostname: '127.0.0.1'});
|
||||
})
|
||||
});
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = require('./build/lib/harness');
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "@appium/plugin-test-support",
|
||||
"version": "0.2.0",
|
||||
"description": "Testing utilities for Appium plugins",
|
||||
"keywords": [
|
||||
"automation",
|
||||
"javascript",
|
||||
"selenium",
|
||||
"webdriver",
|
||||
"ios",
|
||||
"android",
|
||||
"firefoxos",
|
||||
"testing"
|
||||
],
|
||||
"homepage": "https://appium.io",
|
||||
"bugs": {
|
||||
"url": "https://github.com/appium/appium/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appium/appium.git",
|
||||
"directory": "packages/plugin-test-support"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"author": "https://github.com/appium",
|
||||
"main": "index.js",
|
||||
"types": "build/lib/harness.d.ts",
|
||||
"directories": {
|
||||
"lib": "lib"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
"index.js",
|
||||
"build"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "babel lib --root-mode=upward --out-dir=build/lib",
|
||||
"dev": "npm run build -- --watch",
|
||||
"fix": "npm run lint -- --fix",
|
||||
"lint": "eslint -c ../../.eslintrc --ignore-path ../../.eslintignore .",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run test:unit",
|
||||
"test:smoke": "node ./index.js",
|
||||
"test:unit": "exit 0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/types": "^0.4.1",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"get-port": "5.1.1",
|
||||
"log-symbols": "4.1.0",
|
||||
"source-map-support": "0.5.21",
|
||||
"teen_process": "1.16.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"appium": "^2.0.0-beta.43",
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
"npm": ">=8"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"extends": "../../config/tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": ".",
|
||||
"outDir": "build",
|
||||
"checkJs": true,
|
||||
"paths": {
|
||||
"@appium/types": ["../types"],
|
||||
"appium/support": ["../appium/support"]
|
||||
},
|
||||
"types": [
|
||||
"mocha", "chai", "sinon", "sinon-chai", "chai-as-promised"
|
||||
]
|
||||
},
|
||||
"include": ["./lib"],
|
||||
"references": [
|
||||
{"path": "../types"},
|
||||
{"path": "../support"}
|
||||
]
|
||||
}
|
||||
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [1.0.0-beta.12](https://github.com/appium/appium/compare/@appium/relaxed-caps-plugin@1.0.0-beta.11...@appium/relaxed-caps-plugin@1.0.0-beta.12) (2022-09-07)
|
||||
|
||||
**Note:** Version bump only for package @appium/relaxed-caps-plugin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [1.0.0-beta.11](https://github.com/appium/appium/compare/@appium/relaxed-caps-plugin@1.0.0-beta.10...@appium/relaxed-caps-plugin@1.0.0-beta.11) (2022-08-03)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/relaxed-caps-plugin",
|
||||
"version": "1.0.0-beta.11",
|
||||
"version": "1.0.0-beta.12",
|
||||
"description": "An Appium 2.0 plugin that loosens requirements for vendor prefixes on caps",
|
||||
"bugs": {
|
||||
"url": "https://github.com/appium/appium/issues"
|
||||
@@ -31,7 +31,7 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"lodash": "4.17.21",
|
||||
"source-map-support": "0.5.21"
|
||||
},
|
||||
@@ -50,5 +50,15 @@
|
||||
"tags": [
|
||||
"appium"
|
||||
],
|
||||
"homepage": "https://appium.io"
|
||||
"homepage": "https://appium.io",
|
||||
"keywords": [
|
||||
"automation",
|
||||
"javascript",
|
||||
"selenium",
|
||||
"webdriver",
|
||||
"ios",
|
||||
"android",
|
||||
"firefoxos",
|
||||
"testing"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,6 +3,23 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [2.60.0](https://github.com/appium/appium/compare/@appium/support@2.59.5...@appium/support@2.60.0) (2022-09-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **support:** update checks eat errors from non-existent packages ([89cf01f](https://github.com/appium/appium/commit/89cf01fda3e97adb5ef861c415406160df080020))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **appium:** Adjust NODE_PATH so NPM could properly resolve component peer dependencies ([#17325](https://github.com/appium/appium/issues/17325)) ([39d5cee](https://github.com/appium/appium/commit/39d5cee1b71f611e810900d3faed8e0fed6e1ce0))
|
||||
* **support:** Move module root detection utility into support package ([#17427](https://github.com/appium/appium/issues/17427)) ([5ab7829](https://github.com/appium/appium/commit/5ab78297e172bc6a5751c636f81b3b202fbe2743))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.59.5](https://github.com/appium/appium/compare/@appium/support@2.59.4...@appium/support@2.59.5) (2022-08-10)
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import log from './logger';
|
||||
import _ from 'lodash';
|
||||
import {exec} from 'teen_process';
|
||||
import path from 'path';
|
||||
import _fs from 'fs';
|
||||
import {v4 as uuidV4} from 'uuid';
|
||||
|
||||
const ECMA_SIZES = Object.freeze({
|
||||
@@ -200,4 +201,30 @@ function deepFreeze(object) {
|
||||
return Object.freeze(object);
|
||||
}
|
||||
|
||||
export {requirePackage, getObjectSize, getObjectId, deepFreeze};
|
||||
/**
|
||||
* Tries to synchronously detect the absolute path to the folder
|
||||
* where the given `moduleName` is located.
|
||||
*
|
||||
* @param {string} moduleName The name of the module as it is written in package.json
|
||||
* @param {string} filePath Full path to any of files that `moduleName` contains. Use
|
||||
* `__filename` to find the root of the module where this helper is called.
|
||||
* @returns {string?} Full path to the module root
|
||||
*/
|
||||
function getModuleRootSync (moduleName, filePath) {
|
||||
let currentDir = path.dirname(path.resolve(filePath));
|
||||
let isAtFsRoot = false;
|
||||
while (!isAtFsRoot) {
|
||||
const manifestPath = path.join(currentDir, 'package.json');
|
||||
try {
|
||||
if (_fs.existsSync(manifestPath) &&
|
||||
JSON.parse(_fs.readFileSync(manifestPath, 'utf8')).name === moduleName) {
|
||||
return currentDir;
|
||||
}
|
||||
} catch (ign) {}
|
||||
currentDir = path.dirname(currentDir);
|
||||
isAtFsRoot = currentDir.length <= path.dirname(currentDir).length;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export {requirePackage, getObjectSize, getObjectId, deepFreeze, getModuleRootSync};
|
||||
|
||||
+38
-27
@@ -92,29 +92,47 @@ export class NPM {
|
||||
/**
|
||||
* @param {string} cwd
|
||||
* @param {string} pkg
|
||||
* @returns {Promise<string?>}
|
||||
*/
|
||||
async getLatestVersion(cwd, pkg) {
|
||||
return (
|
||||
await this.exec('view', [pkg, 'dist-tags'], {
|
||||
json: true,
|
||||
cwd,
|
||||
})
|
||||
).json?.latest;
|
||||
try {
|
||||
return (
|
||||
(
|
||||
await this.exec('view', [pkg, 'dist-tags'], {
|
||||
json: true,
|
||||
cwd,
|
||||
})
|
||||
).json?.latest ?? null
|
||||
);
|
||||
} catch (err) {
|
||||
if (!err?.message.includes('E404')) {
|
||||
throw err;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} cwd
|
||||
* @param {string} pkg
|
||||
* @param {string} curVersion
|
||||
* @returns {Promise<string?>}
|
||||
*/
|
||||
async getLatestSafeUpgradeVersion(cwd, pkg, curVersion) {
|
||||
const allVersions = (
|
||||
await this.exec('view', [pkg, 'versions'], {
|
||||
json: true,
|
||||
cwd,
|
||||
})
|
||||
).json;
|
||||
return this.getLatestSafeUpgradeFromVersions(curVersion, allVersions);
|
||||
try {
|
||||
const allVersions = (
|
||||
await this.exec('view', [pkg, 'versions'], {
|
||||
json: true,
|
||||
cwd,
|
||||
})
|
||||
).json;
|
||||
return this.getLatestSafeUpgradeFromVersions(curVersion, allVersions);
|
||||
} catch (err) {
|
||||
if (!err?.message.includes('E404')) {
|
||||
throw err;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -193,20 +211,13 @@ export class NPM {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If we've found a `package.json` containined the `appiumCreated` property,
|
||||
* then we can do whatever we please with it, since we created it. This is
|
||||
* likely when `APPIUM_HOME` is the default (in `~/.appium`). In that case,
|
||||
* we want `--global-style` to avoid deduping, and we also do not need a
|
||||
* `package-lock.json`.
|
||||
*
|
||||
* If we _haven't_ found such a key, then this `package.json` isn't a
|
||||
* "dummy" and is controlled by the user. So we'll just add it as a dev
|
||||
* dep; whatever else it does is up to the user's npm config.
|
||||
*/
|
||||
const installOpts = (await hasAppiumDependency(cwd))
|
||||
? ['--save-dev']
|
||||
: ['--save-dev', '--save-exact', '--global-style', '--no-package-lock'];
|
||||
const installOpts = ['--save-dev'];
|
||||
if (!(await hasAppiumDependency(cwd))) {
|
||||
if (process.env.APPIUM_OMIT_PEER_DEPS) {
|
||||
installOpts.push('--omit=peer');
|
||||
}
|
||||
installOpts.push('--save-exact', '--global-style', '--no-package-lock');
|
||||
}
|
||||
|
||||
const res = await this.exec(
|
||||
'install',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/support",
|
||||
"version": "2.59.5",
|
||||
"version": "2.60.0",
|
||||
"description": "Support libs used across appium packages",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -44,8 +44,8 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@appium/types": "^0.4.0",
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@appium/types": "^0.4.1",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@colors/colors": "1.5.0",
|
||||
"@types/archiver": "5.3.1",
|
||||
"@types/base64-stream": "1.0.2",
|
||||
@@ -60,7 +60,7 @@
|
||||
"@types/pluralize": "0.0.29",
|
||||
"@types/pngjs": "6.0.1",
|
||||
"@types/rimraf": "3.0.2",
|
||||
"@types/semver": "7.3.10",
|
||||
"@types/semver": "7.3.12",
|
||||
"@types/shell-quote": "1.7.1",
|
||||
"@types/supports-color": "8.1.1",
|
||||
"@types/teen_process": "1.16.1",
|
||||
@@ -98,7 +98,7 @@
|
||||
"source-map-support": "0.5.21",
|
||||
"supports-color": "8.1.1",
|
||||
"teen_process": "1.16.0",
|
||||
"type-fest": "2.18.0",
|
||||
"type-fest": "2.19.0",
|
||||
"uuid": "8.3.2",
|
||||
"which": "2.0.2",
|
||||
"yauzl": "2.10.0"
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
import {npm} from '../../lib/npm';
|
||||
|
||||
const {expect} = chai;
|
||||
|
||||
describe('npm module', function () {
|
||||
describe('getLatestVersion()', function () {
|
||||
describe('when the package is not published to the public registry', function () {
|
||||
it('should not throw', async function () {
|
||||
await expect(
|
||||
npm.getLatestVersion(
|
||||
process.cwd(),
|
||||
'crusher-brush-resize-disfigure-props-desktop-blatancy-prologue'
|
||||
)
|
||||
).not.to.be.rejected;
|
||||
});
|
||||
|
||||
it('should resolve with "null"', async function () {
|
||||
await expect(
|
||||
npm.getLatestVersion(
|
||||
process.cwd(),
|
||||
'crusher-brush-resize-disfigure-props-desktop-blatancy-prologue'
|
||||
)
|
||||
).to.eventually.be.null;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('getLatestSafeUpgradeVersion()', function () {
|
||||
describe('when the package is not published to the public registry', function () {
|
||||
it('should not throw', async function () {
|
||||
await expect(
|
||||
npm.getLatestSafeUpgradeVersion(
|
||||
process.cwd(),
|
||||
'crusher-brush-resize-disfigure-props-desktop-blatancy-prologue',
|
||||
'1.0.0'
|
||||
)
|
||||
).to.eventually.be.null;
|
||||
});
|
||||
|
||||
it('should resolve with "null"', async function () {
|
||||
await expect(
|
||||
npm.getLatestSafeUpgradeVersion(
|
||||
process.cwd(),
|
||||
'crusher-brush-resize-disfigure-props-desktop-blatancy-prologue',
|
||||
'1.0.0'
|
||||
)
|
||||
).to.eventually.be.null;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,5 +1,7 @@
|
||||
import {should} from 'chai';
|
||||
import {node} from '../../lib';
|
||||
import path from 'path';
|
||||
import _ from 'lodash';
|
||||
|
||||
describe('node utilities', function () {
|
||||
describe('getObjectSize', function () {
|
||||
@@ -22,6 +24,16 @@ describe('node utilities', function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe('getModuleRootSync', function () {
|
||||
it('should be able to find current module\'s root', function () {
|
||||
path.resolve(__dirname).should.contain(node.getModuleRootSync('@appium/support', __filename));
|
||||
});
|
||||
|
||||
it('should return null if no root is found', function () {
|
||||
_.isNull(node.getModuleRootSync('yolo', __filename)).should.be.true;
|
||||
});
|
||||
});
|
||||
|
||||
describe('getObjectId', function () {
|
||||
it('should be able to calculate object identifiers', function () {
|
||||
const obj1 = {};
|
||||
|
||||
@@ -3,6 +3,23 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [2.0.0](https://github.com/appium/appium/compare/@appium/test-support@1.5.0...@appium/test-support@2.0.0) (2022-09-07)
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* **test-support:** remove driver/plugin-specific methods ([743c764](https://github.com/appium/appium/commit/743c764d5ea3211367fb2f338ecb5ec99af3ce86)), closes [#17398](https://github.com/appium/appium/issues/17398)
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **test-support:** This removes plugin/driver specific methods from `@appium/test-support`, and also removes the peer dep on `appium`.
|
||||
The methods can now be found in `@appium/plugin-test-support` and `@appium/driver-test-support`.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [1.5.0](https://github.com/appium/appium/compare/@appium/test-support@1.4.1...@appium/test-support@1.5.0) (2022-08-10)
|
||||
|
||||
|
||||
|
||||
@@ -6,15 +6,3 @@ export {stubLog} from './log-utils';
|
||||
export {fakeTime} from './time-utils';
|
||||
export {withMocks, verifyMocks} from './mock-utils';
|
||||
export {withSandbox, verifySandbox} from './sandbox-utils';
|
||||
export {pluginE2EHarness} from './plugin-e2e-harness';
|
||||
export {driverUnitTestSuite} from './driver-unit-suite';
|
||||
export {driverE2ETestSuite, createSessionHelpers} from './driver-e2e-suite';
|
||||
|
||||
export * from './helpers';
|
||||
|
||||
/**
|
||||
* @typedef {import('./driver-e2e-suite').SessionHelpers} SessionHelpers
|
||||
*/
|
||||
/**
|
||||
* @typedef {import('./plugin-e2e-harness').E2ESetupOpts} E2ESetupOpts
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {logger} from 'appium/support';
|
||||
import {logger} from '@appium/support';
|
||||
|
||||
const log = logger.getLogger('AppiumTestSupport');
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/test-support",
|
||||
"version": "1.5.0",
|
||||
"version": "2.0.0",
|
||||
"description": "A collection of test utilities used across Appium packages",
|
||||
"keywords": [
|
||||
"automation",
|
||||
@@ -48,20 +48,14 @@
|
||||
"test:unit": "mocha \"./test/unit/**/*.spec.js\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.18.9",
|
||||
"@appium/support": "^2.60.0",
|
||||
"@babel/runtime": "7.19.0",
|
||||
"@colors/colors": "1.5.0",
|
||||
"bluebird": "3.7.2",
|
||||
"chai": "4.3.6",
|
||||
"get-port": "5.1.1",
|
||||
"lodash": "4.17.21",
|
||||
"log-symbols": "4.1.0",
|
||||
"loud-rejection": "2.2.0",
|
||||
"sinon": "14.0.0",
|
||||
"source-map-support": "0.5.21",
|
||||
"teen_process": "1.16.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"appium": "^2.0.0-beta.35"
|
||||
"source-map-support": "0.5.21"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
"outDir": "build",
|
||||
"checkJs": true,
|
||||
"paths": {
|
||||
"appium/driver": ["../appium/driver"],
|
||||
"@appium/types": ["../types"],
|
||||
"appium/support": ["../appium/support"]
|
||||
"@appium/support": ["../support"]
|
||||
},
|
||||
"types": [
|
||||
"mocha", "chai", "sinon", "sinon-chai", "chai-as-promised"
|
||||
@@ -15,7 +14,6 @@
|
||||
},
|
||||
"include": ["./lib"],
|
||||
"references": [
|
||||
{"path": "../base-driver"},
|
||||
{"path": "../types"},
|
||||
{"path": "../support"}
|
||||
]
|
||||
|
||||
@@ -3,6 +3,19 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [0.4.1](https://github.com/appium/appium/compare/@appium/types@0.4.0...@appium/types@0.4.1) (2022-09-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **types:** add inclusionCaseInsensitive to Constraint type ([74378cc](https://github.com/appium/appium/commit/74378cca66b365083850d189e5922de3a2c5f488))
|
||||
* **types:** add missing @types/ws dep ([1597037](https://github.com/appium/appium/commit/159703744f18566bf3a46e0a2c5b9ac0073e5458))
|
||||
* **types:** Driver extends ExecuteCommands ([#17363](https://github.com/appium/appium/issues/17363)) ([b594799](https://github.com/appium/appium/commit/b5947991cff4f78fd4e0de4155d10f47f75a19f9)), closes [#17359](https://github.com/appium/appium/issues/17359)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [0.4.0](https://github.com/appium/appium/compare/@appium/types@0.3.1...@appium/types@0.4.0) (2022-08-10)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
/**
|
||||
* @module
|
||||
* Portions Copyright (c) 2017 Igor Muchychka
|
||||
* @see https://github.com/w3c-webdriver/w3c-webdriver
|
||||
*/
|
||||
|
||||
export interface Element {
|
||||
'element-6066-11e4-a52e-4f735466cecf': string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type PauseAction = {
|
||||
type: 'pause';
|
||||
duration: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type KeyDownAction = {
|
||||
type: 'keyDown';
|
||||
value: Key | string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type KeyUpAction = {
|
||||
type: 'keyUp';
|
||||
value: Key | string;
|
||||
};
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type PointerMoveAction = {
|
||||
type: 'pointerMove';
|
||||
x: number;
|
||||
y: number;
|
||||
duration?: number;
|
||||
origin?: 'viewport' | 'pointer' | Element;
|
||||
};
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type PointerUpAction = {
|
||||
type: 'pointerUp';
|
||||
button: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type PointerDownAction = {
|
||||
type: 'pointerDown';
|
||||
button: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type NullAction = PauseAction;
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type KeyAction = PauseAction | KeyDownAction | KeyUpAction;
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type PointerAction =
|
||||
| PauseAction
|
||||
| PointerMoveAction
|
||||
| PointerUpAction
|
||||
| PointerDownAction;
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type NullActionSequence = {
|
||||
type: 'none';
|
||||
id: string;
|
||||
actions: NullAction[];
|
||||
};
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type KeyActionSequence = {
|
||||
type: 'key';
|
||||
id: string;
|
||||
actions: KeyAction[];
|
||||
};
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type PointerParameters = {
|
||||
pointerType: 'mouse' | 'pen' | 'touch';
|
||||
};
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type PointerActionSequence = {
|
||||
type: 'pointer';
|
||||
id: string;
|
||||
actions: PointerAction[];
|
||||
parameters?: PointerParameters;
|
||||
};
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export type ActionSequence =
|
||||
| NullActionSequence
|
||||
| KeyActionSequence
|
||||
| PointerActionSequence;
|
||||
|
||||
/**
|
||||
* @group Actions
|
||||
*/
|
||||
export enum Key {
|
||||
NULL = '\uE000',
|
||||
CANCEL = '\uE001',
|
||||
HELP = '\uE002',
|
||||
BACKSPACE = '\uE003',
|
||||
TAB = '\uE004',
|
||||
CLEAR = '\uE005',
|
||||
RETURN = '\uE006',
|
||||
ENTER = '\uE007',
|
||||
SHIFT = '\uE008',
|
||||
CONTROL = '\uE009',
|
||||
ALT = '\uE00a',
|
||||
PAUSE = '\uE00b',
|
||||
ESCAPE = '\uE00c',
|
||||
SPACE = '\uE00d',
|
||||
PAGE_UP = '\uE00e',
|
||||
PAGE_DOWN = '\uE00f',
|
||||
END = '\uE010',
|
||||
HOME = '\uE011',
|
||||
LEFT = '\uE012',
|
||||
UP = '\uE013',
|
||||
RIGHT = '\uE014',
|
||||
DOWN = '\uE015',
|
||||
INSERT = '\uE016',
|
||||
DELETE = '\uE017',
|
||||
SEMICOLON = '\uE018',
|
||||
EQUALS = '\uE019',
|
||||
NUMPAD0 = '\uE01a',
|
||||
NUMPAD1 = '\uE01b',
|
||||
NUMPAD2 = '\uE01c',
|
||||
NUMPAD3 = '\uE01d',
|
||||
NUMPAD4 = '\uE01e',
|
||||
NUMPAD5 = '\uE01f',
|
||||
NUMPAD6 = '\uE020',
|
||||
NUMPAD7 = '\uE021',
|
||||
NUMPAD8 = '\uE022',
|
||||
NUMPAD9 = '\uE023',
|
||||
MULTIPLY = '\uE024',
|
||||
ADD = '\uE025',
|
||||
SEPARATOR = '\uE026',
|
||||
SUBTRACT = '\uE027',
|
||||
DECIMAL = '\uE028',
|
||||
DIVIDE = '\uE029',
|
||||
F1 = '\uE031',
|
||||
F2 = '\uE032',
|
||||
F3 = '\uE033',
|
||||
F4 = '\uE034',
|
||||
F5 = '\uE035',
|
||||
F6 = '\uE036',
|
||||
F7 = '\uE037',
|
||||
F8 = '\uE038',
|
||||
F9 = '\uE039',
|
||||
F10 = '\uE03a',
|
||||
F11 = '\uE03b',
|
||||
F12 = '\uE03c',
|
||||
META = '\uE03d',
|
||||
ZENKAKUHANKAKU = '\uE040',
|
||||
R_SHIFT = '\uE050',
|
||||
R_CONTROL = '\uE051',
|
||||
R_ALT = '\uE052',
|
||||
R_META = '\uE053',
|
||||
R_PAGEUP = '\uE054',
|
||||
R_PAGEDOWN = '\uE055',
|
||||
R_END = '\uE056',
|
||||
R_HOME = '\uE057',
|
||||
R_ARROWLEFT = '\uE058',
|
||||
R_ARROWUP = '\uE059',
|
||||
R_ARROWRIGHT = '\uE05A',
|
||||
R_ARROWDOWN = '\uE05B',
|
||||
R_INSERT = '\uE05C',
|
||||
R_DELETE = '\uE05D'
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import type {EventEmitter} from 'events';
|
||||
import {Element, ActionSequence} from './action';
|
||||
import {
|
||||
HTTPMethod,
|
||||
Capabilities,
|
||||
@@ -147,13 +148,10 @@ export interface Constraint {
|
||||
isArray?: boolean;
|
||||
deprecated?: boolean;
|
||||
inclusion?: any[];
|
||||
inclusionCaseInsensitive?: any[];
|
||||
}
|
||||
export type Constraints = Record<string, Constraint>;
|
||||
|
||||
export interface Element {
|
||||
'element-6066-11e4-a52e-4f735466cecf': string;
|
||||
}
|
||||
|
||||
export interface DriverHelpers {
|
||||
configureApp: (app: string, supportedAppExtensions: string[]) => Promise<string>;
|
||||
isPackageOrBundle: (app: string) => boolean;
|
||||
@@ -205,24 +203,6 @@ export interface Cookie {
|
||||
sameSite?: 'Lax' | 'Strict';
|
||||
}
|
||||
|
||||
export interface Actions {
|
||||
type?: string;
|
||||
actions: Action[];
|
||||
parameters?: {
|
||||
pointerType?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface Action {
|
||||
duration?: number;
|
||||
type: string;
|
||||
value?: string;
|
||||
x?: number;
|
||||
y?: number;
|
||||
button?: number;
|
||||
origin?: string;
|
||||
}
|
||||
|
||||
// Appium W3C WebDriver Extension
|
||||
|
||||
export interface ScreenRecordOptions {
|
||||
@@ -319,7 +299,7 @@ export interface Core {
|
||||
assertFeatureEnabled(name: string): void;
|
||||
validateLocatorStrategy(strategy: string, webContext?: boolean): void;
|
||||
proxyActive(sessionId?: string): boolean;
|
||||
getProxyAvoidList(sessionId?: string): [string, RegExp][];
|
||||
getProxyAvoidList(sessionId?: string): RouteMatcher[];
|
||||
canProxy(sessionId?: string): boolean;
|
||||
proxyRouteIsAvoided(sessionId: string, method: string, url: string): boolean;
|
||||
addManagedDriver(driver: Driver): void;
|
||||
@@ -341,6 +321,7 @@ export interface Driver
|
||||
TimeoutCommands,
|
||||
EventCommands,
|
||||
SessionHandler<[string, any], void>,
|
||||
ExecuteCommands,
|
||||
Core {
|
||||
cliArgs?: Record<string, any>;
|
||||
// The following methods are implemented by `BaseDriver`.
|
||||
@@ -403,7 +384,7 @@ export interface ExternalDriver extends Driver {
|
||||
setCookie?(cookie: Cookie): Promise<void>;
|
||||
deleteCookie?(name: string): Promise<void>;
|
||||
deleteCookies?(): Promise<void>;
|
||||
performActions?(actions: Actions[]): Promise<void>;
|
||||
performActions?(actions: ActionSequence[]): Promise<void>;
|
||||
releaseActions?(): Promise<void>;
|
||||
postDismissAlert?(): Promise<void>;
|
||||
postAcceptAlert?(): Promise<void>;
|
||||
@@ -613,3 +594,8 @@ export type DriverCommands<TArgs = any, TReturn = unknown> = Record<
|
||||
string,
|
||||
DriverCommand<TArgs, TReturn>
|
||||
>;
|
||||
|
||||
/**
|
||||
* Tuple of an HTTP method with a regex matching a request path
|
||||
*/
|
||||
export type RouteMatcher = [HTTPMethod, RegExp];
|
||||
|
||||
@@ -9,6 +9,7 @@ import {ExternalDriver} from './driver';
|
||||
import type {Logger} from 'npmlog';
|
||||
|
||||
export * from './driver';
|
||||
export * from './action';
|
||||
export * from './plugin';
|
||||
export {AppiumW3CCapabilities} from './capabilities';
|
||||
export {AppiumConfig, NormalizedAppiumConfig} from './config';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@appium/types",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"description": "Various type declarations used across Appium",
|
||||
"keywords": [
|
||||
"appium",
|
||||
@@ -35,8 +35,9 @@
|
||||
"@appium/schema": "^0.0.9",
|
||||
"@types/express": "4.17.13",
|
||||
"@types/npmlog": "4.1.4",
|
||||
"@wdio/types": "7.20.7",
|
||||
"type-fest": "2.18.0"
|
||||
"@types/ws": "8.5.3",
|
||||
"@wdio/types": "7.24.0",
|
||||
"type-fest": "2.19.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user