@wdio/cucumber-framework 8.0.0-alpha.331 → 8.0.0-alpha.411
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/build/cucumberEventListener.js +10 -8
- package/build/index.js +15 -2
- package/build/reporter.js +11 -1
- package/package.json +7 -7
|
@@ -4,17 +4,19 @@ import logger from '@wdio/logger';
|
|
|
4
4
|
import { addKeywordToStep, filterPickles, getRule } from './utils.js';
|
|
5
5
|
const log = logger('CucumberEventListener');
|
|
6
6
|
export default class CucumberEventListener extends EventEmitter {
|
|
7
|
+
_pickleFilter;
|
|
8
|
+
_gherkinDocEvents = [];
|
|
9
|
+
_scenarios = [];
|
|
10
|
+
_testCases = [];
|
|
11
|
+
_currentTestCase;
|
|
12
|
+
_currentPickle = {};
|
|
13
|
+
_suiteMap = new Map();
|
|
14
|
+
_pickleMap = new Map();
|
|
15
|
+
_currentDoc = { comments: [] };
|
|
16
|
+
_startedFeatures = [];
|
|
7
17
|
constructor(eventBroadcaster, _pickleFilter) {
|
|
8
18
|
super();
|
|
9
19
|
this._pickleFilter = _pickleFilter;
|
|
10
|
-
this._gherkinDocEvents = [];
|
|
11
|
-
this._scenarios = [];
|
|
12
|
-
this._testCases = [];
|
|
13
|
-
this._currentPickle = {};
|
|
14
|
-
this._suiteMap = new Map();
|
|
15
|
-
this._pickleMap = new Map();
|
|
16
|
-
this._currentDoc = { comments: [] };
|
|
17
|
-
this._startedFeatures = [];
|
|
18
20
|
let results = [];
|
|
19
21
|
eventBroadcaster.on('envelope', (envelope) => {
|
|
20
22
|
if (envelope.gherkinDocument) {
|
package/build/index.js
CHANGED
|
@@ -25,14 +25,27 @@ function getResultObject(world) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
class CucumberAdapter {
|
|
28
|
+
_cid;
|
|
29
|
+
_config;
|
|
30
|
+
_specs;
|
|
31
|
+
_capabilities;
|
|
32
|
+
_reporter;
|
|
33
|
+
_cwd = process.cwd();
|
|
34
|
+
_newId = incrementing();
|
|
35
|
+
_cucumberOpts;
|
|
36
|
+
_hasTests;
|
|
37
|
+
_cucumberFeaturesWithLineNumbers;
|
|
38
|
+
_eventBroadcaster;
|
|
39
|
+
_cucumberReporter;
|
|
40
|
+
_eventDataCollector;
|
|
41
|
+
_pickleFilter;
|
|
42
|
+
getHookParams;
|
|
28
43
|
constructor(_cid, _config, _specs, _capabilities, _reporter) {
|
|
29
44
|
this._cid = _cid;
|
|
30
45
|
this._config = _config;
|
|
31
46
|
this._specs = _specs;
|
|
32
47
|
this._capabilities = _capabilities;
|
|
33
48
|
this._reporter = _reporter;
|
|
34
|
-
this._cwd = process.cwd();
|
|
35
|
-
this._newId = incrementing();
|
|
36
49
|
this._cucumberOpts = Object.assign({}, DEFAULT_OPTS, this._config.cucumberOpts);
|
|
37
50
|
this._hasTests = true;
|
|
38
51
|
this._cucumberFeaturesWithLineNumbers = this._config.cucumberFeaturesWithLineNumbers || [];
|
package/build/reporter.js
CHANGED
|
@@ -2,12 +2,22 @@ import { Status } from '@cucumber/cucumber';
|
|
|
2
2
|
import CucumberEventListener from './cucumberEventListener.js';
|
|
3
3
|
import { getFeatureId, formatMessage, getStepType, buildStepPayload } from './utils.js';
|
|
4
4
|
export default class CucumberReporter {
|
|
5
|
+
_options;
|
|
6
|
+
_cid;
|
|
7
|
+
_specs;
|
|
8
|
+
_reporter;
|
|
9
|
+
eventListener;
|
|
10
|
+
failedCount = 0;
|
|
11
|
+
_tagsInTitle;
|
|
12
|
+
_scenarioLevelReport;
|
|
13
|
+
_featureStart;
|
|
14
|
+
_scenarioStart;
|
|
15
|
+
_testStart;
|
|
5
16
|
constructor(eventBroadcaster, pickleFilter, _options, _cid, _specs, _reporter) {
|
|
6
17
|
this._options = _options;
|
|
7
18
|
this._cid = _cid;
|
|
8
19
|
this._specs = _specs;
|
|
9
20
|
this._reporter = _reporter;
|
|
10
|
-
this.failedCount = 0;
|
|
11
21
|
this._tagsInTitle = this._options.tagsInTitle || false;
|
|
12
22
|
this._scenarioLevelReport = this._options.scenarioLevelReporter;
|
|
13
23
|
this.eventListener = new CucumberEventListener(eventBroadcaster, pickleFilter)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/cucumber-framework",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.411+2d3189eaf",
|
|
4
4
|
"description": "A WebdriverIO plugin. Adapter for Cucumber.js testing framework.",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-cucumber-framework",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"types": "./build/index.d.ts",
|
|
37
37
|
"typeScriptVersion": "3.8.3",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@cucumber/cucumber": "8.5.
|
|
39
|
+
"@cucumber/cucumber": "8.5.3",
|
|
40
40
|
"@cucumber/gherkin": "24.0.0",
|
|
41
41
|
"@cucumber/gherkin-streams": "^5.0.0",
|
|
42
|
-
"@cucumber/messages": "19.1.
|
|
42
|
+
"@cucumber/messages": "19.1.4",
|
|
43
43
|
"@types/is-glob": "^4.0.1",
|
|
44
44
|
"@types/mockery": "^1.4.29",
|
|
45
|
-
"@wdio/logger": "8.0.0-alpha.
|
|
46
|
-
"@wdio/types": "8.0.0-alpha.
|
|
47
|
-
"@wdio/utils": "8.0.0-alpha.
|
|
45
|
+
"@wdio/logger": "8.0.0-alpha.411+2d3189eaf",
|
|
46
|
+
"@wdio/types": "8.0.0-alpha.411+2d3189eaf",
|
|
47
|
+
"@wdio/utils": "8.0.0-alpha.411+2d3189eaf",
|
|
48
48
|
"glob": "^8.0.3",
|
|
49
49
|
"is-glob": "^4.0.0",
|
|
50
50
|
"long": "^4.0.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "2d3189eaf8779f61699c1377f44f9841ed8a72c7"
|
|
60
60
|
}
|