Skip to content

Commit 0d1d86b

Browse files
authored
fix(typings): scrollintoview complains scrollintoviewoptions (#4067)
1 parent cba856c commit 0d1d86b

File tree

6 files changed

+6
-3
lines changed

6 files changed

+6
-3
lines changed

docs/helpers/Appium.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "cent
11711171
#### Parameters
11721172

11731173
- `locator` **([string][5] \| [object][11])** located by CSS|XPath|strict locator.
1174-
- `scrollIntoViewOptions` **ScrollIntoViewOptions** see [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][17].
1174+
- `scrollIntoViewOptions` **(ScrollIntoViewOptions | [boolean][7])** either alignToTop=true|false or scrollIntoViewOptions. See [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][17].
11751175

11761176
Returns **void** automatically synchronized promise through #recorderSupported only for web testing
11771177

docs/helpers/WebDriver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "cent
16391639
#### Parameters
16401640
16411641
- `locator` **([string][17] | [object][16])** located by CSS|XPath|strict locator.
1642-
- `scrollIntoViewOptions` **ScrollIntoViewOptions** see [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][33].
1642+
- `scrollIntoViewOptions` **(ScrollIntoViewOptions | [boolean][32])** either alignToTop=true|false or scrollIntoViewOptions. See [https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView][33].
16431643
16441644
Returns **void** automatically synchronized promise through #recorder
16451645

docs/webapi/scrollIntoView.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "cent
77
```
88

99
@param {LocatorOrString} locator located by CSS|XPath|strict locator.
10-
@param {ScrollIntoViewOptions} scrollIntoViewOptions see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
10+
@param {ScrollIntoViewOptions|boolean} scrollIntoViewOptions either alignToTop=true|false or scrollIntoViewOptions. See https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
1111
@returns {void} automatically synchronized promise through #recorder

typings/tests/helpers/Appium.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ appium.grabValueFromAll(str); // $ExpectType Promise<string[]>
8484
appium.grabValueFrom(str); // $ExpectType Promise<string>
8585
appium.saveScreenshot(str); // $ExpectType Promise<void>
8686
appium.scrollIntoView(str, {}); // $ExpectType void
87+
appium.scrollIntoView(str, true); // $ExpectType void
8788
appium.seeCheckboxIsChecked(str); // $ExpectType void
8889
appium.seeElement(str); // $ExpectType void
8990
appium.seeInField(str, str); // $ExpectType void

typings/tests/helpers/AppiumTs.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ appium.grabValueFromAll(str); // $ExpectType Promise<string[]>
8484
appium.grabValueFrom(str); // $ExpectType Promise<string>
8585
appium.saveScreenshot(str); // $ExpectType Promise<void>
8686
appium.scrollIntoView(str, {}); // $ExpectType Promise<any>
87+
appium.scrollIntoView(str, true); // $ExpectType Promise<any>
8788
appium.seeCheckboxIsChecked(str); // $ExpectType Promise<any>
8889
appium.seeElement(str); // $ExpectType Promise<any>
8990
appium.seeInField(str, str); // $ExpectType Promise<any>

typings/tests/helpers/WebDriverIO.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ wd.executeAsyncScript(() => {}, {}); // $ExpectType Promise<any>
254254

255255
wd.scrollIntoView(); // $ExpectError
256256
wd.scrollIntoView('div'); // $ExpectError
257+
wd.scrollIntoView('div', true);
257258
wd.scrollIntoView('div', { behavior: 'auto', block: 'center', inline: 'center' });
258259

259260
wd.scrollTo(); // $ExpectError

0 commit comments

Comments
 (0)