Commit Graph

16 Commits

Author SHA1 Message Date
Kazuaki Matsuo 6ea0830319 fix(base-driver): add * always for non-separator for backward compatibility (#20821)
* fix(base-driver): add * always for non-separator for backward compatibility

* simplify

* revert const

* add todo comment

* revert const
2024-12-05 11:49:55 -08:00
Mykola Mokhnach 942057d26c feat(base-driver): Allow to prefix feature names with automation names (#20793) 2024-12-02 10:51:41 +01:00
Mykola Mokhnach 9aa9807b90 chore(driver-test-support): Remove stoppable utils (#20791) 2024-11-29 21:30:34 +01:00
Mykola Mokhnach 16015de1b5 chore(driver-test-support): Bump chai and chai-as-promised (#20344) 2024-07-08 22:56:16 +02:00
Kazuaki Matsuo 0363aab8ba feat(appium): Add session signature to all logs (#20202) (#20214)
* feat(appium): Add session signature to all logs (#20202) (#20214)

* test(logger): add tests for unleakString (#20222)

---------

Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
Co-authored-by: Edgars Eglītis <37242620+eglitise@users.noreply.github.com>
2024-06-07 13:13:39 -07:00
Kazuaki Matsuo 40def9dbdb fix(appium): Revert changes in 20203 and 20202 (#20209)
* Revert "feat(appium): Add session signature to all logs (#20202)"

This reverts commit b3f8a47c2d.

* Revert "feat(logger): Add the 'debug' level to the default logger (#20203)"

This reverts commit 7fd9d5f626.
2024-06-06 16:17:57 -07:00
Mykola Mokhnach b3f8a47c2d feat(appium): Add session signature to all logs (#20202) 2024-06-06 22:46:52 +02: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
Mykola Mokhnach dfae94e7f3 ci: Remove v14 from the test matrix and add v20 (#18679) 2023-05-25 22:46:03 +02:00
Christopher Hiller 3c9fa7ba73 fix(appium,types,base-driver,fake-driver,driver-test-support): normalize constraint defaults
Another handful of fixes.

- remove second "extra" parameter from `Capabilities`, `NSCapabilities` `W3CCapabilities`. we were not using it anywhere to my knowledge. it was an escape hatch anyway.
- never assign `BaseDriverCapConstraints` as the default constraints, because this is confusing as hell. instead, drivers should use the `*DriverCaps` types which automatically pulls the base constraints in. applied across several workspaces
- renamed `DeviceSettings` => `IDeviceSettings` because `DeviceSettings` is a class.
- the session ID param of `Core`'s `sessionExists()` is actually optional (per the implementation)
- allow some modicum of type narrowing at the class level around settings and values returned by `ISessionHandler`'s methods. also, not all values in the raw settings object are of the same type `T`, so fix that
- `server`, `serverHost`, `serverPort` and `serverPath` are not members of `Core` (using `AppiumDriver` as a litmus test--it interacts with `Driver` types but does not have these properties itself)
- changed a few types to interfaces where possible
- moved a lost comment
- further dumbed-down the logdef stuff
- `Driver.driverData` is _always_ defined, since `Core` makes it an empty array.
- `DriverOpts` no longer contains "partial" caps; this it not quite right as the caps are not assigned until a session is created, but there's a conflict between some props which are _both_ server args and defined in constraints.  anyway, this is what `initialOpts` is for
- fix some type disagreements in basedriver's "capabilities" module
2023-03-27 17:07:51 -07:00
Christopher Hiller 843b797750 chore(driver-test-support): fix broken types in some e2e tests 2023-03-02 15:01:13 -08:00
Christopher Hiller 893bd888cf feat(driver-test-support): add startStoppableAppium()
This adds a function `startStoppableAppium()` which starts an Appium server (via its `main()` entry point), but resolves with an object having a `stop() => Promise<boolean>` method. This method force-quits the server, even if there are active connections.
2023-02-17 11:02:44 -08:00
Christopher Hiller c5451e4d82 fix(base-driver,driver-test-support,support): update types for axios@1.2.3 2023-01-23 18:24:25 -08:00
Christopher Hiller b20d0b82a2 chore(appium,base-driver,driver-test-support,types): overhaul types for constraints and caps
The big idea here is:

1. `desiredCapConstraints` should always contain the constraints _for that driver_; it no longer contains the "base" constraints. This is the only thing that really required any logic changes (though they are somewhat spread out).  The "merged" constraints object is available via `_desiredCapConstraints`.
2. `Capabilities` and W3C-style `W3CCapabilities` are now _derived from_ constraints.  This absolves us (and extension authors) from needing to create an interface describing their capabilities.
3. Changes to caps and constraints now reflect in `DriverOpts` (`this.opts`) in drivers
4. `caps` and `originalCaps` declarations have moved from `Core` to `Driver`
5. TypeScript compiles the JS output from `@appium/types` (which is just a static "constraints" object)

Resolves #17518
2022-10-06 15:30:22 -07:00
Christopher Hiller d14a0c5c0b chore(): add RouteMatcher type
Replaces the bare tuple `[string, RegExp]` with a named type.  Used by `Driver.getProxyAvoidList()`

Narrows the type def to only allow known HTTP methods as the first item in the tuple.
2022-08-23 13:50:11 -07:00
Christopher Hiller 41289724dc feat(driver-test-support): create package
This package contains driver-specific test utilities extracted from `@appium/base-driver` by way of `@appium/test-support`
2022-08-23 13:42:47 -07:00