BREAKING CHANGE:
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`.
Closes#17398
This PR passes a `cliArgs` parameter to the static method `updateServer` of drivers and plugins so they can take action on the server configuration based on the content of the arguments.
Note that `cliArgs` is a misnomer, because these args can also come from configuration files.
Closes#17304
- `@appium/test-support` now exports the e2e setup for plugins, and e2e/unit suites for drivers from base-driver. it also generates declarations.
- `appium` exports this as `appium/test`.
- The `capability.spec.js` unit test for basedriver now avoids spying on the "global" logger, due to test flake. It now spies directly on the function which calls the global logger. (@mykola_mokhnach)
- removed homebrew ansi-stripping code from `test-support` and replaced with `@colors/colors`
- type fixes and refactors for `@appium/test-support`
- type fixes for `appium`
- simplify `lib/index.js` of `@appium/base-driver`
Just a bunch of random (mostly path-related) fixes.
## Monorepo
- Make `npm run clean` work cross-platform
- Sort root `package.json`
- Update Babel configs to suppress warning about `@babel/plugin-proposal-private-property-in-object`
- Add `.nyc_output` and `*.lerna_backup` to `.gitignore`
- Replace references to `appium-support`
- Sync `package.json` fields
- Add a [Wallaby](https://wallabyjs.com) configuration file
## appium
- `lib/config`: `package.json` resolution
- split some tests out of `config-specs.js` and into `config-e2e-specs.js` since they are very clearly not unit tests
- Improve `PROJECT_ROOT` resolution, which is still a hack
- Copy fixtures & fix paths to fixtures in tests
## @appium/base-driver
- `lib/basedriver/driver`: `package.json` resolution
- Fix broken tests when run in isolation (`chai.should()`)
## @appium/doctor
- `lib/doctor`: `package.json` resolution
- `lib/utils`: `package.json` resolution & exposed `resetLog()` which undoes what `configureBinaryLog()` does (for testing purposes)
- `utils-specs.js`: clean up after `onLogMessage` test
- copy fixtures into `build` upon transpile
- Upgrade `@appium/gulp-plugins`
## @appium/gulp-plugins
- Ensure `postTranspile` is run when `transpile` is run before tests
- Fix `.babelrc` like `babel.config.json`
## @appium/support
- Fixture resolution
- Fix broken tests when run in isolation (`chai-as-promised`)
- Copy fixtures when transpiling
sinon supports promises natively, and we are using bluebird here. promise resolution seems to go wonky when using sinon's stub `.returns(B.reject(err))`, so now we tell sinon to use _bluebird's_ promises, which makes `.rejects(err)` do the same thing except better.