codeceptjs 3.5.7 → 3.5.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/docs/build/Appium.js +27 -22
- package/docs/build/Nightmare.js +51 -52
- package/docs/build/Playwright.js +75 -75
- package/docs/build/Protractor.js +64 -65
- package/docs/build/Puppeteer.js +74 -75
- package/docs/build/TestCafe.js +54 -55
- package/docs/build/WebDriver.js +79 -80
- package/docs/changelog.md +1 -562
- package/docs/community-helpers.md +4 -8
- package/docs/examples.md +2 -8
- package/docs/helpers/Appium.md +85 -83
- package/docs/helpers/Nightmare.md +75 -77
- package/docs/helpers/Playwright.md +175 -177
- package/docs/helpers/Protractor.md +153 -155
- package/docs/helpers/Puppeteer.md +146 -148
- package/docs/helpers/TestCafe.md +124 -126
- package/docs/helpers/WebDriver.md +155 -157
- package/docs/webapi/amOnPage.mustache +1 -1
- package/docs/webapi/appendField.mustache +1 -1
- package/docs/webapi/attachFile.mustache +1 -1
- package/docs/webapi/blur.mustache +1 -1
- package/docs/webapi/checkOption.mustache +1 -1
- package/docs/webapi/clearCookie.mustache +1 -2
- package/docs/webapi/clearField.mustache +1 -1
- package/docs/webapi/click.mustache +1 -1
- package/docs/webapi/clickLink.mustache +1 -1
- package/docs/webapi/closeCurrentTab.mustache +1 -1
- package/docs/webapi/closeOtherTabs.mustache +1 -1
- package/docs/webapi/dontSee.mustache +1 -1
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/dontSeeCookie.mustache +1 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/dontSeeElement.mustache +1 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
- package/docs/webapi/dontSeeInField.mustache +1 -1
- package/docs/webapi/dontSeeInSource.mustache +1 -1
- package/docs/webapi/dontSeeInTitle.mustache +1 -1
- package/docs/webapi/doubleClick.mustache +1 -1
- package/docs/webapi/downloadFile.mustache +1 -1
- package/docs/webapi/dragAndDrop.mustache +1 -1
- package/docs/webapi/dragSlider.mustache +1 -1
- package/docs/webapi/fillField.mustache +1 -1
- package/docs/webapi/focus.mustache +1 -1
- package/docs/webapi/forceClick.mustache +1 -1
- package/docs/webapi/forceRightClick.mustache +1 -1
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +1 -1
- package/docs/webapi/moveCursorTo.mustache +1 -1
- package/docs/webapi/openNewTab.mustache +1 -1
- package/docs/webapi/pressKey.mustache +1 -1
- package/docs/webapi/pressKeyDown.mustache +1 -1
- package/docs/webapi/pressKeyUp.mustache +1 -1
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
- package/docs/webapi/refreshPage.mustache +1 -1
- package/docs/webapi/resizeWindow.mustache +1 -1
- package/docs/webapi/rightClick.mustache +1 -1
- package/docs/webapi/saveElementScreenshot.mustache +1 -1
- package/docs/webapi/saveScreenshot.mustache +1 -1
- package/docs/webapi/say.mustache +1 -1
- package/docs/webapi/scrollIntoView.mustache +1 -1
- package/docs/webapi/scrollPageToBottom.mustache +1 -1
- package/docs/webapi/scrollPageToTop.mustache +1 -1
- package/docs/webapi/scrollTo.mustache +1 -1
- package/docs/webapi/see.mustache +1 -1
- package/docs/webapi/seeAttributesOnElements.mustache +1 -1
- package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
- package/docs/webapi/seeCookie.mustache +1 -1
- package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
- package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/seeElement.mustache +1 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -1
- package/docs/webapi/seeInCurrentUrl.mustache +1 -1
- package/docs/webapi/seeInField.mustache +1 -1
- package/docs/webapi/seeInPopup.mustache +1 -1
- package/docs/webapi/seeInSource.mustache +1 -1
- package/docs/webapi/seeInTitle.mustache +1 -1
- package/docs/webapi/seeNumberOfElements.mustache +1 -1
- package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/seeTextEquals.mustache +1 -1
- package/docs/webapi/seeTitleEquals.mustache +1 -1
- package/docs/webapi/selectOption.mustache +1 -1
- package/docs/webapi/setCookie.mustache +1 -1
- package/docs/webapi/setGeoLocation.mustache +1 -1
- package/docs/webapi/switchTo.mustache +1 -1
- package/docs/webapi/switchToNextTab.mustache +1 -1
- package/docs/webapi/switchToPreviousTab.mustache +1 -1
- package/docs/webapi/type.mustache +1 -1
- package/docs/webapi/uncheckOption.mustache +1 -1
- package/docs/webapi/wait.mustache +1 -1
- package/docs/webapi/waitForClickable.mustache +1 -1
- package/docs/webapi/waitForDetached.mustache +1 -1
- package/docs/webapi/waitForElement.mustache +1 -1
- package/docs/webapi/waitForEnabled.mustache +1 -1
- package/docs/webapi/waitForFunction.mustache +1 -1
- package/docs/webapi/waitForInvisible.mustache +1 -1
- package/docs/webapi/waitForText.mustache +1 -1
- package/docs/webapi/waitForValue.mustache +1 -1
- package/docs/webapi/waitForVisible.mustache +1 -1
- package/docs/webapi/waitInUrl.mustache +1 -1
- package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
- package/docs/webapi/waitToHide.mustache +1 -1
- package/docs/webapi/waitUrlEquals.mustache +1 -1
- package/lib/helper/Appium.js +9 -4
- package/lib/helper/Playwright.js +3 -2
- package/package.json +5 -5
- package/typings/promiseBasedTypes.d.ts +423 -1010
- package/typings/types.d.ts +423 -427
|
@@ -7,4 +7,4 @@ I.waitForVisible('#popup');
|
|
|
7
7
|
|
|
8
8
|
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
9
9
|
@param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
10
|
-
@returns {
|
|
10
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -6,4 +6,4 @@ I.waitInUrl('/info', 2);
|
|
|
6
6
|
|
|
7
7
|
@param {string} urlPart value to check.
|
|
8
8
|
@param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
9
|
-
@returns {
|
|
9
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -7,4 +7,4 @@ I.waitNumberOfVisibleElements('a', 3);
|
|
|
7
7
|
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
8
8
|
@param {number} num number of elements.
|
|
9
9
|
@param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
10
|
-
@returns {
|
|
10
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -7,4 +7,4 @@ I.waitToHide('#popup');
|
|
|
7
7
|
|
|
8
8
|
@param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
9
9
|
@param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
10
|
-
@returns {
|
|
10
|
+
@returns {void} automatically synchronized promise through #recorder
|
|
@@ -7,4 +7,4 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
|
|
|
7
7
|
|
|
8
8
|
@param {string} urlPart value to check.
|
|
9
9
|
@param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
10
|
-
@returns {
|
|
10
|
+
@returns {void} automatically synchronized promise through #recorder
|
package/lib/helper/Appium.js
CHANGED
|
@@ -183,7 +183,11 @@ class Appium extends Webdriver {
|
|
|
183
183
|
this.axios = axios.create();
|
|
184
184
|
|
|
185
185
|
webdriverio = require('webdriverio');
|
|
186
|
-
|
|
186
|
+
if (!config.appiumV2) {
|
|
187
|
+
console.log('The Appium core team does not maintain Appium 1.x anymore since the 1st of January 2022. Please migrating to Appium 2.x by adding appiumV2: true to your config.');
|
|
188
|
+
console.log('More info: https://bit.ly/appium-v2-migration');
|
|
189
|
+
console.log('This Appium 1.x support will be removed in next major release.');
|
|
190
|
+
}
|
|
187
191
|
}
|
|
188
192
|
|
|
189
193
|
_validateConfig(config) {
|
|
@@ -917,11 +921,12 @@ class Appium extends Webdriver {
|
|
|
917
921
|
* I.setNetworkConnection(4) // airplane mode off, wifi off, data on
|
|
918
922
|
* I.setNetworkConnection(6) // airplane mode off, wifi on, data on
|
|
919
923
|
* ```
|
|
920
|
-
* See corresponding [webdriverio reference](
|
|
921
|
-
*
|
|
922
|
-
* @return {Promise<{}>}
|
|
924
|
+
* See corresponding [webdriverio reference](https://webdriver.io/docs/api/chromium/#setnetworkconnection).
|
|
923
925
|
*
|
|
924
926
|
* Appium: support only Android
|
|
927
|
+
*
|
|
928
|
+
* @param {number} value The network connection mode bitmask
|
|
929
|
+
* @return {Promise<number>}
|
|
925
930
|
*/
|
|
926
931
|
async setNetworkConnection(value) {
|
|
927
932
|
onlyForApps.call(this, supportedPlatform.android);
|
package/lib/helper/Playwright.js
CHANGED
|
@@ -1892,7 +1892,7 @@ class Playwright extends Helper {
|
|
|
1892
1892
|
*/
|
|
1893
1893
|
async clearCookie() {
|
|
1894
1894
|
// Playwright currently doesn't support to delete a certain cookie
|
|
1895
|
-
// https://github.com/microsoft/playwright/blob/main/docs/api.md#
|
|
1895
|
+
// https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md#async-method-browsercontextclearcookies
|
|
1896
1896
|
if (!this.browserContext) return;
|
|
1897
1897
|
return this.browserContext.clearCookies();
|
|
1898
1898
|
}
|
|
@@ -2582,6 +2582,7 @@ class Playwright extends Helper {
|
|
|
2582
2582
|
let count = 0;
|
|
2583
2583
|
do {
|
|
2584
2584
|
waiter = await _contextObject.locator(`:has-text('${text}')`).first().isVisible();
|
|
2585
|
+
if (waiter) break;
|
|
2585
2586
|
await this.wait(1);
|
|
2586
2587
|
count += 1000;
|
|
2587
2588
|
} while (count <= waitTimeout);
|
|
@@ -3448,7 +3449,7 @@ async function proceedSee(assertType, text, context, strict = false) {
|
|
|
3448
3449
|
if (!context) {
|
|
3449
3450
|
const el = await this.context;
|
|
3450
3451
|
|
|
3451
|
-
allText = el.constructor.name ? [await el.locator('body').innerText()] : [await el.innerText()];
|
|
3452
|
+
allText = el.constructor.name !== 'Locator' ? [await el.locator('body').innerText()] : [await el.innerText()];
|
|
3452
3453
|
|
|
3453
3454
|
description = 'web application';
|
|
3454
3455
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.9-beta.1",
|
|
4
4
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acceptance",
|
|
@@ -123,18 +123,18 @@
|
|
|
123
123
|
"chai-subset": "1.6.0",
|
|
124
124
|
"contributor-faces": "1.1.0",
|
|
125
125
|
"documentation": "12.3.0",
|
|
126
|
-
"dtslint": "4.1
|
|
127
|
-
"electron": "27.0.
|
|
126
|
+
"dtslint": "4.2.1",
|
|
127
|
+
"electron": "27.0.4",
|
|
128
128
|
"eslint": "8.53.0",
|
|
129
129
|
"eslint-config-airbnb-base": "15.0.0",
|
|
130
130
|
"eslint-plugin-import": "2.29.0",
|
|
131
131
|
"eslint-plugin-mocha": "6.3.0",
|
|
132
132
|
"expect": "29.7.0",
|
|
133
|
-
"express": "4.
|
|
133
|
+
"express": "4.18.2",
|
|
134
134
|
"graphql": "14.6.0",
|
|
135
135
|
"husky": "8.0.3",
|
|
136
136
|
"inquirer-test": "2.0.1",
|
|
137
|
-
"jsdoc": "3.6.
|
|
137
|
+
"jsdoc": "3.6.11",
|
|
138
138
|
"jsdoc-typeof-plugin": "1.0.0",
|
|
139
139
|
"json-server": "0.10.1",
|
|
140
140
|
"playwright": "1.39.0",
|