From 89a3cdf7b8daaf4cbf599429e6f576fa78d1b18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Wouts?= Date: Fri, 27 Oct 2023 10:45:53 +1100 Subject: [PATCH] fix: ensure mustache docs include `@returns Promise` where appropriate --- docs/webapi/amOnPage.mustache | 2 +- docs/webapi/appendField.mustache | 2 +- docs/webapi/attachFile.mustache | 2 +- docs/webapi/blur.mustache | 1 + docs/webapi/checkOption.mustache | 2 +- docs/webapi/clearCookie.mustache | 2 +- docs/webapi/clearField.mustache | 2 +- docs/webapi/click.mustache | 2 +- docs/webapi/clickLink.mustache | 2 +- docs/webapi/closeCurrentTab.mustache | 2 +- docs/webapi/closeOtherTabs.mustache | 2 +- docs/webapi/dontSee.mustache | 2 +- docs/webapi/dontSeeCheckboxIsChecked.mustache | 2 +- docs/webapi/dontSeeCookie.mustache | 2 +- docs/webapi/dontSeeCurrentUrlEquals.mustache | 2 +- docs/webapi/dontSeeElement.mustache | 2 +- docs/webapi/dontSeeElementInDOM.mustache | 2 +- docs/webapi/dontSeeInCurrentUrl.mustache | 2 +- docs/webapi/dontSeeInField.mustache | 2 +- docs/webapi/dontSeeInSource.mustache | 2 +- docs/webapi/dontSeeInTitle.mustache | 2 +- docs/webapi/doubleClick.mustache | 2 +- docs/webapi/downloadFile.mustache | 2 +- docs/webapi/dragAndDrop.mustache | 2 +- docs/webapi/dragSlider.mustache | 2 +- docs/webapi/executeAsyncScript.mustache | 2 - docs/webapi/executeScript.mustache | 2 - docs/webapi/fillField.mustache | 2 +- docs/webapi/focus.mustache | 1 + docs/webapi/forceClick.mustache | 2 +- docs/webapi/forceRightClick.mustache | 2 +- .../grabDataFromPerformanceTiming.mustache | 2 +- docs/webapi/moveCursorTo.mustache | 2 +- docs/webapi/openNewTab.mustache | 2 +- docs/webapi/pressKey.mustache | 2 +- docs/webapi/pressKeyDown.mustache | 2 +- docs/webapi/pressKeyUp.mustache | 2 +- .../pressKeyWithKeyNormalization.mustache | 2 +- docs/webapi/refreshPage.mustache | 2 +- docs/webapi/resizeWindow.mustache | 2 +- docs/webapi/rightClick.mustache | 2 +- docs/webapi/saveElementScreenshot.mustache | 2 +- docs/webapi/saveScreenshot.mustache | 2 +- docs/webapi/say.mustache | 2 +- docs/webapi/scrollIntoView.mustache | 2 +- docs/webapi/scrollPageToBottom.mustache | 2 +- docs/webapi/scrollPageToTop.mustache | 2 +- docs/webapi/scrollTo.mustache | 2 +- docs/webapi/see.mustache | 2 +- docs/webapi/seeAttributesOnElements.mustache | 2 +- docs/webapi/seeCheckboxIsChecked.mustache | 2 +- docs/webapi/seeCookie.mustache | 2 +- .../seeCssPropertiesOnElements.mustache | 2 +- docs/webapi/seeCurrentUrlEquals.mustache | 2 +- docs/webapi/seeElement.mustache | 2 +- docs/webapi/seeElementInDOM.mustache | 2 +- docs/webapi/seeInCurrentUrl.mustache | 2 +- docs/webapi/seeInField.mustache | 2 +- docs/webapi/seeInPopup.mustache | 2 +- docs/webapi/seeInSource.mustache | 2 +- docs/webapi/seeInTitle.mustache | 2 +- docs/webapi/seeNumberOfElements.mustache | 2 +- .../seeNumberOfVisibleElements.mustache | 2 +- docs/webapi/seeTextEquals.mustache | 2 +- docs/webapi/seeTitleEquals.mustache | 2 +- docs/webapi/selectOption.mustache | 2 +- docs/webapi/setCookie.mustache | 2 +- docs/webapi/setGeoLocation.mustache | 2 +- docs/webapi/switchTo.mustache | 2 +- docs/webapi/switchToNextTab.mustache | 2 +- docs/webapi/switchToPreviousTab.mustache | 2 +- docs/webapi/type.mustache | 2 +- docs/webapi/uncheckOption.mustache | 2 +- docs/webapi/wait.mustache | 2 +- docs/webapi/waitForClickable.mustache | 2 +- docs/webapi/waitForDetached.mustache | 2 +- docs/webapi/waitForElement.mustache | 2 +- docs/webapi/waitForEnabled.mustache | 2 +- docs/webapi/waitForFunction.mustache | 2 +- docs/webapi/waitForInvisible.mustache | 2 +- docs/webapi/waitForText.mustache | 2 +- docs/webapi/waitForValue.mustache | 2 +- docs/webapi/waitForVisible.mustache | 2 +- docs/webapi/waitInUrl.mustache | 2 +- .../waitNumberOfVisibleElements.mustache | 2 +- docs/webapi/waitToHide.mustache | 2 +- docs/webapi/waitUrlEquals.mustache | 2 +- typings/tests/helpers/Appium.types.ts | 36 ++-- typings/tests/helpers/AppiumTs.types.ts | 36 ++-- typings/tests/helpers/Playwright.types.ts | 150 ++++++------- typings/tests/helpers/PlaywrightTs.types.ts | 150 ++++++------- typings/tests/helpers/WebDriverIO.types.ts | 200 +++++++++--------- 92 files changed, 371 insertions(+), 373 deletions(-) diff --git a/docs/webapi/amOnPage.mustache b/docs/webapi/amOnPage.mustache index 5bcead69a..b8f5eca1e 100644 --- a/docs/webapi/amOnPage.mustache +++ b/docs/webapi/amOnPage.mustache @@ -8,4 +8,4 @@ I.amOnPage('/login'); // opens a login page ``` @param {string} url url path or global url. -@return {void} automatically synchronized promise with recorder #! \ No newline at end of file +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/appendField.mustache b/docs/webapi/appendField.mustache index b8fa8b53d..1a034a1c6 100644 --- a/docs/webapi/appendField.mustache +++ b/docs/webapi/appendField.mustache @@ -8,4 +8,4 @@ I.appendField('password', secret('123456')); ``` @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator @param {string} value text value to append. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/attachFile.mustache b/docs/webapi/attachFile.mustache index a547c2a93..b577685bc 100644 --- a/docs/webapi/attachFile.mustache +++ b/docs/webapi/attachFile.mustache @@ -9,4 +9,4 @@ I.attachFile('form input[name=avatar]', 'data/avatar.jpg'); @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator. @param {string} pathToFile local file path relative to codecept.conf.ts or codecept.conf.js config file. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/blur.mustache b/docs/webapi/blur.mustache index 63ff6b6a4..a6350b4aa 100644 --- a/docs/webapi/blur.mustache +++ b/docs/webapi/blur.mustache @@ -15,3 +15,4 @@ I.dontSee('#add-to-cart-btn'); @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator. @param {any} [options] Playwright only: [Additional options](https://playwright.dev/docs/api/class-locator#locator-blur) for available options object as 2nd argument. +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/checkOption.mustache b/docs/webapi/checkOption.mustache index ece962fa0..b9172126e 100644 --- a/docs/webapi/checkOption.mustache +++ b/docs/webapi/checkOption.mustache @@ -10,4 +10,4 @@ I.checkOption('agree', '//form'); ``` @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator. @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/clearCookie.mustache b/docs/webapi/clearCookie.mustache index 830366b89..db72de31e 100644 --- a/docs/webapi/clearCookie.mustache +++ b/docs/webapi/clearCookie.mustache @@ -7,4 +7,4 @@ I.clearCookie('test'); ``` @param {?string} [cookie=null] (optional, `null` by default) cookie name -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/clearField.mustache b/docs/webapi/clearField.mustache index b9c7f617d..6c58fa0b9 100644 --- a/docs/webapi/clearField.mustache +++ b/docs/webapi/clearField.mustache @@ -6,4 +6,4 @@ I.clearField('user[email]'); I.clearField('#email'); ``` @param {LocatorOrString} editable field located by label|name|CSS|XPath|strict locator. -⚠️ returns a _promise_ which is synchronized internally by recorder. +@returns {Promise} automatically synchronized promise through #recorder. diff --git a/docs/webapi/click.mustache b/docs/webapi/click.mustache index 5970384bf..6a74a94b4 100644 --- a/docs/webapi/click.mustache +++ b/docs/webapi/click.mustache @@ -22,4 +22,4 @@ I.click({css: 'nav a.login'}); @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator. @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/clickLink.mustache b/docs/webapi/clickLink.mustache index 4542dece3..a46251bcd 100644 --- a/docs/webapi/clickLink.mustache +++ b/docs/webapi/clickLink.mustache @@ -5,4 +5,4 @@ I.clickLink('Logout', '#nav'); ``` @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/closeCurrentTab.mustache b/docs/webapi/closeCurrentTab.mustache index 02d91b2b6..98ab64ede 100644 --- a/docs/webapi/closeCurrentTab.mustache +++ b/docs/webapi/closeCurrentTab.mustache @@ -4,4 +4,4 @@ Close current tab. I.closeCurrentTab(); ``` -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/closeOtherTabs.mustache b/docs/webapi/closeOtherTabs.mustache index 24cb916a8..7140c75a6 100644 --- a/docs/webapi/closeOtherTabs.mustache +++ b/docs/webapi/closeOtherTabs.mustache @@ -5,4 +5,4 @@ Close all tabs except for the current one. I.closeOtherTabs(); ``` -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/dontSee.mustache b/docs/webapi/dontSee.mustache index 852cbd979..5382087d9 100644 --- a/docs/webapi/dontSee.mustache +++ b/docs/webapi/dontSee.mustache @@ -8,4 +8,4 @@ I.dontSee('Login', '.nav'); // no login inside .nav element @param {string} text which is not present. @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/dontSeeCheckboxIsChecked.mustache b/docs/webapi/dontSeeCheckboxIsChecked.mustache index 6bce36312..a85716b49 100644 --- a/docs/webapi/dontSeeCheckboxIsChecked.mustache +++ b/docs/webapi/dontSeeCheckboxIsChecked.mustache @@ -7,4 +7,4 @@ I.dontSeeCheckboxIsChecked('agree'); // located by name ``` @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/dontSeeCookie.mustache b/docs/webapi/dontSeeCookie.mustache index 66216934c..c9d46dc17 100644 --- a/docs/webapi/dontSeeCookie.mustache +++ b/docs/webapi/dontSeeCookie.mustache @@ -5,4 +5,4 @@ I.dontSeeCookie('auth'); // no auth cookie ``` @param {string} name cookie name. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/dontSeeCurrentUrlEquals.mustache b/docs/webapi/dontSeeCurrentUrlEquals.mustache index c06ab60a1..1f3b8fd5b 100644 --- a/docs/webapi/dontSeeCurrentUrlEquals.mustache +++ b/docs/webapi/dontSeeCurrentUrlEquals.mustache @@ -7,4 +7,4 @@ I.dontSeeCurrentUrlEquals('http://mysite.com/login'); // absolute urls are also ``` @param {string} url value to check. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/dontSeeElement.mustache b/docs/webapi/dontSeeElement.mustache index 0de933027..a335a3c8a 100644 --- a/docs/webapi/dontSeeElement.mustache +++ b/docs/webapi/dontSeeElement.mustache @@ -5,4 +5,4 @@ I.dontSeeElement('.modal'); // modal is not shown ``` @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/dontSeeElementInDOM.mustache b/docs/webapi/dontSeeElementInDOM.mustache index 56c3888a6..ca1c2d28a 100644 --- a/docs/webapi/dontSeeElementInDOM.mustache +++ b/docs/webapi/dontSeeElementInDOM.mustache @@ -5,4 +5,4 @@ I.dontSeeElementInDOM('.nav'); // checks that element is not on page visible or ``` @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/dontSeeInCurrentUrl.mustache b/docs/webapi/dontSeeInCurrentUrl.mustache index f8256bc32..7bc4c2cfc 100644 --- a/docs/webapi/dontSeeInCurrentUrl.mustache +++ b/docs/webapi/dontSeeInCurrentUrl.mustache @@ -1,4 +1,4 @@ Checks that current url does not contain a provided fragment. @param {string} url value to check. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/dontSeeInField.mustache b/docs/webapi/dontSeeInField.mustache index abfa14130..7974e0ec5 100644 --- a/docs/webapi/dontSeeInField.mustache +++ b/docs/webapi/dontSeeInField.mustache @@ -8,4 +8,4 @@ I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator. @param {CodeceptJS.StringOrSecret} value value to check. -⚠️ returns a _promise_ which is synchronized internally by recorder +@returns {Promise} automatically synchronized promise through #recorder diff --git a/docs/webapi/dontSeeInSource.mustache b/docs/webapi/dontSeeInSource.mustache index 9e018f080..e4b1e65a5 100644 --- a/docs/webapi/dontSeeInSource.mustache +++ b/docs/webapi/dontSeeInSource.mustache @@ -5,4 +5,4 @@ I.dontSeeInSource('