Commit Graph
726 Commits
Author SHA1 Message Date
Renovate Bot 96079de6b3 chore(fake-driver): update dependency asyncbox to v2.9.1 2021-09-15 08:41:36 +00:00
Renovate Bot 54c483ee50 chore(): update dependency sinon to v11.1.2 2021-09-14 18:44:17 +00:00
Renovate Bot 64be12ae7f chore(): update dependency mocha to v9.1.1 2021-09-14 10:40:02 -07:00
Renovate Bot 7cb49d59ef chore(appium): pin dependencies 2021-09-14 09:33:34 -07:00
Jonathan LippsandAyan Khan c8f12d1e95 feat(appium): support plugin-specific args via --plugin-args
Co-authored-by: Ayan Khan <ayan@headspin.io>
2021-09-10 10:35:56 -07:00
Renovate Bot 4a7b02d03a chore(gulp-plugins): update dependency babel-plugin-source-map-support to ^2.1.3 2021-08-17 10:34:41 -07:00
Renovate Bot 11c2c802ed chore(gulp-plugins): update babel monorepo 2021-08-13 12:15:51 +00:00
Renovate Bot 59222ca0d3 chore(base-driver): update dependency webdriverio to ^6.12.1 2021-08-12 21:58:57 +00:00
Renovate Bot bdc9bcbd02 chore(): update dependency lint-staged to ^11.1.2 2021-08-12 12:50:36 +00:00
Renovate Bot 589d776ab1 chore(): update dependency mjpeg-server to ^0.3.1 2021-08-12 08:25:08 +00:00
Renovate Bot 55a5f6eac5 chore(): update dependency serve-static to ^1.14.1 2021-08-12 01:27:51 +00:00
Renovate Bot 40208145c9 chore(): update dependency handlebars to ^4.7.7 2021-08-11 23:35:31 +00:00
Renovate Bot 4eae53f1b8 chore(): update dependency appium-base-driver to ^7.9.0 2021-08-11 23:06:44 +00: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
renovate[bot]andRenovate Bot 256c2ad200 chore(gulp-plugins): update dependency mocha to v9.0.1 (#15530)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-18 15:18:57 -07:00
renovate[bot]andRenovate Bot 5db7517cee chore(): update dependency @appium/fake-plugin to ^1.2.0 (#15539)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-18 15:15:47 -07:00
Christopher Hiller b74612cae8 chore: remove unused wd (#15542) 2021-06-18 15:15:32 -07:00
renovate[bot]andRenovate Bot 1704eb5513 chore(): update dependency finalhandler to ^1.1.2 (#15508)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-17 15:56:11 -07:00
renovate[bot]andRenovate Bot 91d47496ef chore(gulp-plugins): update dependency gulp to ^4.0.2 (#15519)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-17 15:54:31 -07:00
Christopher Hiller 5109e6852b chore: upgrade sync-monorepo-packages (#15506)
this fixes some problems with the command-line options, and maybe some security fixes too
2021-06-16 10:49:00 -07:00
renovate[bot]andRenovate Bot 1cdcba2e02 chore(): update dependency querystring to ^0.2.1 (#15509)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-16 10:48:25 -07:00
renovate[bot]andRenovate Bot 55efe2c411 chore(): update dependency yaml-js to ^0.2.3 (#15512)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-16 10:47:42 -07:00
renovate[bot]andRenovate Bot b78a8f4deb chore(gulp-plugins): update dependency fancy-log to ^1.3.3 (#15516)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-16 10:46:09 -07:00
renovate[bot]andRenovate Bot 993ad769ad chore(gulp-plugins): update dependency mocha to v9 (#15493)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-11 08:31:16 -07:00
renovate[bot]andRenovate Bot 4ce589030a chore(test-support): update dependency sinon to v11 (#15495)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-11 08:30:07 -07:00
Christopher Hiller c66144d62b chore: update @appium/fake-driver to use @appium/base-driver (#15436)
* chore: update @appium/fake-driver to use @appium/base-driver

BREAKING CHANGE: `fake-driver` now depends upon `@appium/base-driver@8.x`

## `@appium/fake-driver`

- need to use w3c capabilities only
- fix: find `app.xml` fixture properly when running tests via `mocha --require=@babel/register`

## `@appium/base-driver`

- fixed a dead URL in a comment
- updated the "logging" tests to manually supply w3c capabilities.  `createSession()` does it for you, but `executeCommand('createSession')` does not.
- display the name of the driver under test when executing base driver's test suite with other drivers

Ref: #15425

* fix(fake-driver): add naive css selector support

* fix(fake-driver): helpers now use wdio instead of wd

- exported more constants as base-driver helpers do
- `deleteSession()` now expects a wdio `browser` (`driver`) object; removed closure

* fix(fake-driver): find-element-tests and driver-e2e-specs members passing

- alert-tests, context-tests, element-interaction-tests, general-tests all failing still

* fix(fake-driver): update interaction tests

replace unsupported `getLocation` with `getElementRect`

* fix(fake-driver): update alert tests

* fix(fake-driver): udpate context tests

* fix(fake-driver): update unit tests

* fix(base-driver): implement missing route for releaseActions

is the call to `this.proxyReleaseActions` even necessary?

* fix(fake-driver): update generic actions tests

also add a stub implementation of `releaseActions`, which wdio calls

* chore(fake-driver): remove redundant tests from find-element-tests

covered by other strategies

* fix(fake-driver): update generic actions tests

also fix path to screenshot (`screen.png`) when running tests outside of `build`

* chore(fake-driver): use fs module from @appium/support

* chore(base-driver): update hash in protocol consistency test

* fix(base-driver): update e2e test fn to prefer provided address/port over default

* chore: formatting
2021-06-07 15:01:34 -07:00
Christopher Hiller 4def2e926a chore: configure lerna for publishing
1. Uses `sync-monorepo-packages` to keep `README.md` and `packages/appium/README.md` in sync.  Since `README` gets published to npm but _also_ shows in the GitHub repo, both places need a `README`. In lieu of a custom `README`, we can just sync it for now.  This is called via a `preversion` script.
1. Various fields are synced in `package.json`.  This does not include dependencies—but those _in common_ should probably be kept in sync as well.
1. Lerna uses conventional commits and Git tags to figure out what to do.  It should automatically determine what needs releasing and what version it should be released as.
1. Tags have been pushed to the repo for Lerna to use.  In the case where the changesets are functionally identical to the latest code in the old repositories, the version number has been retained, and the tag is of the format `[@scope/]<package-name>@<version>`.  In the case where the old repos had _unreleased_ changesets, I’ve tagged with a new patch release and adopted the `-rc.0` suffix.  So if we were at v5.5.0 in `appium-gulp-plugins`, `@appium/gulp-plugins` is tagged as `@appium/gulp-plugins@5.5.1-rc.0`.  I have not modified the version in `package.json`.
 1. As with adopting any new release/publishing strategy, we should be meticulous about what we’re doing until we’re comfortable with how it works.  Lerna supports dry runs; we should use them.
1. Documentation on usage will arrive in next changes to this PR.
2021-05-24 15:16:15 -07:00
Christopher Hiller 8cc0d53b22 chore(fake-driver): add convenience script for e2e tests 2021-05-18 15:47:38 -07:00
Christopher Hiller b3b40aed6f fix(docs): re-add appium-base-driver as devdep for docgen 2021-05-18 13:06:48 -07:00
Christopher Hiller 981fa7b70c chore: remove unused e2e test scripts; add test-support test script 2021-05-18 12:59:23 -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
Christopher Hiller 17aad66b40 chore: add @babel/eslint-parser to root devDeps to enable in-IDE linting 2021-05-18 12:35:28 -07:00
Christopher Hiller 935b1f80a4 fix: use random test port
- update references to `@appium/base-driver`
2021-05-17 16:23:51 -07:00
Christopher Hiller 882982fac1 chore: replace precommit hook with eslint --fix
- by way of `lint-staged`
2021-05-17 15:03:53 -07:00
Christopher Hiller 4c4b25e476 chore: cleanup base-driver
- remove dupe files
- move dev deps into root
- move `.azure-pipelines.yml` to root for reasons
- tweak gulp `lint` task to avoid linting `.min.js` files (vendored jQuery)
- update `.eslintignore` to do the same
2021-05-17 14:59:51 -07:00
Christopher Hiller bf707b8728 chore: enable debugging of tests outside of gulp context
- tests cannot be debugged very easily due to the babel dependencies _and_ the root babel config living in two separate places.  this change adds them to the monorepo root.  the drawback here is that these modules are duplicated, because they live as dependencies in gulp-plugins as well.
- add a bunch of convenience scripts for e2e tests
- normalize lerna args
2021-05-17 14:19:52 -07:00
Christopher Hiller 2499b49936 fix: e2e-tests
- re-add missing fake-plugin dev dep
- export a `PROJECT_ROOT` from the `helpers` module; use this where needed (DRY)
2021-05-17 14:17:49 -07:00
Christopher Hiller 9ca3f0f119 chore: replace call to lerna in workflow with npm script 2021-05-17 14:17:48 -07:00
Christopher Hiller 4a203fa876 chore: add appium-support to repo
- add `npm start` script to run appium server
- add `npm run doctor` convenience script to run doctor
- renamed `clean` script to `reinstall`
- added new `clean` script to just clean
- updated the "appium from source" doc
2021-05-17 14:17:46 -07:00
Christopher Hiller 127589fd4d chore: add @appium/eslint-config-appium to the monorepo
this pkg is unique in that it does not use `gulp`, so for now we tell lerna to always ignore it when running `lerna exec` across packages.  it has no tests, but it's marginally useful to lint the `index.js`, so we'll do that (see `lint` script in root `package.json`).

the canonical way to handle plugin deps in a sharable config is to use `peerDependencies`, so it now uses `peerDependencies` instead of `dependencies`.  these peer deps are installed by the dependencies of `@appium-gulp-plugins`.  see [docs](https://eslint.org/docs/developer-guide/shareable-configs#publishing-a-shareable-config)

our root `.eslintrc` depends upon `@appium/eslint-config-appium` (which is not an unusual situation).  to pull this off in a monorepo, a cheat is to `file:` schema in the dependency specifier of the root `package.json`.

also tweaked `lerna.json` to _always_ run `bootstrap` with the `--no-ci` flag.  lerna will attempt to use `npm ci` if `CI` env var is present, but for that to work, we must have `package-lock.json` under version control.
2021-05-17 14:17:44 -07:00
Christopher Hiller f659d28396 fix: fix the lint:fix script; run parallel 2021-05-17 14:17:44 -07:00
Christopher Hiller 960249f010 chore: add some convenience scripts for testing individual packages 2021-05-17 14:17:44 -07:00
Christopher Hiller 0e97ba16de chore: add @appium/doctor to the monorepo 2021-05-17 14:17:42 -07:00
Christopher Hiller f26bdb18d3 chore: add @appium/gulp-plugins to monorepo 2021-05-17 14:17:42 -07:00
Christopher Hiller 9e33c7ac11 fix: doc generation
I think?
2021-05-17 14:17:41 -07:00
Christopher Hiller fcb7917fb4 chore: add appium-fake-driver to monorepo; fix appium tests
- all tests changed were needed because of path issues.  I was unable to get the tests working in their entirety _without_ adding `@appium/fake-driver` to the monorepo--it would have required a separate `npm install` step in `appium-fake-driver` due to the lack of its `devDependencies` and `prepare` script--so I figured I might as well pull it in now.
- deduped `package.json` scripts somewhat
- updated ESLint configuration to include `@appium/fake-driver`'s rule override
- sorted the root `package.json` because fussy
- added `wd` as a dev dep because `@appium/fake-driver` needs it
2021-05-17 14:17:41 -07:00
Christopher Hiller 8800bc8aa3 chore: add babel config for debugging (wip) 2021-05-17 14:17:41 -07:00
Christopher Hiller f7c9286e92 update node.js workflow for lerna 2021-05-17 14:17:40 -07:00
Christopher Hiller db8e19e965 update node.js workflow for lerna 2021-05-17 14:17:40 -07:00
Christopher Hiller a945cfcde0 chore: create appium monorepo; closes #14441
This PR supersedes PR #14562.

This is my first attempt at making this repo a monorepo and moving appium-proper into `packages/appium`.

I had tried to make this work with npm's "workspaces", but it seems lifecycle scripts don't run as you'd expect them to upon install.  Instead, I'm using Lerna, which provides more features for monorepos.

Changes include:

- The root `package.json` is now a package named `appium-monorepo`, which is `private`.  The monorepo should not be published.
- All dev dependencies remain in the root `package.json`.
- `gulpfile.js` _moved_ into `packages/appium/gulpfile.js`, but this should be **temporary**--`appium-gulp-plugins` makes certain assumptions which a monorepo violates, and I was unable to get it working without patching `appium-gulp-plugins`.
- Most of the `package.json` `scripts` moved into `packages/appium/package.json` due to the above.  This too should be considered **temporary**.
- Adds a root `postinstall` lifecycle script which calls `lerna bootstrap` to install/link packages.  I don't see a `package-lock.json` in `packages/appium/`; this needs investigating.
- Adds a root `test` lifecycle script which executes `npm run test` in all packages.  The tests do not pass, but I don't know if this is my fault.
- The `clean` script will purge all `node_modules` folders in each package, as well.
- I removed `scripts/release*.sh`, since it seems they would fail anyway--`lerna` should be used for releases instead
- The shrinkwrap-related stuff is untested.
- Renamed `tags` prop in `packages/appium/package.json` to `keywords`.  I don't know if `tags` is supported.
2021-05-17 14:17:39 -07:00