Commit Graph
8879 Commits
Author SHA1 Message Date
renovate[bot]andRenovate Bot 7a7049fa51 chore(gulp-plugins): update dependency node-notifier to v10 (#15494)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-11 08:30:33 -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
renovate[bot]andRenovate Bot ce47f82d17 chore(workflows): update actions/setup-node action to v2 (#15496)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-11 08:29:47 -07:00
renovate[bot]andRenovate Bot 1e7026a532 chore(eslint-config-appium): update dependency eslint-plugin-mocha to v9 (#15491)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-06-11 08:21:29 -07:00
Ayan Khan 9331969c23 refactor(appium)!: remove support for -custom locator strategy(should be handled by plugins instead) (#15452) 2021-06-09 16:28:29 -07:00
Christopher Hiller 950372c1bd fix(fake-driver): copy non-JS files into build dir at transpile time; closes #15471 2021-06-08 11:32:20 -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
Kazuaki Matsuo 385e5c5b23 chore(base-driver): remove unused swipe related methods from base-driver (#15455) 2021-06-01 20:06:37 -07:00
Kazuaki Matsuo 254cc638c5 revert(base-driver): "chore: merge base-driver master (de7e41b) to base-driver for 2.0" (#15454)
This reverts commit 01abeac864.
2021-06-02 11:14:46 +09:00
Ayan Khan 21e8d60a5c feat(appium): expose validateCaps in basedriver index (#15451) 2021-06-01 15:53:11 -07:00
Dharin Shah 52f4fc6a2c fix(appium): load plugins before main server to allow plugin monkeypatching (#15441) 2021-06-01 11:10:48 -07:00
Kazuaki Matsuo 01abeac864 chore: merge base-driver master (de7e41b) to 2.0 (#15440) 2021-06-01 05:42:31 +09:00
Christopher Hiller 7b38ac9417 chore(base-driver): use 'beta' dist tag 2021-05-24 15:16:15 -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
Jonathan Lipps 9471f13270 feat!(fake-driver): wrap fake app source with <AppiumAUT> like other drivers
this will improve appium inspector compatibility
2021-05-24 11:48:03 -07:00
Christopher Hiller 7550b790b9 Merge pull request #15343 from boneskull/issue/14441
chore: create appium monorepo; closes #14441
@appium/fake-driver@2.2.0 @appium/base-driver@8.0.0-beta.7 @appium/support@2.53.0 @appium/test-support@1.3.4-rc.0 @appium/gulp-plugins@5.5.1-rc.0 @appium/eslint-config-appium@4.7.0 @appium/doctor@1.16.1-rc.0
2021-05-21 10:13:40 -07:00
Christopher Hiller f190f0e400 docs: fix required npm version number 2021-05-20 12:45:34 -07:00
Christopher Hiller 6f8b9becae docs: whitespace 2021-05-20 12:44:19 -07:00
Christopher Hiller 0b578de1d6 chore(appium): tweak declarations and var names in plugin-e2e-specs test 2021-05-20 12:24:22 -07:00
Christopher Hiller 57c316378f chore(base-driver): use random port in express server tests 2021-05-18 15:47:53 -07:00
Christopher Hiller 8cc0d53b22 chore(fake-driver): add convenience script for e2e tests 2021-05-18 15:47:38 -07:00
Christopher Hiller 21496a3905 chore(base-driver): use random port in websockets e2e test 2021-05-18 15:35:10 -07:00
Christopher Hiller c0a1658924 chore: remove invalid comment 2021-05-18 15:31:42 -07:00
Christopher Hiller c5fc5bf20c chore: remove unused azure pipelines config 2021-05-18 15:23:13 -07:00
Christopher Hiller b1a1a3aae4 chore: revert removal of scripts folder 2021-05-18 13:20:20 -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 b864fa5310 fix(base-driver): more random ports 2021-05-18 12:57:05 -07:00
Christopher Hiller 80c9919985 fix(doctor): use @appium/test-support 2021-05-18 12:49:54 -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 92c329f7bc fix(fake-driver): use appium-base-driver@1.x for now 2021-05-18 12:39:52 -07:00
Christopher Hiller c3bbab1239 chore: add vscode settings to .gitignore 2021-05-18 12:36:08 -07:00
Christopher Hiller ff3c74f410 fix(base-driver): use random ports in tests 2021-05-18 12:35:54 -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 e14d4fbd0f fix(appium): use proper base driver package & random ports 2021-05-18 12:34:53 -07:00
Christopher Hiller f5678fcc58 chore: consolidate more eslint config 2021-05-18 12:33:58 -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 877c00a8a9 Merge branch '2.0-monorepo' of ../appium-base-driver into appium-base-driver
* '2.0-monorepo' of ../appium-base-driver: (762 commits)
  chore: prepare to merge history w/ monorepo
  chore: bump 8.0 beta to 8.0.0-beta.6
  refactor!: generalize concepts of server updater and extra method map basedriver shouldn't really know about plugins or drivers. it should just expose the ability to update the server or add methods
  chore: bump 2.0 to beta.5
  fix!: remove image element proxy check, and allow proxyRouteIsAvoided to inspect the body
  chore: bump to 8.0.0-beta.4
  fix: update plugin server adjustment to use new style
  chore: bump to 8.0.0-beta.3
  feat: allow retrieval of basedriver version from any inheriting driver
  chore: bump to 8.0.0-beta.2 since beta.1 is already published
  chore!: remove image element code since it is now handled by @appium/images-plugin
  fix: Avoid unhandled error on driver exit (#447) (#448)
  7.4.1
  fix: Avoid unhandled error on driver exit (#447)
  feat: make vendor prefix mandatory (#440)
  7.4.0
  feat: make server connection timeout configurable
  chore: bump major version
  chore: merge master into 2.0 (#441)
  chore: merge master to 2.0 branch (#438)
  ...
2021-05-17 14:44:59 -07:00
Christopher Hiller a55d313634 chore: prepare to merge history w/ monorepo 2021-05-17 14:43:40 -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 51625af447 chore: disable "exit: true" in unit test config; force color
`exit: true` is only necessary in mocha if your code doesn't clean up after itself.  this is not needed for the unit tests--haven't tested with e2e tests yet
2021-05-17 14:17:48 -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 399f3f193a fix: module/file resolution issues 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