Commit Graph

1482 Commits

Author SHA1 Message Date
Jonathan Lipps
ec57ff4c2a chore: publish
- appium@2.0.1
 - @appium/base-driver@9.3.16
 - @appium/base-plugin@2.2.16
 - @appium/doctor@2.0.22
 - @appium/docutils@0.4.5
 - @appium/driver-test-support@0.4.11
 - @appium/execute-driver-plugin@3.0.15
 - @appium/fake-plugin@3.1.20
 - @appium/plugin-test-support@0.3.19
 - @appium/support@4.1.3
 - @appium/test-support@3.0.21
2023-07-24 11:13:17 -07:00
Jonathan Lipps
803660ca29 test(appium): add explicit check in new command timeout test that session list is empty 2023-07-24 10:54:26 -07:00
Jonathan Lipps
41836a4a7b fix(appium): ensure plugin commands reset newCommandTimeout 2023-07-24 10:54:26 -07:00
Mykola Mokhnach
ff62e208d9 chore(appium): Improve the error message in case of invalid session capabilities (#18877) 2023-07-15 11:57:38 +02:00
Kazuaki Matsuo
6e752b03de docs(appium): Remove @next (#18876) 2023-07-14 12:27:59 -07:00
Mykola Mokhnach
75650a6b74 fix(base-driver): Use proper cached headers for app download (#18874) 2023-07-14 19:59:12 +02:00
renovate[bot]
e5b569c3a0 fix(test-support): update dependency sinon to v15.1.2 2023-07-11 11:34:38 +00:00
renovate[bot]
b9151a573b fix(execute-driver-plugin): update dependency webdriverio to v7.32.0 2023-07-11 07:50:54 +00:00
Christian Bromann
5e479eadbe docs(appium): update JS quickstart example (#18852) 2023-07-06 22:32:14 -07:00
Edgars Eglītis
7cd52db673 docs(appium): update Appium Desktop part in migration guide (#18846) 2023-07-06 12:34:57 -07:00
renovate[bot]
151c19c1c3 fix(support): update dependency teen_process to v2.0.4 2023-07-05 20:22:38 +00:00
Jonathan Lipps
87214fd757 chore(appium): publish appium 2 2023-07-05 08:46:11 -07:00
Jonathan Lipps
3fa73a1d1a chore(appium): remove rc tag from appium 2 2023-07-05 08:39:07 -07:00
Jonathan Lipps
1ab323b525 chore(appium): promote appium npm tag to latest 2023-07-05 08:37:43 -07:00
renovate[bot]
b8e1f38455 chore(docutils): update dependency mkdocs-material to v9.1.18 2023-07-05 10:47:29 +00:00
Christopher Hiller
8a6a4ba7e7 chore: publish
- appium@2.0.0-rc.5
 - @appium/base-driver@9.3.15
 - @appium/base-plugin@2.2.15
 - @appium/doctor@2.0.21
 - @appium/docutils@0.4.4
 - @appium/driver-test-support@0.4.10
 - @appium/eslint-config-appium@8.0.4
 - @appium/fake-driver@5.2.6
 - @appium/fake-plugin@3.1.19
 - @appium/plugin-test-support@0.3.18
 - @appium/schema@0.3.1
 - @appium/support@4.1.2
 - @appium/test-support@3.0.20
 - @appium/types@0.13.2
2023-07-03 13:18:58 -07:00
Christopher Hiller
52b646c65b chore(typedoc-plugin-appium): update snapshots 2023-07-03 13:10:51 -07:00
Christopher Hiller
2b351705d4 fix(base-driver): pass thru all type args to ExternalDriver
- `core` module is now TS
- `constants` module is now TS
- export missing `W3C_ELEMENT_KEY`
- `JWProxy.command` returns `Promise<unknown>`.  deal with it
- updated some type tests
2023-07-03 13:10:51 -07:00
Christopher Hiller
c13333bb97 fix(appium): type fixes for ts v5 2023-07-03 13:10:51 -07:00
Christopher Hiller
62f4244753 fix(types): update some more types to reflect reality
- added a `Protocol` type for some string constants
- `proxyRouteIsAvoided` optionally accepts a `body` arg
- `Core<C>.driverForSession` does not actually return something using type `C`.
- `ExternalDriver` passes thru all type args to `Driver`. this should be non-breaking
- `StringRecord` is more appropriate type for default driver settings
- `Constraints` should be readonly
2023-07-03 13:10:51 -07:00
Christopher Hiller
26eb766a79 chore(base-driver): actually run type tests 2023-07-03 13:10:51 -07:00
Christopher Hiller
679865ed2f fix(eslint-config-appium): remove prototype assignment warning 2023-07-03 13:10:51 -07:00
Christopher Hiller
d6cca5175c fix(types): separate the type of opts from initialOpts
A thing we know about the `opts` object passed in to a driver constructor is that it does _not_ contain caps.  This value is retained in `this.initialOpts`.  Upon session creation, it _does_ contain caps.

This adds a new type, `InitialOpts`, which is the first parameter to a driver.  In the future, it may accept a type argument, as currently any extension-specific options (defined via schema in `package.json`) are not typed.

Because `DriverOpts` is a superset of `InitialOpts`, this should not be a breaking change.
2023-07-03 13:10:51 -07:00
Christopher Hiller
3d614d6d41 fix(base-driver): allow subclass to define shape of settings object
The mixin approach prevented subclasses of BaseDriver from narrowing the type of `this.settings`.  Now, that's possible.

Also:
- removed an unused type argument from BD constructor
- and did some typedef aliasing
- remove unneeded type assertion from log mixin
2023-07-03 13:10:51 -07:00
Christopher Hiller
ee9b2a30de fix(types): ensure return type of deleteSession can always be void
a type aliased to `void` is not the same as returning `void`, apparently.  this might be fixed in newer TS versions
2023-07-03 13:10:51 -07:00
Christopher Hiller
e30ad0e88c chore(appium,types): remove some useless type arguments 2023-07-03 13:10:51 -07:00
Christopher Hiller
01061b2919 fix(types,base-driver): remove deviceName from base constraints
This cap was conflicting with constraints defined in subclasses.  Currently, it isn't possible to cleanly "override" constraints.  Given `deviceName` is not used anywhere within base-driver's source, this seems like a decent workaround for now.
2023-07-03 13:10:51 -07:00
Christopher Hiller
24e7aeca7d fix(types): fix signature of updateSettings 2023-07-03 13:10:51 -07:00
renovate[bot]
ed1856d720 fix(support): update dependency semver to v7.5.3 2023-07-01 16:31:57 +00:00
renovate[bot]
fdd2ac098d fix(doctor): update dependency appium-adb to v9.11.7 2023-07-01 10:44:15 +00:00
renovate[bot]
3906f7d1ca chore(docutils): update dependency mkdocs-material to v9.1.17 2023-06-30 22:01:32 +00:00
Christopher Hiller
f09fbb64dc fix(appium): restrict address to ipv6/hostname (#18824)
This resolves #18716.

For whatever reason, `json-schema-to-typescript` needed `"type": "string"` in there.  See https://github.com/bcherny/json-schema-to-typescript/issues/528 for further discussion
2023-06-30 13:33:34 -07:00
Mykola Mokhnach
97fe159276 chore(appium): Improve the error message on config load error (#18829) 2023-06-30 20:35:17 +02:00
Christopher Hiller
81256f8f90 chore(types): fix clean command 2023-06-29 17:09:25 -07:00
Christopher Hiller
0bbb25dfb4 chore(base-driver,driver-test-support): do not run basedriver e2e tests in parallel
also: rewrote event timings tests due to it being unclear which assertion actually failed. one assertion per test.
2023-06-29 17:09:25 -07:00
Jonathan Lipps
58b71869d1 chore: publish
- appium@2.0.0-rc.4
 - @appium/base-driver@9.3.14
 - @appium/base-plugin@2.2.14
 - @appium/doctor@2.0.20
 - @appium/docutils@0.4.3
 - @appium/driver-test-support@0.4.9
 - @appium/fake-plugin@3.1.18
 - @appium/plugin-test-support@0.3.17
 - @appium/support@4.1.1
 - @appium/test-support@3.0.19
 - @appium/types@0.13.1
2023-06-29 11:17:15 -07:00
renovate[bot]
08a1f1be94 chore(deps): update definitelytyped 2023-06-28 10:12:12 +00:00
Kazuaki Matsuo
52a755a913 fix(docutils): docs versioning and update latest (#18804)
* fix: docs versioning and update latest

* fix lint
2023-06-27 21:13:12 -07:00
Mykola Mokhnach
35e0012d8a chore(appium): Use the actual server address in the logged URL (#18809) 2023-06-27 12:59:55 +02:00
Jonathan Lipps
ed20e00754 chore: publish
- appium@2.0.0-rc.3
 - @appium/base-driver@9.3.13
 - @appium/base-plugin@2.2.13
 - @appium/doctor@2.0.19
 - @appium/docutils@0.4.2
 - @appium/driver-test-support@0.4.8
 - @appium/fake-driver@5.2.5
 - @appium/fake-plugin@3.1.17
 - @appium/plugin-test-support@0.3.16
 - @appium/support@4.1.0
 - @appium/test-support@3.0.18
 - @appium/types@0.13.0
2023-06-15 13:57:59 -07:00
Jonathan Lipps
1a5b8cca2d fix(docutils): set mike version to major.minor by default (#18770)
* fix(docutils): set mike version to major.minor by default

* Update packages/docutils/lib/builder/deploy.ts

Co-authored-by: Christopher Hiller <boneskull@boneskull.com>

---------

Co-authored-by: Christopher Hiller <boneskull@boneskull.com>
2023-06-15 10:19:05 -07:00
Christopher Hiller
7dbf6f2cd3 chore(typedoc-plugin-appium): update snapshots 2023-06-14 16:21:51 -07:00
Christopher Hiller
84c49b1529 chore(support): fix module paths in some tests 2023-06-14 16:21:51 -07:00
Christopher Hiller
81bc527be6 fix(types): various fixes for reality
- because BaseDriver implements `findElOrEls` (technically), any subclasses must not inherit an interface containing a non-identical `findElOrEls` -- not even narrowing.  so to avoid this, we will need to make it as broad as possible; no more generic `Ctx`
- likewise with `getLog`
- fix return type of `setGeoLocation`
- fix return type of `getPerformanceData`
- fix return type of `removeApp`
- fix return type of `hideKeyboard`
- fix return type of `getSystemBars`
- fix signature of various `touch*` methods
- fix return type of `setNetworkConnection`

alternatively, the deprecated methods mentioned here should be removed.
2023-06-14 16:21:51 -07:00
Christopher Hiller
2e909478e9 chore(types): remove unused interfaces
Both `StartScreenRecordOptions` and `StopScreenRecordOptions` are for deprecated core APIs and are defined individually by drivers
2023-06-14 16:21:51 -07:00
Christopher Hiller
00ae1625d7 fix(types,fake-driver): getLog doesn't necessarily return an array 2023-06-14 16:21:51 -07:00
Christopher Hiller
88293f8039 feat(support): export a bunch of types that weren't properly exported 2023-06-14 16:21:51 -07:00
Christopher Hiller
54a4a8da03 fix(base-driver): update def of findElOrEls and findElOrElsWithProcessing
- adds some types to the `Proxy` class
- make `isErrorType()` a proper type guard
2023-06-14 16:21:51 -07:00
Christopher Hiller
598b255e8d fix(fake-driver): update definition of findElOrEls 2023-06-14 16:21:51 -07:00
Christopher Hiller
63a5c22127 fix(types)!: use overload instead of broken conditional type in findElOrEls
BREAKING CHANGE: This changes the def of `findElOrEls` and `findElOrElsWithProcessing` in `ExternalDriver` in a breaking manner.

So conditional types don't work like how I was using them.  They work in capital-T-types (`type`), but they don't work as return values.  Instead, what we should have is an overload.  in this case, the function can be called one of two ways, and it returns a different thing depending on those values.  _unfortunately_ this is a little hinky to implement, given that overloads are unsupported in _object literals_.  they are supported in function statements or expressions, and they are supported in class definitions, but not object literals.  you'll see what needs to happen to make this work in `FakeDriver` and `BaseDriver` in subsequent changesets; essentially the function must be defined outside of the object literal and then stuffed in there.

The other change here changes an `object` type (which does not allow arbitrary properties) to a `StringRecord` type within the type which converts `Constraints` to `Capabilities`.  This affects caps for some drivers such as `chromedriverArgs` in `appium-android-driver`; anywhere where the constraint has `isObject: true`.
2023-06-14 16:21:51 -07:00