@qavajs/cypress-runner-adapter 1.5.0 → 1.7.0

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/CHANGELOG.md CHANGED
@@ -14,6 +14,13 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
14
14
 
15
15
  :microscope: - experimental
16
16
 
17
+ ## [1.7.0]
18
+ - :rocket: updated @cucumber/cucumber-expressions, @cucumber/gherkin, @cucumber/tag-expressions
19
+
20
+ ## [1.6.0]
21
+ - :rocket: updated logs for Gherkin steps
22
+ - :rocket: improved multi line and data table step logging
23
+
17
24
  ## [1.5.0]
18
25
  - :rocket: added `world.log` method
19
26
  - :rocket: updated test.body to render corresponding step code
@@ -12,6 +12,14 @@ module.exports = function makeMochaTest(tests) {
12
12
  }
13
13
  }
14
14
 
15
+ function stepName(pickleStep) {
16
+ let step = pickleStep.text;
17
+ if (pickleStep.argument) {
18
+ step += pickleStep.argument.docString ? ' [MultiLine]' : ' [DataTable]';
19
+ }
20
+ return step;
21
+ }
22
+
15
23
  function findStepDefinition(text) {
16
24
  const steps = supportCodeLibrary.stepDefinitions
17
25
  .filter(stepDefinition => stepDefinition.matchesStepName(text));
@@ -107,7 +115,7 @@ module.exports = function makeMochaTest(tests) {
107
115
  }
108
116
  }
109
117
  for (const step of test.steps) {
110
- it(keyword(step) + ': ' + step.text, function () {
118
+ it(`${keyword(step)} ${stepName(step)}`, function () {
111
119
  this.test.body = findStepDefinition(step.text).code.toString();
112
120
  this.step = step;
113
121
  if (skip) return this.skip();
@@ -16,6 +16,14 @@ module.exports = function makeMochaTest(tests) {
16
16
  }
17
17
  }
18
18
 
19
+ function stepNameText(pickleStep) {
20
+ let step = pickleStep.text;
21
+ if (pickleStep.argument) {
22
+ step += pickleStep.argument.docString ? ' [MultiLine]' : ' [DataTable]';
23
+ }
24
+ return step;
25
+ }
26
+
19
27
  function getResult(currentTest) {
20
28
  return {
21
29
  duration: currentTest.duration,
@@ -132,7 +140,7 @@ module.exports = function makeMochaTest(tests) {
132
140
  it('Scenario: ' + test.name, function () {
133
141
  const world = this.world;
134
142
  for (const step of test.steps) {
135
- const stepName = keyword(step) + ': ' + step.text;
143
+ const stepName = `${keyword(step)} ${stepNameText(step)}`;
136
144
  runStep(stepName, function () {
137
145
  this.step = step;
138
146
  const result = {status: 'passed', duration: 0};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qavajs/cypress-runner-adapter",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "debug": "cypress open --config-file test/cypress.config.js",
@@ -22,14 +22,14 @@
22
22
  },
23
23
  "homepage": "https://qavajs.github.io/docs/intro",
24
24
  "dependencies": {
25
- "@cucumber/cucumber-expressions": "^18.0.1",
26
- "@cucumber/gherkin": "^37.0.0",
27
- "@cucumber/tag-expressions": "^8.1.0",
25
+ "@cucumber/cucumber-expressions": "^19.0.0",
26
+ "@cucumber/gherkin": "^38.0.0",
27
+ "@cucumber/tag-expressions": "^9.1.0",
28
28
  "@cypress/webpack-preprocessor": "^7.0.2",
29
- "fs-extra": "^11.3.2"
29
+ "fs-extra": "^11.3.3"
30
30
  },
31
31
  "devDependencies": {
32
- "cypress": "^15.7.0",
32
+ "cypress": "^15.10.0",
33
33
  "mochawesome": "^7.1.4"
34
34
  },
35
35
  "keywords": [