Commit Graph
23 Commits
Author SHA1 Message Date
Jonathan Lipps 5b9a4c2ffa chore(appium): some cosmetic improvements to session and proxy naming etc 2021-11-12 22:15:06 -05: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
Kazuaki Matsuo 829eb6623d chore(base-driver): Add params to setWindowRect handler (#15974) 2021-10-17 08:07:04 +09:00
Christopher Hiller a172196d43 chore(base-driver): revert name change of TEST_HOST to DEFAULT_TEST_HOST
This would have been a breaking change if other packages depend on it, since I think it's a public API
2021-09-28 07:54:20 -07:00
Christopher Hiller cf86871d4f fix(base-driver): allow https in helper URL generation
- use constants/helpers for `jsonwp-proxy` url tests
2021-09-28 07:54:20 -07:00
Christopher Hiller 01d7c1bd7e fix(base-driver): better URL handling in driver-e2e tests
- fix a potential port-reuse issue in `getTestPort()` helper
- dedupe `127.0.0.1` constant
- export curried `createAppiumURL(address, port, session, pathname)` helper for less error-prone URL generation
- export some HTTP method names as constants
2021-09-28 07:54:20 -07:00
Christopher Hiller a3b021a0e8 chore: replace occurrences of 'localhost' with '127.0.01'; use random ports; closes #15399
- `base-driver` gets a new `helpers` module with a `getTestPort` function; this is now used throughout the tests
- `fake-driver` can't use random ports because it depends on `appium-base-driver`'s test suite, and that is _not_ the current appium-2.0-compatible `@appium/base-driver`
2021-09-28 07:54:20 -07:00
Jonathan Lipps 3e5aec945b feat(base-driver): allow drivers, and plugins to declare that certain routes must never be proxied 2021-09-16 10:13:57 -07:00
Jonathan LippsandAyan Khan 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
Kazuaki Matsuo 6b8ac24b25 chore(base-driver): remove non-W3C route which are already in W3C (#15809)
* chore: remove some mjsonwp route

* update hash
2021-09-10 14:46:54 +09:00
Kazuaki Matsuo 71e50c5619 feat(base-driver): add /se route for log (#15788)
* feat(base-driver): add /se route for log

* fix(base-driver): fix test
2021-08-30 15:11:06 +09:00
Jonathan Lipps 4f1bf3d3b8 feat(base-driver): support appium:options capability to hold all appium caps 2021-08-19 13:38:28 -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
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 25cc27d161 feat(base-driver): prefer system unzip
Backport of https://github.com/appium/appium-base-driver/pull/503 to the `2.0` branch of `appium/appium`
2021-07-22 11:04:10 -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 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 57c316378f chore(base-driver): use random port in express server tests 2021-05-18 15:47:53 -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 b864fa5310 fix(base-driver): more random ports 2021-05-18 12:57:05 -07:00
Christopher Hiller ff3c74f410 fix(base-driver): use random ports in tests 2021-05-18 12:35:54 -07:00
Christopher Hiller f5678fcc58 chore: consolidate more eslint config 2021-05-18 12:33:58 -07:00
Christopher Hiller a55d313634 chore: prepare to merge history w/ monorepo 2021-05-17 14:43:40 -07:00