Commit Graph

65 Commits

Author SHA1 Message Date
Jonathan Lipps 8b7906f757 Publish
- appium@2.0.0-beta.31
 - @appium/base-driver@8.5.0
 - @appium/base-plugin@1.8.2
 - @appium/doctor@1.16.15
 - @appium/docutils@0.0.1
 - @appium/execute-driver-plugin@1.0.2
 - @appium/fake-driver@3.2.10
 - @appium/fake-plugin@1.2.1
 - @appium/gulp-plugins@6.0.6
 - @appium/images-plugin@1.1.7
 - @appium/opencv@1.0.5
 - @appium/relaxed-caps-plugin@1.0.0-beta.3
 - @appium/schema@0.0.3
 - @appium/support@2.57.2
 - @appium/test-support@1.3.16
 - @appium/types@0.2.0
 - @appium/universal-xml-plugin@1.0.0-beta.5
2022-04-20 13:23:24 -07:00
Christopher Hiller 882a5f4d5e chore: unify test setup fixture
Moved the stuff in `test/setup-babel` into `test/setup` and then removed some cruft in the `test:*` scripts of each package referencing `test/setup-babel`
2022-04-14 14:30:00 -07:00
Christopher Hiller 5b54017054 chore: relocated plugins
- left some necessary config in packages/plugins-temp which will get removed after full integration

# Conflicts:
#	packages/appium-plugins/.github/workflows/main.yml
#	packages/appium-plugins/packages/base/package-lock.json
#	packages/appium-plugins/packages/base/package.json
#	packages/appium-plugins/packages/fake/package-lock.json
#	packages/appium-plugins/packages/images/package-lock.json
#	packages/appium-plugins/packages/images/package.json
#	packages/appium-plugins/packages/relaxed-caps/package-lock.json
#	packages/appium-plugins/packages/relaxed-caps/package.json
#	packages/appium-plugins/packages/universal-xml/package-lock.json
#	packages/fake-plugin/lib/logger.js
#	packages/fake-plugin/lib/scripts/fake-error.js
#	packages/fake-plugin/lib/scripts/fake-success.js
#	packages/fake-plugin/package.json
#	packages/universal-xml-plugin/package.json
2022-04-14 14:30:00 -07:00
Jonathan Lipps 319f7289e7 Publish
- appium@2.0.0-beta.30
 - @appium/base-driver@8.4.2
 - @appium/doctor@1.16.14
 - @appium/eslint-config-appium@5.0.4
 - @appium/fake-driver@3.2.9
 - @appium/gulp-plugins@6.0.5
 - @appium/opencv@1.0.4
 - @appium/schema@0.0.2
 - @appium/support@2.57.1
 - @appium/test-support@1.3.15
 - @appium/types@0.1.1
2022-04-12 09:11:41 -07:00
Jonathan Lipps 0f32dad275 Publish
- appium@2.0.0-beta.29
 - @appium/base-driver@8.4.1
 - @appium/doctor@1.16.13
 - @appium/fake-driver@3.2.8
 - @appium/gulp-plugins@6.0.4
2022-04-12 08:49:03 -07:00
Jonathan Lipps 3ec3a0efa5 Publish
- appium@2.0.0-beta.28
 - @appium/base-driver@8.4.0
 - @appium/doctor@1.16.12
 - @appium/eslint-config-appium@5.0.3
 - @appium/fake-driver@3.2.7
 - @appium/gulp-plugins@6.0.3
 - @appium/opencv@1.0.3
 - @appium/schema@0.0.1
 - @appium/support@2.57.0
 - @appium/test-support@1.3.14
 - @appium/types@0.1.0
2022-04-07 16:12:21 -07:00
Renovate Bot 02706de19d chore(gulp-plugins): update babel monorepo to v7.17.9 2022-04-07 14:51:07 +00:00
Renovate Bot 4060c17cc6 chore(fake-driver): update dependency @xmldom/xmldom to v0.8.2 2022-04-06 10:39:12 +00:00
renovate[bot] d23907def5 chore: update dependency webdriverio to v7 (#15489)
* chore(): update dependency webdriverio to v7

* chore(fake-driver,appium): upgrade webdriverio to latest

- fixed broken tests in `@appium/fake-driver` and `appium`
- remove unused `appium-base-driver` from root of monorepo

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Christopher Hiller <boneskull@boneskull.com>
2022-04-04 15:14:59 -07:00
Jonathan Lipps 6d35def9ed Publish
- appium@2.0.0-beta.27
 - @appium/base-driver@8.3.1
 - @appium/doctor@1.16.11
 - @appium/fake-driver@3.2.6
 - @appium/support@2.56.1
 - @appium/test-support@1.3.13
2022-03-23 11:50:58 -07:00
Christopher Hiller 2877f90981 chore(fake-driver): gulp is dead, long live scripts
This PR removes Gulp from `@appium/fake-driver` as already done in a couple other packages.

Also: moved `screen.png` into `lib/` since `@babel/cli` can just copy it over into `build/`.
2022-03-22 18:11:37 -07:00
Jonathan Lipps f5cce0f29d Publish
- appium@2.0.0-beta.26
 - @appium/base-driver@8.3.0
 - @appium/doctor@1.16.10
 - @appium/eslint-config-appium@5.0.2
 - @appium/fake-driver@3.2.5
 - @appium/gulp-plugins@6.0.2
 - @appium/opencv@1.0.2
 - @appium/support@2.56.0
 - @appium/test-support@1.3.12
2022-03-22 13:41:57 -07:00
Renovate Bot c5164f7743 chore(fake-driver): update dependency @xmldom/xmldom to v0.8.1 2022-03-21 12:37:19 +00:00
Renovate Bot 799fb87be3 chore(gulp-plugins): update babel monorepo to v7.17.8 2022-03-19 11:13:48 +00:00
Renovate Bot 297a307725 chore(gulp-plugins): update babel monorepo to v7.17.7 2022-03-16 10:55:01 +00:00
Renovate Bot 94fe0f2ef8 chore(): update babel monorepo 2022-03-12 14:36:43 +00:00
Christopher Hiller 4b9bfb35aa chore: add directory prop to repository prop of package.json
I think npm uses this to link to the correct path of the package in a monorepo.
2022-03-10 11:10:35 -08:00
Christopher Hiller 868517b6f4 chore: remove gulp from appium package (#16459)
This change removes `gulp` and replaces it with plain ol' `babel` and `mocha`.

## `appium`

- No gulp.
- `test/` has been re-organized.  All test files now end in the extension `.spec.js`, which is a recognized convention and understood by editors/IDEs.  The tests are further split into `unit` and `e2e` subdirs.  This makes working with both `babel` and `mocha` easier.
- The tests are _not_ run against the transpiled code; code is now transpiled on-the-fly via `@babel/register`. This only affects `appium`.
- `commands-yml/validator.js` moved to `scripts/parse-yml-commands.js`. It has been rewritten as a CJS module.  `commands-yml/` should not contain `.js` files.
- `test/setup.js` is a new test harness specific to Appium, which loads & configures `@babel/register`.  Eventually, the contents of this file can be moved into the root monorepo's `test/setup.js`, but the rest of the packages do not need `@babel/register`, so we avoid the overhead.

## `@appium/gulp-plugins`

- Unfortunately, due to the new `npm test` strategy (see below), we cannot use the `nyan` reporter.  Or rather, we _can_, but will not see the animation.  So the reporter is now set to default to `spec`.
- Modified tests so they didn't overwrite the actual `build` dir with transpiled fixtures, which is what was happening. This was causing failures depending on the transpile/test order.

## All Packages

- All packages now have their own `build`, `test`, `test:e2e` and `dev` (just build + watch mode) npm scripts. This makes running a complete build easier, since each package can now provide its own appropriate command.  This is _mostly_ just `gulp once` (where `gulp` was used before), except for `appium`, where `@babel/cli` is used directly.
- This is what happens when `npm test` is run from the monorepo (in order):
    1. All packages are built (in parallel) by running `npm run build` in each folder (via `lerna`). See `pretest`
    2. All code is linted directly via `eslint`.
    3. All _unit tests_ are run w/ `npm test` in each folder, having assumed transpilation already occurred (if necessary).
- `npm run e2e-test` runs the `npm run test:e2e` in each folder. No transpilation occurs! Careful.
- All scripts are expected to live in `packages/*/scripts`, and this directory enforces CJS via ESLint.  `postinstall.js` moved, as well as `check-npm-pack-files.js`. `generate-schema-declarations.mjs` moved from the root `scripts/` dir into `packages/appium/scripts/`; it's now CJS instead of ESM.
- I had profiled running various things with `lerna run --parallel`, but it turns out this is not faster.  I'm not sure why, but I think it may have something to do with streaming STDOUT/STDERR, or potentially the overhead of running child processes outweighs the time it takes to actually run tests and builds.
- The behavior of `lerna run` now mimicks `lerna exec`, which was "run stuff in serial, streaming the output". The default behavior of `lerna run` is "run stuff in parallel, buffering the output".  Buffered output sucks, and streaming the output from all tasks at once creates chaos.  To override this behavior, you'll see `--parallel --concurrency=8 --prefix` for tasks that can truly be parallelized, like transpilation.  The number 8 is the "maximum", and CI usually won't have more than 2 cores available anyway.
- When run in CI, Mocha runs with `--forbid-only`, which will fail if there's an `.only()` somewhere in the tests. Further, it forces color output.

## Etc.

- Updated Wallaby config, `.gitignore`, `.eslintignore`.
- Sorted `package.json` files
- Removed `watch` and `coverage` scripts which were broken anyway.

chore(appium): fix schema json path issues

- the path to the JSON schema is now correct: `lib/appium-config-schema.json`
- add `log-symbols` to devdeps for niceness. this is already a transitive dep
2022-03-09 14:50:45 -08:00
Christopher Hiller 1b29920485 fix(fake-driver): create cjs executable entry point
This driver wasn't working properly when used directly
2022-03-09 14:50:45 -08:00
Jonathan Lipps 42f4a2de2d Publish
- appium@2.0.0-beta.25
 - @appium/base-driver@8.2.4
 - @appium/doctor@1.16.9
 - @appium/fake-driver@3.2.4
 - @appium/opencv@1.0.1
 - @appium/support@2.55.4
 - @appium/test-support@1.3.11
2022-01-21 12:07:01 -08:00
Jonathan Lipps ca90a11813 Publish
- appium@2.0.0-beta.24
 - @appium/base-driver@8.2.3
 - @appium/doctor@1.16.8
 - @appium/eslint-config-appium@5.0.1
 - @appium/fake-driver@3.2.3
 - @appium/gulp-plugins@6.0.1
 - @appium/support@2.55.3
 - @appium/test-support@1.3.10
2022-01-11 13:04:16 -08:00
Mykola Mokhnach e947204351 chore(fake-driver): Bump xmldom version (#16182) 2021-11-30 21:43:40 +01:00
Jonathan Lipps 280d409df6 Publish
- appium@2.0.0-beta.23
 - @appium/base-driver@8.2.2
 - @appium/fake-driver@3.2.2
2021-11-23 09:56:08 -08:00
Christopher Hiller e36a701058 Publish
- appium@2.0.0-beta.22
 - @appium/base-driver@8.2.1
 - @appium/doctor@1.16.7
 - @appium/eslint-config-appium@5.0.0
 - @appium/fake-driver@3.2.1
 - @appium/gulp-plugins@6.0.0
 - @appium/support@2.55.2
 - @appium/test-support@1.3.9
2021-11-19 12:07:28 -08:00
Renovate Bot 894a5928ac chore(test-support): update dependency source-map-support to v0.5.21 2021-11-19 13:23:40 +00:00
Christopher Hiller a93f37ad06 fix(fake-driver): create cjs wrapper 2021-11-18 12:08:50 -08:00
Jonathan Lipps d7882a15ee Publish
- appium@2.0.0-beta.20
 - @appium/base-driver@8.2.0
 - @appium/doctor@1.16.6
 - @appium/eslint-config-appium@4.7.4
 - @appium/fake-driver@3.2.0
 - @appium/gulp-plugins@5.5.5
 - @appium/support@2.55.1
 - @appium/test-support@1.3.8
2021-11-15 12:15:51 -08:00
Jonathan Lipps 9e6c0a13ef feat(fake-driver): add a new 'PROXY' context that does 'proxying' for use in testing 2021-11-12 22:15:06 -05:00
Renovate Bot 6bdb7a045c chore(eslint-config-appium): update babel monorepo to v7.16.3 2021-11-11 01:49:34 +00:00
Christopher Hiller 40a5bac610 chore(fake-driver): add missing LICENSE 2021-11-09 11:57:26 -08:00
Christopher Hiller 548310d018 chore(appium): use Ajv to validate CLI args
This now consumes Ajv directly to validate CLI args.  Since a JSON schema is made of JSON schemas, we can simply validate an argument against _the schema for that argument_.

- Replaced parser transformation functions (`parseSecurityFeatures()`, `parseJsonStringOrFile()`) with custom transforms which are bound to keyword `appiumCliTransformer`.  e.g., any option that can now accept a JSON string or filepath on the command line may use `appiumCliTransformer: 'json'`.  This is the default behavior for `array` and `object` -type options, which cannot easily be expressed on the CLI.  The config file does _not_ support this behavior, so the value must be whatever the schema `type` says (e.g., an `object` instead of a JSON string or filepath).  To this end, removed `parser-helpers.js`
- Further, we now disallow union types in the schema. A prop must have a single type.
- Added custom keywords `appiumCliDest`, `appiumCliDescription`, and `appiumCliTransformer`. Previously (if existed), this could have been any value--these are now typed by the schema--e.g., a number for `appiumCliDest` will fail.
- Added more types and TS checks around
- Fixed misspelling of "successfully" in various places
- Removed `@oclifg/errors` because we can now use `better-ajv-errors` to display them, as intended. It looks great!
- Moved all schema-related stuff to `lib/schema/` because I had too many modules
- Added more constants to please @mykola-mokhnach 😄
- Handles untyped properties or `null`-typed properties
- `getSchema()`, `validate()` etc now accept a schema ID. The schema ID is derived from the argument name. This is how we handle validation for each argument individually.  The config file is still validated against the entire schema at once.
- Fixed problem where only `driverConfigs` were ever used to call extension commands!
- Added some semaphore-like things to `ExtConfigIO` to avoid multiple reads/writes at once
- Fixed display of metavars in `--help`
- More tests; removed tests for removed code
2021-11-09 11:57:26 -08:00
Jonathan Lipps 71357e52e1 Publish
- appium@2.0.0-beta.19
 - @appium/base-driver@8.1.2
 - @appium/doctor@1.16.5
 - @appium/eslint-config-appium@4.7.3
 - @appium/fake-driver@3.1.0
 - @appium/gulp-plugins@5.5.4
 - @appium/support@2.55.0
 - @appium/test-support@1.3.7
2021-11-09 14:07:38 -05:00
Renovate Bot 6bb9439089 chore(gulp-plugins): update babel monorepo to v7.16.0 2021-10-30 10:41:03 +00:00
Christopher Hiller cf7438a352 feat(fake-driver): add a schema
Adds an example schema to `fake-driver`. This is used for testing.
Also simplify assignment of commands to `FakeDriver.prototype`.
2021-10-20 16:02:32 -07:00
Christopher Hiller 3396594f76 chore(fake-driver): make wdio quieter 2021-09-28 07:54:20 -07:00
Renovate Bot 760aebadac chore(fake-driver): update dependency asyncbox to v2.9.2 2021-09-21 07:47:00 +00:00
Jonathan Lipps 01dd42ee17 Publish
- appium@2.0.0-beta.18
 - @appium/base-driver@8.1.1
 - @appium/fake-driver@3.0.5
2021-09-16 10:37:18 -07:00
Jonathan Lipps 4f89d398a4 Publish
- appium@2.0.0-beta.17
 - @appium/base-driver@8.1.0
 - @appium/doctor@1.16.4
 - @appium/fake-driver@3.0.4
2021-09-16 10:15:01 -07:00
Jonathan Lipps e0c7754af6 Publish
- appium@2.0.0-beta.16
 - @appium/base-driver@8.0.3
 - @appium/fake-driver@3.0.3
2021-09-15 12:02:01 -07:00
Renovate Bot 96079de6b3 chore(fake-driver): update dependency asyncbox to v2.9.1 2021-09-15 08:41:36 +00:00
Jonathan Lipps 4ec2d1edd7 Publish
- appium@2.0.0-beta.15
 - @appium/base-driver@8.0.2
 - @appium/doctor@1.16.3
 - @appium/eslint-config-appium@4.7.2
 - @appium/fake-driver@3.0.2
 - @appium/gulp-plugins@5.5.3
 - @appium/support@2.54.2
 - @appium/test-support@1.3.6
2021-09-14 14:08:52 -07:00
Jonathan Lipps 47ae708945 Publish
- appium@2.0.0-beta.14
 - @appium/base-driver@8.0.1
 - @appium/doctor@1.16.2
 - @appium/fake-driver@3.0.1
 - @appium/gulp-plugins@5.5.2
 - @appium/support@2.54.1
 - @appium/test-support@1.3.5
2021-09-14 14:03:56 -07:00
Renovate Bot 7cb49d59ef chore(appium): pin dependencies 2021-09-14 09:33:34 -07:00
Jonathan Lipps 050d099e87 feat!(appium): support driver-specific args via --driver-args
Co-authored-by: Ayan Khan <ayan@headspin.io>
2021-09-10 10:35:56 -07:00
Jonathan Lipps eaafb29fee chore: update git tags in package.json based on last lerna release 2021-08-16 16:05:50 -07:00
Jonathan Lipps ec6a90a797 Publish
- appium@2.0.0-beta.13
 - @appium/base-driver@8.0.0-beta.7
 - @appium/doctor@1.16.1
 - @appium/eslint-config-appium@4.7.1
 - @appium/fake-driver@3.0.0
 - @appium/gulp-plugins@5.5.1
 - @appium/support@2.54.0
 - @appium/test-support@1.3.4
2021-08-16 15:48:44 -07:00
Christopher Hiller ee00285b38 chore: global chai
This PR makes `chai` and `should()` _globals_ when using Mocha:

- `chai` is configured with `chai-as-promised`
- A `.mocharc.js` requires `./test/setup.js` _from the monorepo root_.
- Updated the ESLint config to recognize the globals.
- Updated Wallaby config

All instances of `import chai...` and the like have been removed from all test files.
2021-08-13 10:40:52 -07:00
Renovate Bot 11c2c802ed chore(gulp-plugins): update babel monorepo 2021-08-13 12:15:51 +00:00
Renovate Bot fc23e07348 chore(fake-driver): update dependency xmldom to ^0.6 2021-08-13 10:36:26 +00:00
Renovate Bot b2233e84a1 chore(fake-driver): update dependency asyncbox to ^2.8.0 2021-08-13 10:08:04 +00:00