@dev-blinq/cucumber-js 1.0.3 → 1.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 +40 -96
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,124 +1,68 @@
|
|
|
1
1
|
<h1 align="center">
|
|
2
|
-
<img src="./docs/images/
|
|
2
|
+
<img src="./docs/images/icon.png" style="width:150px;height:150px;" alt="">
|
|
3
3
|
<br>
|
|
4
|
-
Cucumber
|
|
4
|
+
Cucumber - Blinq.io
|
|
5
5
|
</h1>
|
|
6
6
|
<p align="center">
|
|
7
|
-
<b>
|
|
7
|
+
<b>Cucumber.js with Blinq.io adaptation</b>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
-
[
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
[](https://coveralls.io/github/cucumber/cucumber-js?branch=master)
|
|
14
|
-
[](https://opencollective.com/cucumber)
|
|
15
|
-
[](https://opencollective.com/cucumber)
|
|
16
|
-
|
|
17
|
-
[Cucumber](https://github.com/cucumber) is a tool for running automated tests written in plain language. Because they're
|
|
18
|
-
written in plain language, they can be read by anyone on your team. Because they can be
|
|
19
|
-
read by anyone, you can use them to help improve communication, collaboration and trust on
|
|
20
|
-
your team.
|
|
21
|
-
|
|
22
|
-
This is the JavaScript implementation of Cucumber. It runs on [maintained versions](https://github.com/nodejs/Release) of Node.js. You can [quickly try it via CodeSandbox](https://codesandbox.io/s/cucumber-js-demo-2p3vrl?file=/features/greeting.feature), or read on to get started locally in a couple of minutes.
|
|
23
|
-
|
|
24
|
-
Looking to contribute? Read our [code of conduct](https://github.com/cucumber/.github/blob/main/CODE_OF_CONDUCT.md) first, then check the [contributing guide](./CONTRIBUTING.md) to get up and running.
|
|
10
|
+
We took the regular old [Cucumber](https://github.com/cucumber) (A tool for running automated tests) and made improvements
|
|
11
|
+
that could be helpful when working with data that should be saved or when we want to generate fake data for testing
|
|
12
|
+
purposes in our Gherkin feature file.
|
|
25
13
|
|
|
26
14
|
## Install
|
|
27
15
|
|
|
28
|
-
|
|
16
|
+
@dev-blinq/cucumber-js is [available on npm](https://www.npmjs.com/package/@dev-blinq/cucumber-js):
|
|
29
17
|
|
|
30
18
|
```shell
|
|
31
|
-
$ npm install @
|
|
19
|
+
$ npm install @dev-blinq/cucumber-js
|
|
32
20
|
```
|
|
33
21
|
|
|
34
22
|
## Get Started
|
|
35
23
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
First, write your main code in `src/index.js`:
|
|
40
|
-
|
|
41
|
-
```js
|
|
42
|
-
class Greeter {
|
|
43
|
-
sayHello() {
|
|
44
|
-
return 'hello'
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
module.exports = {
|
|
49
|
-
Greeter
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Then, write your feature in `features/greeting.feature`:
|
|
24
|
+
Before, we used to write Gherkin feature files like this -
|
|
54
25
|
|
|
55
26
|
```gherkin
|
|
56
|
-
Feature:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
27
|
+
Feature: Github
|
|
28
|
+
Scenario Outline: Create a new repository
|
|
29
|
+
Given Create a new repository name "<repo>"
|
|
30
|
+
Examples:
|
|
31
|
+
| repo
|
|
32
|
+
| random_repo_name
|
|
61
33
|
```
|
|
62
34
|
|
|
63
|
-
|
|
35
|
+
Now, instead of picking a random name by ourselfs, we could fake data using the [faker](https://www.npmjs.com/package/@faker-js/faker) library and get a random value -
|
|
64
36
|
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
Then('I should have heard {string}', function (expectedResponse) {
|
|
75
|
-
assert.equal(this.whatIHeard, expectedResponse)
|
|
76
|
-
});
|
|
37
|
+
```gherkin
|
|
38
|
+
Feature: Github
|
|
39
|
+
Scenario Outline: Create a new repository
|
|
40
|
+
Given Create a new repository name "<repo>"
|
|
41
|
+
Examples:
|
|
42
|
+
| repo
|
|
43
|
+
| {{string.alpha(10)}}
|
|
77
44
|
```
|
|
78
45
|
|
|
79
|
-
|
|
46
|
+
We could also save our fake data (or any data really) as a variable for future use using the equals (=) sign -
|
|
80
47
|
|
|
81
|
-
```
|
|
82
|
-
|
|
48
|
+
```gherkin
|
|
49
|
+
Feature: Github
|
|
50
|
+
Scenario Outline: Create a new repository
|
|
51
|
+
Given Create a new repository name "<repo>"
|
|
52
|
+
Examples:
|
|
53
|
+
| repo
|
|
54
|
+
| {{repo=string.alpha(10)}}
|
|
55
|
+
|
|
56
|
+
Scenario Outline: Create a second repository
|
|
57
|
+
Given Create a new repository with the same name as before "<repo>"
|
|
58
|
+
Examples:
|
|
59
|
+
| repo
|
|
60
|
+
| {{repo}}
|
|
83
61
|
```
|
|
84
62
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-

|
|
88
|
-
|
|
89
|
-
If you learn best by example, we have [a repo with several example projects](https://github.com/cucumber/cucumber-js-examples), that might help you get going.
|
|
63
|
+
In that example, we saved repo as a variable with a value of some fake data and used it again as the second repo
|
|
64
|
+
value, both repos will have the same fake value.
|
|
90
65
|
|
|
91
66
|
## Documentation
|
|
92
67
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
* [Installation](./docs/installation.md)
|
|
96
|
-
* [CLI](./docs/cli.md)
|
|
97
|
-
* [Configuration](./docs/configuration.md)
|
|
98
|
-
* Support Code
|
|
99
|
-
* [API Reference](./docs/support_files/api_reference.md)
|
|
100
|
-
* [Attachments](./docs/support_files/attachments.md)
|
|
101
|
-
* [Data Tables](./docs/support_files/data_table_interface.md)
|
|
102
|
-
* [Hooks](./docs/support_files/hooks.md)
|
|
103
|
-
* [Step Definitions](./docs/support_files/step_definitions.md)
|
|
104
|
-
* [Timeouts](./docs/support_files/timeouts.md)
|
|
105
|
-
* [World](./docs/support_files/world.md)
|
|
106
|
-
* Guides
|
|
107
|
-
* [Debugging](./docs/debugging.md)
|
|
108
|
-
* [Dry run](./docs/dry_run.md)
|
|
109
|
-
* [ES Modules](./docs/esm.md)
|
|
110
|
-
* [Failing fast](./docs/fail_fast.md)
|
|
111
|
-
* [Filtering which scenarios run](./docs/filtering.md)
|
|
112
|
-
* [Formatters for feedback and reporting](./docs/formatters.md)
|
|
113
|
-
* [Parallel running for speed](./docs/parallel.md)
|
|
114
|
-
* [Profiles for composable configuration](./docs/profiles.md)
|
|
115
|
-
* [Rerunning just failures](./docs/rerun.md)
|
|
116
|
-
* [Retrying flaky scenarios](./docs/retry.md)
|
|
117
|
-
* [JavaScript API for running programmatically](./docs/javascript_api.md)
|
|
118
|
-
* [Snippets for undefined steps](./docs/snippets.md)
|
|
119
|
-
* [Transpiling (from TypeScript etc)](./docs/transpiling.md)
|
|
120
|
-
* [FAQ](./docs/faq.md)
|
|
121
|
-
|
|
122
|
-
## Support
|
|
123
|
-
|
|
124
|
-
Support is [available from the community](https://cucumber.io/tools/cucumber-open/support/) if you need it.
|
|
68
|
+
See documentation for the [Blinq.io](https://docs.blinq.io) app.
|
package/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.4";
|
package/lib/version.js
CHANGED
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,2BAA2B;AACd,QAAA,OAAO,GAAG,OAAO,CAAA","sourcesContent":["// Generated by genversion.\nexport const version = '1.0.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,2BAA2B;AACd,QAAA,OAAO,GAAG,OAAO,CAAA","sourcesContent":["// Generated by genversion.\nexport const version = '1.0.4'\n"]}
|