@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 CHANGED
@@ -1,124 +1,68 @@
1
1
  <h1 align="center">
2
- <img src="./docs/images/logo.svg" alt="">
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>Automated tests in plain language, for Node.js</b>
7
+ <b>Cucumber.js with Blinq.io adaptation</b>
8
8
  </p>
9
9
 
10
- [![#StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://vshymanskyy.github.io/StandWithUkraine)
11
- [![npm](https://img.shields.io/npm/v/@cucumber/cucumber.svg)](https://www.npmjs.com/package/@cucumber/cucumber)
12
- [![build](https://github.com/cucumber/cucumber-js/workflows/Build/badge.svg)](https://github.com/cucumber/cucumber-js/actions)
13
- [![coverage](https://coveralls.io/repos/github/cucumber/cucumber-js/badge.svg?branch=master)](https://coveralls.io/github/cucumber/cucumber-js?branch=master)
14
- [![backers](https://opencollective.com/cucumber/backers/badge.svg)](https://opencollective.com/cucumber)
15
- [![sponsors](https://opencollective.com/cucumber/sponsors/badge.svg)](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
- Cucumber is [available on npm](https://www.npmjs.com/package/@cucumber/cucumber):
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 @cucumber/cucumber
19
+ $ npm install @dev-blinq/cucumber-js
32
20
  ```
33
21
 
34
22
  ## Get Started
35
23
 
36
- Let's take this example of something to test:
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: Greeting
57
-
58
- Scenario: Say hello
59
- When the greeter says hello
60
- Then I should have heard "hello"
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
- Next, implement your steps in `features/support/steps.js`:
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
- ```js
66
- const assert = require('assert')
67
- const { When, Then } = require('@cucumber/cucumber')
68
- const { Greeter } = require('../../src')
69
-
70
- When('the greeter says hello', function () {
71
- this.whatIHeard = new Greeter().sayHello()
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
- Finally, run Cucumber:
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
- ```shell
82
- $ npx cucumber-js
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
- And see the output:
86
-
87
- ![Terminal output showing a successful test run with 1 scenario and 2 steps, all passing](./docs/images/readme-output.png)
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
- The following documentation is for `main`, which might contain some unreleased features. See [documentation for older versions](./docs/older_versions.md) if you need it.
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.3";
1
+ export declare const version = "1.0.4";
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 = '1.0.3';
5
+ exports.version = '1.0.4';
6
6
  //# sourceMappingURL=version.js.map
@@ -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.3'\n"]}
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"]}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "gherkin",
9
9
  "tests"
10
10
  ],
11
- "version": "1.0.3",
11
+ "version": "1.0.4",
12
12
  "homepage": "https://github.com/blinq-io/cucumber-js",
13
13
  "author": "blinq.io",
14
14
  "contributors": [