@lynxwall/cucumber-tsflow 6.0.0 → 6.0.2
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 +27 -25
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# cucumber-tsflow
|
|
4
4
|
|
|
5
|
-
Provides 'specflow' like bindings for CucumberJS
|
|
5
|
+
Provides 'specflow' like bindings for CucumberJS 9.1.0+ in TypeScript 4.0+.
|
|
6
6
|
|
|
7
7
|
Supports Vue3 files in cucumber tests.
|
|
8
8
|
|
|
@@ -10,26 +10,28 @@ Supports Vue3 files in cucumber tests.
|
|
|
10
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
|
-
- Test runner using the cucumber-tsflow command
|
|
14
|
-
- Uses underlying cucumber api to run tests
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
- Test runner using the cucumber-tsflow command.
|
|
14
|
+
- Uses underlying cucumber api to run tests.
|
|
15
|
+
- Returns three exit codes:
|
|
16
|
+
- **0** = all scenarios passing, **1** = implemented scenarios are passing but there are pending, undefined or unknown scenario steps, **2** = one or more scenario steps have failed.
|
|
17
|
+
- Typescript and esbuild transpiler support.
|
|
18
|
+
- Vue3 transformer used to handle .vue files in tests.
|
|
19
|
+
- Timeout in step definitions and hooks.
|
|
20
|
+
- WrapperOptions in step definitions.
|
|
21
|
+
- BeforeStep and AfterStep Hooks.
|
|
22
|
+
- Boolean custom definition added to cucumber expressions.
|
|
23
|
+
- Support for Parallel execution of tests.
|
|
24
|
+
- A behave-json-formatter that fixes json so it can be used with Behave Pro.
|
|
25
|
+
- tsflow-snippet-syntax used to format snippet examples.
|
|
26
|
+
- snippets use the [Cucumber Expressions](https://github.com/cucumber/cucumber-expressions#readme) Syntax for parameters.
|
|
27
|
+
|
|
28
|
+
<div style="padding: 15px; border: 1px solid transparent; border-color: transparent; margin-bottom: 20px; border-radius: 4px; color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc;">
|
|
29
|
+
<strong><span style="color: #000">Note:</span></strong> With recent updates you must use the <strong><span style="color: #000">cucumber-tsflow</span></strong> command to execute tests. This command executes the same API calls that cucumber-js does and supports all of the options and features as cucumber-js along with new features listed above.
|
|
28
30
|
</div>
|
|
29
31
|
|
|
30
32
|
## Quick Start
|
|
31
33
|
|
|
32
|
-
cucumber-tsflow uses TypeScript Decorators to create SpecFlow like bindings for TypeScript classes and methods that allow those classes and methods to be used in your CucumberJS support files. As such, cucumber-tsflow has a dependency on CucumberJS and extends CucumberJS functionality. However, you
|
|
34
|
+
cucumber-tsflow uses TypeScript Decorators to create SpecFlow like bindings for TypeScript classes and methods that allow those classes and methods to be used in your CucumberJS support files. As such, cucumber-tsflow has a dependency on CucumberJS and extends CucumberJS functionality. However, you run your specifications using the cucumber-tsflow command line tool.
|
|
33
35
|
|
|
34
36
|
### Install @lynxwall/cucumber-tsflow
|
|
35
37
|
|
|
@@ -113,7 +115,7 @@ As mentioned previously, with recent updates cucumber-tsflow must be used to exe
|
|
|
113
115
|
|
|
114
116
|
The following example demonstrates executing cucumber-tsflow from the command line to execute tests:
|
|
115
117
|
|
|
116
|
-
```
|
|
118
|
+
```cmd
|
|
117
119
|
C:\GitHub\cucumber-js-tsflow (dev -> origin)
|
|
118
120
|
λ npx cucumber-tsflow
|
|
119
121
|
Loading configuration and step definitions...
|
|
@@ -164,14 +166,14 @@ As mentioned, when using cucumber-tsflow to execute tests all of the configurati
|
|
|
164
166
|
|
|
165
167
|
In addition to cucumber configuration options the following two options have been added:
|
|
166
168
|
|
|
167
|
-
| Name
|
|
168
|
-
|
|
169
|
-
| `transpiler`
|
|
170
|
-
| `debugFile`
|
|
169
|
+
| Name | Type | Repeatable | CLI Option | Description | Default |
|
|
170
|
+
| ------------ | -------- | ---------- | -------------- | ------------------------------------------------------------ | ------- |
|
|
171
|
+
| `transpiler` | `string` | No | `--transpiler` | Name of the transpiler to use: esnode, esvue, tsnode or tsvue | esnode |
|
|
172
|
+
| `debugFile` | `string` | No | `--debug-file` | Path to a file with steps for debugging | |
|
|
171
173
|
|
|
172
174
|
#### Transpiler and Vue3 supported
|
|
173
175
|
|
|
174
|
-
Using TypeScript with cucumberJs requires a couple of tsconfig.json parameters
|
|
176
|
+
Using TypeScript with cucumberJs requires a couple of tsconfig.json parameters as described here: [Transpiling](https://github.com/cucumber/cucumber-js/blob/v9.1.0/docs/transpiling.md)
|
|
175
177
|
|
|
176
178
|
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.
|
|
177
179
|
|
|
@@ -376,7 +378,7 @@ class MySteps {
|
|
|
376
378
|
public beforeAllScenarios(): void {
|
|
377
379
|
...
|
|
378
380
|
}
|
|
379
|
-
|
|
381
|
+
|
|
380
382
|
@before("@requireTempDir")
|
|
381
383
|
public async beforeAllScenariosRequiringTempDirectory(): Promise<void> {
|
|
382
384
|
let tempDirInfo = await this.createTemporaryDirectory();
|
|
@@ -441,7 +443,7 @@ In step definition, we can pass additional wrapper options to cucumber js. For e
|
|
|
441
443
|
@given('I perform a search using the value {string}', undefined, undefined, {retry: 2})
|
|
442
444
|
public givenAValueBasedSearch(searchValue: string): void {
|
|
443
445
|
...
|
|
444
|
-
// this step will be retried by cucumber js
|
|
446
|
+
// this step will be retried by cucumber js
|
|
445
447
|
...
|
|
446
448
|
}
|
|
447
449
|
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.0.
|
|
1
|
+
export declare const version = "6.0.2";
|
package/lib/version.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.version = void 0;
|
|
4
4
|
// Generated by genversion.
|
|
5
|
-
exports.version = '6.0.
|
|
5
|
+
exports.version = '6.0.2';
|
|
6
6
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy92ZXJzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDJCQUEyQjtBQUNkLFFBQUEsT0FBTyxHQUFHLE9BQU8sQ0FBQSJ9
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynxwall/cucumber-tsflow",
|
|
3
3
|
"description": "Provides 'specflow' like bindings for CucumberJS 9.1.0+ in TypeScript 4.0+.",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.2",
|
|
5
5
|
"author": "Lonnie Wall <lynxdev@lynxwall.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "./lib/index",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"tests",
|
|
16
16
|
"typescript",
|
|
17
17
|
"specflow",
|
|
18
|
+
"tsflow",
|
|
18
19
|
"vue3"
|
|
19
20
|
],
|
|
20
21
|
"repository": {
|