Commit Graph

7 Commits

Author SHA1 Message Date
Christopher Hiller 743c764d5e chore(test-support): remove driver/plugin-specific methods
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
2022-08-23 13:42:47 -07:00
Christopher Hiller d4b983328a feat(appium,base-driver,fake-driver,fake-plugin,test-support,types): updateServer receives cliArgs param
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
2022-08-08 14:00:58 -07:00
Christopher Hiller 70d88cb86f feat(appium,base-driver,base-plugin,test-support,types): move test fixtures into test-support
- `@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`
2022-07-18 15:58:21 -07:00
Christopher Hiller 133db5355f chore: reformat everything
this reformats all `.js`, `.ts`, and `.d.ts` files.
2022-05-09 19:09:50 -07:00
Christopher Hiller 57f39c5488 fix(test-support): create cjs wrapper 2021-11-18 12:08:50 -08:00
Christopher Hiller 6c769a2b7c chore: housecleaning
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
2021-08-10 11:52:57 -07:00
Christopher Hiller 16910858b5 chore: add @appium/test-support to monorepo & use Bluebird w/ Sinon
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.
2021-05-18 12:49:28 -07:00