Skip to content

Commit

Permalink
Appium: Fix TS defition of switchToNative() (codeceptjs#3265)
Browse files Browse the repository at this point in the history
Co-authored-by: Jaromir Obr <[email protected]>
  • Loading branch information
mirao and Jaromir Obr authored Mar 2, 2022
1 parent 04e6c83 commit 6fa4a62
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/helpers/Appium.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ I.switchToNative('SOME_OTHER_CONTEXT');

#### Parameters

- `context` **any** (optional, default `null`)
- `context` **any?** (optional, default `null`)

Returns **[Promise][4]&lt;void>**

Expand Down
2 changes: 1 addition & 1 deletion lib/helper/Appium.js
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ class Appium extends Webdriver {
* // or set context explicitly
* I.switchToNative('SOME_OTHER_CONTEXT');
* ```
* @param {*} context
* @param {*} [context]
* @return {Promise<void>}
*/
async switchToNative(context = null) {
Expand Down
1 change: 1 addition & 0 deletions typings/tests/helpers/Appium.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ appium.grabOrientation(); // $ExpectType Promise<string>
appium.grabSettings(); // $ExpectType Promise<string>
appium._switchToContext(str_ap); // $ExpectType Promise<any>
appium.switchToWeb(); // $ExpectType Promise<void>
appium.switchToNative(); // $ExpectType Promise<void>
appium.switchToNative(str_ap); // $ExpectType Promise<void>
appium.startActivity(); // $ExpectType Promise<void>
appium.setNetworkConnection(); // $ExpectType Promise<{}>
Expand Down

0 comments on commit 6fa4a62

Please sign in to comment.