codeceptjs 3.7.5-beta.1 → 3.7.5-beta.11
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/bin/codecept.js +23 -0
- package/lib/command/run-failed-tests.js +276 -0
- package/lib/helper/Playwright.js +348 -28
- package/lib/mocha/test.js +1 -0
- package/lib/plugin/failedTestsTracker.js +413 -0
- package/lib/workers.js +23 -3
- package/package.json +1 -1
- package/typings/promiseBasedTypes.d.ts +10 -49
- package/typings/types.d.ts +10 -60
package/typings/types.d.ts
CHANGED
|
@@ -2823,8 +2823,11 @@ declare namespace CodeceptJS {
|
|
|
2823
2823
|
* @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
|
|
2824
2824
|
* @property [recordHar] - record HAR and will be saved to `output/har`. See more of [HAR options](https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-har).
|
|
2825
2825
|
* @property [testIdAttribute = data-testid] - locate elements based on the testIdAttribute. See more of [locate by test id](https://playwright.dev/docs/locators#locate-by-test-id).
|
|
2826
|
+
* @property [customLocatorStrategies] - custom locator strategies. An object with keys as strategy names and values as JavaScript functions. Example: `{ byRole: (selector, root) => { return root.querySelector(\`[role="\${selector}\"]\`) } }`
|
|
2826
2827
|
*/
|
|
2827
2828
|
// @ts-ignore
|
|
2829
|
+
// @ts-ignore
|
|
2830
|
+
// @ts-ignore
|
|
2828
2831
|
type PlaywrightConfig = {
|
|
2829
2832
|
url?: string;
|
|
2830
2833
|
browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
|
|
@@ -2862,6 +2865,7 @@ declare namespace CodeceptJS {
|
|
|
2862
2865
|
highlightElement?: boolean;
|
|
2863
2866
|
recordHar?: any;
|
|
2864
2867
|
testIdAttribute?: string;
|
|
2868
|
+
customLocatorStrategies?: any;
|
|
2865
2869
|
};
|
|
2866
2870
|
/**
|
|
2867
2871
|
* Uses [Playwright](https://github.com/microsoft/playwright) library to run tests inside:
|
|
@@ -6353,6 +6357,8 @@ declare namespace CodeceptJS {
|
|
|
6353
6357
|
* @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
|
|
6354
6358
|
*/
|
|
6355
6359
|
// @ts-ignore
|
|
6360
|
+
// @ts-ignore
|
|
6361
|
+
// @ts-ignore
|
|
6356
6362
|
type PuppeteerConfig = {
|
|
6357
6363
|
url: string;
|
|
6358
6364
|
basicAuth?: any;
|
|
@@ -6792,17 +6798,6 @@ declare namespace CodeceptJS {
|
|
|
6792
6798
|
* {{ react }}
|
|
6793
6799
|
*/
|
|
6794
6800
|
_locate(): void;
|
|
6795
|
-
/**
|
|
6796
|
-
* Get single element by different locator types, including strict locator
|
|
6797
|
-
* Should be used in custom helpers:
|
|
6798
|
-
*
|
|
6799
|
-
* ```js
|
|
6800
|
-
* const element = await this.helpers['Puppeteer']._locateElement({name: 'password'});
|
|
6801
|
-
* ```
|
|
6802
|
-
*
|
|
6803
|
-
* {{ react }}
|
|
6804
|
-
*/
|
|
6805
|
-
_locateElement(): void;
|
|
6806
6801
|
/**
|
|
6807
6802
|
* Find a checkbox by providing human-readable text:
|
|
6808
6803
|
* NOTE: Assumes the checkable element exists
|
|
@@ -6839,17 +6834,6 @@ declare namespace CodeceptJS {
|
|
|
6839
6834
|
* @returns WebElement of being used Web helper
|
|
6840
6835
|
*/
|
|
6841
6836
|
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6842
|
-
/**
|
|
6843
|
-
* Grab WebElement for given locator
|
|
6844
|
-
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
6845
|
-
*
|
|
6846
|
-
* ```js
|
|
6847
|
-
* const webElement = await I.grabWebElement('#button');
|
|
6848
|
-
* ```
|
|
6849
|
-
* @param locator - element located by CSS|XPath|strict locator.
|
|
6850
|
-
* @returns WebElement of being used Web helper
|
|
6851
|
-
*/
|
|
6852
|
-
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
6853
6837
|
/**
|
|
6854
6838
|
* Switch focus to a particular tab by its number. It waits tabs loading and then switch tab
|
|
6855
6839
|
*
|
|
@@ -8305,22 +8289,6 @@ declare namespace CodeceptJS {
|
|
|
8305
8289
|
*/
|
|
8306
8290
|
flushWebSocketMessages(): void;
|
|
8307
8291
|
}
|
|
8308
|
-
/**
|
|
8309
|
-
* Find elements using Puppeteer's native element discovery methods
|
|
8310
|
-
* Note: Unlike Playwright, Puppeteer's Locator API doesn't have .all() method for multiple elements
|
|
8311
|
-
* @param matcher - Puppeteer context to search within
|
|
8312
|
-
* @param locator - Locator specification
|
|
8313
|
-
* @returns Array of ElementHandle objects
|
|
8314
|
-
*/
|
|
8315
|
-
function findElements(matcher: any, locator: any | string): Promise<any[]>;
|
|
8316
|
-
/**
|
|
8317
|
-
* Find a single element using Puppeteer's native element discovery methods
|
|
8318
|
-
* Note: Puppeteer Locator API doesn't have .first() method like Playwright
|
|
8319
|
-
* @param matcher - Puppeteer context to search within
|
|
8320
|
-
* @param locator - Locator specification
|
|
8321
|
-
* @returns Single ElementHandle object
|
|
8322
|
-
*/
|
|
8323
|
-
function findElement(matcher: any, locator: any | string): Promise<object>;
|
|
8324
8292
|
/**
|
|
8325
8293
|
* ## Configuration
|
|
8326
8294
|
* @property [endpoint] - API base URL
|
|
@@ -8334,6 +8302,8 @@ declare namespace CodeceptJS {
|
|
|
8334
8302
|
* @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
|
|
8335
8303
|
*/
|
|
8336
8304
|
// @ts-ignore
|
|
8305
|
+
// @ts-ignore
|
|
8306
|
+
// @ts-ignore
|
|
8337
8307
|
type RESTConfig = {
|
|
8338
8308
|
endpoint?: string;
|
|
8339
8309
|
prettyPrintJson?: boolean;
|
|
@@ -9540,6 +9510,8 @@ declare namespace CodeceptJS {
|
|
|
9540
9510
|
* @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
|
|
9541
9511
|
*/
|
|
9542
9512
|
// @ts-ignore
|
|
9513
|
+
// @ts-ignore
|
|
9514
|
+
// @ts-ignore
|
|
9543
9515
|
type WebDriverConfig = {
|
|
9544
9516
|
url: string;
|
|
9545
9517
|
browser: string;
|
|
@@ -10010,17 +9982,6 @@ declare namespace CodeceptJS {
|
|
|
10010
9982
|
* @returns WebElement of being used Web helper
|
|
10011
9983
|
*/
|
|
10012
9984
|
grabWebElements(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
10013
|
-
/**
|
|
10014
|
-
* Grab WebElement for given locator
|
|
10015
|
-
* Resumes test execution, so **should be used inside an async function with `await`** operator.
|
|
10016
|
-
*
|
|
10017
|
-
* ```js
|
|
10018
|
-
* const webElement = await I.grabWebElement('#button');
|
|
10019
|
-
* ```
|
|
10020
|
-
* @param locator - element located by CSS|XPath|strict locator.
|
|
10021
|
-
* @returns WebElement of being used Web helper
|
|
10022
|
-
*/
|
|
10023
|
-
grabWebElement(locator: CodeceptJS.LocatorOrString): Promise<any>;
|
|
10024
9985
|
/**
|
|
10025
9986
|
* Set [WebDriver timeouts](https://webdriver.io/docs/timeouts.html) in realtime.
|
|
10026
9987
|
*
|
|
@@ -11565,13 +11526,6 @@ declare namespace CodeceptJS {
|
|
|
11565
11526
|
* Loads tests by pattern or by config.tests
|
|
11566
11527
|
*/
|
|
11567
11528
|
loadTests(pattern?: string): void;
|
|
11568
|
-
/**
|
|
11569
|
-
* Apply sharding to test files based on shard configuration
|
|
11570
|
-
* @param testFiles - Array of test file paths
|
|
11571
|
-
* @param shardConfig - Shard configuration in format "index/total" (e.g., "1/4")
|
|
11572
|
-
* @returns - Filtered array of test files for this shard
|
|
11573
|
-
*/
|
|
11574
|
-
_applySharding(testFiles: string[], shardConfig: string): string[];
|
|
11575
11529
|
/**
|
|
11576
11530
|
* Run a specific test or all loaded tests.
|
|
11577
11531
|
*/
|
|
@@ -12065,10 +12019,6 @@ declare namespace CodeceptJS {
|
|
|
12065
12019
|
* Get a state of current queue and tasks
|
|
12066
12020
|
*/
|
|
12067
12021
|
toString(): string;
|
|
12068
|
-
/**
|
|
12069
|
-
* Get current session ID
|
|
12070
|
-
*/
|
|
12071
|
-
getCurrentSessionId(): string | null;
|
|
12072
12022
|
}
|
|
12073
12023
|
interface RecorderSession {
|
|
12074
12024
|
running: boolean;
|