@lynxwall/cucumber-tsflow 5.0.1 → 5.0.4
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 +8 -8
- package/bin/cucumber-tsflow +1 -0
- package/lib/transpilers/vue-sfc/main.js +6 -6
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +6 -8
package/README.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# cucumber-tsflow
|
|
4
4
|
|
|
5
|
-
Provides 'specflow' like bindings for CucumberJS in TypeScript 1.7+.
|
|
5
|
+
Provides 'specflow' like bindings for CucumberJS 8.0.0+ in TypeScript 1.7+.
|
|
6
6
|
|
|
7
7
|
Supports Vue3 files in cucumber tests.
|
|
8
8
|
|
|
9
9
|
## Fork description
|
|
10
|
-
This is a detached fork of <
|
|
10
|
+
This is a detached fork of <https://github.com/timjroberts/cucumber-js-tsflow>. It has had the <https://github.com/wudong/cucumber-js-tsflow/tree/before_after_all_hooks> branch merged into it, which adds support for beforeAll and afterAll hooks.
|
|
11
11
|
|
|
12
12
|
In addition, the following features have been added:
|
|
13
13
|
- Test runner using cucumber-tsflow command line
|
|
@@ -20,7 +20,7 @@ In addition, the following features have been added:
|
|
|
20
20
|
- Boolean custom definition added to cucumber expressions
|
|
21
21
|
- A behave-json-formatter that fixes json so it can be used with Behave Pro
|
|
22
22
|
- tsflow-snippet-syntax used to format snippet examples
|
|
23
|
-
- snippets use the
|
|
23
|
+
- snippets use the [Cucumber Syntax](https://github.com/cucumber/cucumber-expressions#readme) for parameters
|
|
24
24
|
|
|
25
25
|
## Quick Start
|
|
26
26
|
|
|
@@ -94,11 +94,11 @@ Note how the cucumber-tsflow Decorators are being used to bind the methods in th
|
|
|
94
94
|
|
|
95
95
|
### Compiling your TypeScript Support Code
|
|
96
96
|
|
|
97
|
-
If not using one of the [transpilers](
|
|
97
|
+
If not using one of the [transpilers](#transpiler-and-vue3-supported) listed below you'll need a `tsconfig.json` file to compile your code. You'll also need to ensure that the `"moduleResolution": "node"` compiler option is set in order to bring in the typings that are shipped with cucumber-tsflow.
|
|
98
98
|
|
|
99
99
|
Running the cucumber-tsflow command line should execute your features along with the support code that you've created in the class.
|
|
100
100
|
|
|
101
|
-
In this quick example test state is encapsulated directly in the class. As your test suite grows larger and step definitions get shared between multiple classes, you can begin using 'Context Injection' to share state between running step definitions (see below).
|
|
101
|
+
In this quick example test state is encapsulated directly in the class. As your test suite grows larger and step definitions get shared between multiple classes, you can begin using '[Context Injection](#context-injection)' to share state between running step definitions (see below).
|
|
102
102
|
|
|
103
103
|
## Cucumber-tsflow Test Runner
|
|
104
104
|
|
|
@@ -126,7 +126,7 @@ cucumber-tsflow extends cucumber-js, which means that all options and features p
|
|
|
126
126
|
|
|
127
127
|
### New Configuration options
|
|
128
128
|
|
|
129
|
-
As mentioned, when using cucumber-tsflow to execute tests all of the configuration options documented here are supported: <
|
|
129
|
+
As mentioned, when using cucumber-tsflow to execute tests all of the configuration options documented here are supported: <https://github.com/cucumber/cucumber-js/blob/v8.0.0/docs/configuration.md>
|
|
130
130
|
|
|
131
131
|
In addition to cucumber configuration options the following two options have been added:
|
|
132
132
|
|
|
@@ -137,7 +137,7 @@ In addition to cucumber configuration options the following two options have bee
|
|
|
137
137
|
|
|
138
138
|
#### Transpiler and Vue3 supported
|
|
139
139
|
|
|
140
|
-
Using TypeScript with cucumberJs requires a couple of tsconfig.json parameters and the output needs to be commonJS as documented here: <
|
|
140
|
+
Using TypeScript with cucumberJs requires a couple of tsconfig.json parameters and the output needs to be commonJS as documented here: <https://github.com/cucumber/cucumber-js/blob/v8.0.0/docs/transpiling.md>
|
|
141
141
|
|
|
142
142
|
As a result, cucumber-tsflow adds several configurations for transpiling TypeScript code using the recommended configuration. In addition, support has been added to transform .vue files during test execution allowing you to test Vue SFC components using cucumber.
|
|
143
143
|
|
|
@@ -286,7 +286,7 @@ public givenAValueBasedSearch(searchValue: string): void {
|
|
|
286
286
|
}
|
|
287
287
|
```
|
|
288
288
|
|
|
289
|
-
Note: Tags added to steps work the same as "Tagged Hooks" documented here: <
|
|
289
|
+
Note: Tags added to steps work the same as "Tagged Hooks" documented here: <https://github.com/cucumber/cucumber-js/blob/v8.0.0/docs/support_files/hooks.md>
|
|
290
290
|
|
|
291
291
|
## Hooks
|
|
292
292
|
|
package/bin/cucumber-tsflow
CHANGED
|
@@ -83,12 +83,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
83
83
|
output.push(`export default _sfc_main`);
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
|
-
output.push(`import _export_sfc from 'export default (sfc, props) => {
|
|
87
|
-
const target = sfc.__vccOpts || sfc;
|
|
88
|
-
for (const [key, val] of props) {
|
|
89
|
-
target[key] = val;
|
|
90
|
-
}
|
|
91
|
-
return target;
|
|
86
|
+
output.push(`import _export_sfc from 'export default (sfc, props) => {
|
|
87
|
+
const target = sfc.__vccOpts || sfc;
|
|
88
|
+
for (const [key, val] of props) {
|
|
89
|
+
target[key] = val;
|
|
90
|
+
}
|
|
91
|
+
return target;
|
|
92
92
|
}'`, `export default /*#__PURE__*/_export_sfc(_sfc_main, [${attachedProps
|
|
93
93
|
.map(([key, val]) => `['${key}',${val}]`)
|
|
94
94
|
.join(',')}])`);
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.0.
|
|
1
|
+
export declare const version = "5.0.4";
|
package/lib/version.js
CHANGED
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.version = void 0;
|
|
13
13
|
// generated by genversion
|
|
14
|
-
exports.version = '5.0.
|
|
14
|
+
exports.version = '5.0.4';
|
|
15
15
|
});
|
|
16
16
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy92ZXJzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7OztJQUFBLDBCQUEwQjtJQUNiLFFBQUEsT0FBTyxHQUFHLE9BQU8sQ0FBQSJ9
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynxwall/cucumber-tsflow",
|
|
3
|
-
"description": "Provides 'specflow' like bindings for CucumberJS
|
|
4
|
-
"version": "5.0.
|
|
3
|
+
"description": "Provides 'specflow' like bindings for CucumberJS 8.0.0+ in TypeScript 1.7+.",
|
|
4
|
+
"version": "5.0.4",
|
|
5
5
|
"author": "Lonnie Wall <lynxdev@lynxwall.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "./lib/index",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"@cucumber/cucumber": "^8.0.0",
|
|
25
25
|
"@jeanbenitez/logical-expression-parser": "^1.0.0",
|
|
26
26
|
"@rollup/pluginutils": "^4.2.0",
|
|
27
|
+
"@types/node": "17.0.21",
|
|
27
28
|
"callsites": "^3.1.0",
|
|
28
29
|
"chalk": "^4.0.1",
|
|
29
30
|
"esbuild": "^0.14.31",
|
|
@@ -35,24 +36,21 @@
|
|
|
35
36
|
"log4js": "^6.4.3",
|
|
36
37
|
"require-extension-hooks": "^0.3.3",
|
|
37
38
|
"rollup": "^2.70.1",
|
|
39
|
+
"short-uuid": "^4.2.0",
|
|
38
40
|
"source-map-support": "^0.5.21",
|
|
39
41
|
"ts-node": "^10.6.0",
|
|
40
42
|
"tsconfig-paths": "^3.14.0",
|
|
41
43
|
"typescript": "~4.6.2",
|
|
42
44
|
"underscore": "^1.13.2",
|
|
43
|
-
"verror": "^1.10.1"
|
|
44
|
-
"vue": "^3.2.31"
|
|
45
|
+
"verror": "^1.10.1"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@types/glob": "^7.2.0",
|
|
48
49
|
"@types/hash-sum": "^1.0.0",
|
|
49
50
|
"@types/lodash.merge": "^4.6.6",
|
|
50
|
-
"@types/node": "17.0.21",
|
|
51
51
|
"@types/source-map-support": "^0.5.4",
|
|
52
52
|
"@types/underscore": "1.11.4",
|
|
53
|
-
"@types/verror": "^1.10.5"
|
|
54
|
-
"short-uuid": "^4.2.0"
|
|
53
|
+
"@types/verror": "^1.10.5"
|
|
55
54
|
},
|
|
56
55
|
"bin": "./bin/cucumber-tsflow"
|
|
57
56
|
}
|
|
58
|
-
|