codeceptjs 3.7.0-beta.13 → 3.7.0-beta.15
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/lib/codecept.js +14 -12
- package/lib/command/check.js +11 -2
- package/lib/command/definitions.js +1 -1
- package/lib/command/gherkin/snippets.js +69 -69
- package/lib/command/interactive.js +1 -1
- package/lib/command/run-multiple/chunk.js +48 -45
- package/lib/container.js +14 -7
- package/lib/helper/AI.js +2 -1
- package/lib/mocha/asyncWrapper.js +3 -1
- package/lib/mocha/gherkin.js +1 -1
- package/lib/mocha/inject.js +5 -0
- package/lib/output.js +1 -1
- package/lib/plugin/analyze.js +5 -6
- package/lib/plugin/auth.js +435 -0
- package/lib/plugin/autoDelay.js +2 -2
- package/lib/plugin/autoLogin.js +3 -337
- package/lib/plugin/pageInfo.js +1 -1
- package/lib/plugin/screenshotOnFail.js +1 -1
- package/lib/plugin/standardActingHelpers.js +4 -1
- package/lib/plugin/stepByStepReport.js +1 -1
- package/lib/step/base.js +13 -2
- package/lib/step/comment.js +10 -0
- package/package.json +17 -17
- package/translations/de-DE.js +4 -3
- package/translations/fr-FR.js +4 -3
- package/translations/index.js +1 -0
- package/translations/it-IT.js +4 -3
- package/translations/ja-JP.js +4 -3
- package/translations/nl-NL.js +76 -0
- package/translations/pl-PL.js +4 -3
- package/translations/pt-BR.js +4 -3
- package/translations/ru-RU.js +4 -3
- package/translations/utils.js +9 -0
- package/translations/zh-CN.js +4 -3
- package/translations/zh-TW.js +4 -3
- package/typings/promiseBasedTypes.d.ts +0 -18
- package/typings/types.d.ts +7 -24
package/translations/pl-PL.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
const { gherkinTranslations } = require('./utils')
|
|
2
|
+
const langCode = 'pl'
|
|
3
|
+
|
|
1
4
|
module.exports = {
|
|
2
5
|
I: 'Ja',
|
|
3
6
|
contexts: {
|
|
4
|
-
|
|
5
|
-
Scenario: 'Scenariusz',
|
|
6
|
-
ScenarioOutline: 'Szablon scenariusza',
|
|
7
|
+
...gherkinTranslations(langCode),
|
|
7
8
|
},
|
|
8
9
|
actions: {
|
|
9
10
|
amOutsideAngularApp: 'jestem_poza_aplikacją_angular',
|
package/translations/pt-BR.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
const { gherkinTranslations } = require('./utils')
|
|
2
|
+
const langCode = 'pt'
|
|
3
|
+
|
|
1
4
|
module.exports = {
|
|
2
5
|
I: 'Eu',
|
|
3
6
|
contexts: {
|
|
4
|
-
|
|
5
|
-
Scenario: 'Cenário',
|
|
6
|
-
ScenarioOutline: 'Esquema do Cenário',
|
|
7
|
+
...gherkinTranslations(langCode),
|
|
7
8
|
Before: 'Antes',
|
|
8
9
|
After: 'Depois',
|
|
9
10
|
BeforeSuite: 'AntesDaSuite',
|
package/translations/ru-RU.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
const { gherkinTranslations } = require('./utils')
|
|
2
|
+
const langCode = 'ru'
|
|
3
|
+
|
|
1
4
|
module.exports = {
|
|
2
5
|
I: 'Я',
|
|
3
6
|
contexts: {
|
|
4
|
-
|
|
5
|
-
Scenario: 'Сценарий',
|
|
6
|
-
ScenarioOutline: 'Структура сценария',
|
|
7
|
+
...gherkinTranslations(langCode),
|
|
7
8
|
Before: 'Начало',
|
|
8
9
|
After: 'Конец',
|
|
9
10
|
BeforeSuite: 'Перед_всем',
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
module.exports.gherkinTranslations = function (langCode) {
|
|
2
|
+
const gherkinLanguages = require('@cucumber/gherkin/src/gherkin-languages.json')
|
|
3
|
+
const { feature, scenario, scenarioOutline } = gherkinLanguages[langCode]
|
|
4
|
+
return {
|
|
5
|
+
Feature: feature[0],
|
|
6
|
+
Scenario: scenario[0],
|
|
7
|
+
ScenarioOutline: scenarioOutline[0],
|
|
8
|
+
}
|
|
9
|
+
}
|
package/translations/zh-CN.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
const { gherkinTranslations } = require('./utils')
|
|
2
|
+
const langCode = 'zh-CN'
|
|
3
|
+
|
|
1
4
|
module.exports = {
|
|
2
5
|
I: '我',
|
|
3
6
|
contexts: {
|
|
4
|
-
|
|
5
|
-
Scenario: '场景',
|
|
6
|
-
ScenarioOutline: '场景大纲',
|
|
7
|
+
...gherkinTranslations(langCode),
|
|
7
8
|
},
|
|
8
9
|
actions: {
|
|
9
10
|
amOutsideAngularApp: '在Angular应用外',
|
package/translations/zh-TW.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
const { gherkinTranslations } = require('./utils')
|
|
2
|
+
const langCode = 'zh-TW'
|
|
3
|
+
|
|
1
4
|
module.exports = {
|
|
2
5
|
I: '我',
|
|
3
6
|
contexts: {
|
|
4
|
-
|
|
5
|
-
Scenario: '場景',
|
|
6
|
-
ScenarioOutline: '場景大綱',
|
|
7
|
+
...gherkinTranslations(langCode),
|
|
7
8
|
},
|
|
8
9
|
actions: {
|
|
9
10
|
amOutsideAngularApp: '在Angular應用外',
|
|
@@ -1759,9 +1759,6 @@ declare namespace CodeceptJS {
|
|
|
1759
1759
|
* @property [host = "0.0.0.0"] - Mock server host
|
|
1760
1760
|
* @property [httpsOpts] - key & cert values are the paths to .key and .crt files
|
|
1761
1761
|
*/
|
|
1762
|
-
// @ts-ignore
|
|
1763
|
-
// @ts-ignore
|
|
1764
|
-
// @ts-ignore
|
|
1765
1762
|
type MockServerConfig = {
|
|
1766
1763
|
port?: number;
|
|
1767
1764
|
host?: string;
|
|
@@ -1886,9 +1883,6 @@ declare namespace CodeceptJS {
|
|
|
1886
1883
|
*
|
|
1887
1884
|
* ## Methods
|
|
1888
1885
|
*/
|
|
1889
|
-
// @ts-ignore
|
|
1890
|
-
// @ts-ignore
|
|
1891
|
-
// @ts-ignore
|
|
1892
1886
|
class MockServer {
|
|
1893
1887
|
/**
|
|
1894
1888
|
* Start the mock server
|
|
@@ -2922,9 +2916,6 @@ declare namespace CodeceptJS {
|
|
|
2922
2916
|
* @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).
|
|
2923
2917
|
* @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).
|
|
2924
2918
|
*/
|
|
2925
|
-
// @ts-ignore
|
|
2926
|
-
// @ts-ignore
|
|
2927
|
-
// @ts-ignore
|
|
2928
2919
|
type PlaywrightConfig = {
|
|
2929
2920
|
url?: string;
|
|
2930
2921
|
browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
|
|
@@ -6301,9 +6292,6 @@ declare namespace CodeceptJS {
|
|
|
6301
6292
|
* @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
|
|
6302
6293
|
* @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
|
|
6303
6294
|
*/
|
|
6304
|
-
// @ts-ignore
|
|
6305
|
-
// @ts-ignore
|
|
6306
|
-
// @ts-ignore
|
|
6307
6295
|
type PuppeteerConfig = {
|
|
6308
6296
|
url: string;
|
|
6309
6297
|
basicAuth?: any;
|
|
@@ -8110,9 +8098,6 @@ declare namespace CodeceptJS {
|
|
|
8110
8098
|
* @property [onResponse] - an async function which can update response object.
|
|
8111
8099
|
* @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
|
|
8112
8100
|
*/
|
|
8113
|
-
// @ts-ignore
|
|
8114
|
-
// @ts-ignore
|
|
8115
|
-
// @ts-ignore
|
|
8116
8101
|
type RESTConfig = {
|
|
8117
8102
|
endpoint?: string;
|
|
8118
8103
|
prettyPrintJson?: boolean;
|
|
@@ -9257,9 +9242,6 @@ declare namespace CodeceptJS {
|
|
|
9257
9242
|
* @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
|
|
9258
9243
|
* @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
|
|
9259
9244
|
*/
|
|
9260
|
-
// @ts-ignore
|
|
9261
|
-
// @ts-ignore
|
|
9262
|
-
// @ts-ignore
|
|
9263
9245
|
type WebDriverConfig = {
|
|
9264
9246
|
url: string;
|
|
9265
9247
|
browser: string;
|
package/typings/types.d.ts
CHANGED
|
@@ -1786,9 +1786,6 @@ declare namespace CodeceptJS {
|
|
|
1786
1786
|
* @property [host = "0.0.0.0"] - Mock server host
|
|
1787
1787
|
* @property [httpsOpts] - key & cert values are the paths to .key and .crt files
|
|
1788
1788
|
*/
|
|
1789
|
-
// @ts-ignore
|
|
1790
|
-
// @ts-ignore
|
|
1791
|
-
// @ts-ignore
|
|
1792
1789
|
type MockServerConfig = {
|
|
1793
1790
|
port?: number;
|
|
1794
1791
|
host?: string;
|
|
@@ -1913,9 +1910,6 @@ declare namespace CodeceptJS {
|
|
|
1913
1910
|
*
|
|
1914
1911
|
* ## Methods
|
|
1915
1912
|
*/
|
|
1916
|
-
// @ts-ignore
|
|
1917
|
-
// @ts-ignore
|
|
1918
|
-
// @ts-ignore
|
|
1919
1913
|
class MockServer {
|
|
1920
1914
|
/**
|
|
1921
1915
|
* Start the mock server
|
|
@@ -3015,9 +3009,6 @@ declare namespace CodeceptJS {
|
|
|
3015
3009
|
* @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).
|
|
3016
3010
|
* @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).
|
|
3017
3011
|
*/
|
|
3018
|
-
// @ts-ignore
|
|
3019
|
-
// @ts-ignore
|
|
3020
|
-
// @ts-ignore
|
|
3021
3012
|
type PlaywrightConfig = {
|
|
3022
3013
|
url?: string;
|
|
3023
3014
|
browser?: 'chromium' | 'firefox' | 'webkit' | 'electron';
|
|
@@ -6545,9 +6536,6 @@ declare namespace CodeceptJS {
|
|
|
6545
6536
|
* @property [chrome] - pass additional [Puppeteer run options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions).
|
|
6546
6537
|
* @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
|
|
6547
6538
|
*/
|
|
6548
|
-
// @ts-ignore
|
|
6549
|
-
// @ts-ignore
|
|
6550
|
-
// @ts-ignore
|
|
6551
6539
|
type PuppeteerConfig = {
|
|
6552
6540
|
url: string;
|
|
6553
6541
|
basicAuth?: any;
|
|
@@ -8490,9 +8478,6 @@ declare namespace CodeceptJS {
|
|
|
8490
8478
|
* @property [onResponse] - an async function which can update response object.
|
|
8491
8479
|
* @property [maxUploadFileSize] - set the max content file size in MB when performing api calls.
|
|
8492
8480
|
*/
|
|
8493
|
-
// @ts-ignore
|
|
8494
|
-
// @ts-ignore
|
|
8495
|
-
// @ts-ignore
|
|
8496
8481
|
type RESTConfig = {
|
|
8497
8482
|
endpoint?: string;
|
|
8498
8483
|
prettyPrintJson?: boolean;
|
|
@@ -9697,9 +9682,6 @@ declare namespace CodeceptJS {
|
|
|
9697
9682
|
* @property [highlightElement] - highlight the interacting elements. Default: false. Note: only activate under verbose mode (--verbose).
|
|
9698
9683
|
* @property [logLevel = silent] - level of logging verbosity. Default: silent. Options: trace | debug | info | warn | error | silent. More info: https://webdriver.io/docs/configuration/#loglevel
|
|
9699
9684
|
*/
|
|
9700
|
-
// @ts-ignore
|
|
9701
|
-
// @ts-ignore
|
|
9702
|
-
// @ts-ignore
|
|
9703
9685
|
type WebDriverConfig = {
|
|
9704
9686
|
url: string;
|
|
9705
9687
|
browser: string;
|
|
@@ -11781,6 +11763,10 @@ declare namespace CodeceptJS {
|
|
|
11781
11763
|
* Dependency Injection Container
|
|
11782
11764
|
*/
|
|
11783
11765
|
class Container {
|
|
11766
|
+
/**
|
|
11767
|
+
* Get the standard acting helpers of CodeceptJS Container
|
|
11768
|
+
*/
|
|
11769
|
+
static STANDARD_ACTING_HELPERS: any;
|
|
11784
11770
|
/**
|
|
11785
11771
|
* Create container with all required helpers and support objects
|
|
11786
11772
|
*/
|
|
@@ -11825,16 +11811,12 @@ declare namespace CodeceptJS {
|
|
|
11825
11811
|
}, newPlugins: {
|
|
11826
11812
|
[key: string]: any;
|
|
11827
11813
|
}): void;
|
|
11828
|
-
static started(fn: (...params: any[]) => any): Promise<void>;
|
|
11814
|
+
static started(fn: ((...params: any[]) => any) | null): Promise<void>;
|
|
11829
11815
|
/**
|
|
11830
11816
|
* Share data across worker threads
|
|
11831
11817
|
* @param options - set {local: true} to not share among workers
|
|
11832
11818
|
*/
|
|
11833
11819
|
static share(data: any, options: any): void;
|
|
11834
|
-
/**
|
|
11835
|
-
* List of helpers that are used in CodeceptJS and can't be used together
|
|
11836
|
-
*/
|
|
11837
|
-
static STANDARD_ACTING_HELPERS: string[];
|
|
11838
11820
|
}
|
|
11839
11821
|
/**
|
|
11840
11822
|
* Method collect own property and prototype
|
|
@@ -12198,12 +12180,13 @@ declare namespace CodeceptJS {
|
|
|
12198
12180
|
args: any[];
|
|
12199
12181
|
opts: Record<string, any>;
|
|
12200
12182
|
actor: string;
|
|
12201
|
-
helperMethod: string;
|
|
12202
12183
|
status: string;
|
|
12203
12184
|
prefix: string;
|
|
12204
12185
|
comment: string;
|
|
12205
12186
|
metaStep: any;
|
|
12206
12187
|
stack: string;
|
|
12188
|
+
helper: any;
|
|
12189
|
+
helperMethod: string;
|
|
12207
12190
|
timeout: any;
|
|
12208
12191
|
/**
|
|
12209
12192
|
* @param timeout - timeout in milliseconds or 0 if no timeout
|