@zohodesk/testinglibrary 0.1.8-stb-bdd-v15 → 0.1.8-stb-bdd-v16

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.
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.throwNotImplementError = throwNotImplementError;
7
+ var _logger = require("../../utils/logger");
8
+ function throwNotImplementError(step, stepInSpec, keyword) {
9
+ return _logger.Logger.log(_logger.Logger.FAILURE_TYPE, `
10
+ \n ${step} - Not Implemented
11
+ \n ${keyword}(${stepInSpec},async({page}) => {
12
+ \n ..........................................
13
+ \n }
14
+ `);
15
+ }
@@ -31,7 +31,7 @@ function extractPageFixtures(filePath) {
31
31
  const trimmedStep = step.trim();
32
32
  if (trimmedStep.startsWith('Given') || trimmedStep.startsWith('When') || trimmedStep.startsWith('Then') || trimmedStep.startsWith('And') || trimmedStep.startsWith('Step')) {
33
33
  var sortedSpecInput = extractInputFrmStep(trimmedStep, filePath);
34
- testDataMap.set(extractDescriptionFrmStep(trimmedStep), sortedSpecInput.pop());
34
+ testDataMap.set(extractDescriptionFrmStep(trimmedStep), sortedSpecInput);
35
35
  }
36
36
  });
37
37
  }
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.extractStepArgument = extractStepArgument;
7
7
  exports.testSnippet = testSnippet;
8
8
  var _logger = require("../../utils/logger");
9
+ var _throwError = require("../errors/throwError");
9
10
  var _stringManipulation = require("../utils/stringManipulation");
10
11
  var _stepsnippets = require("./stepGenerate/stepsnippets");
11
12
  function testSnippet(parsedFeature, featureFilePath) {
@@ -51,10 +52,10 @@ function scenarioSnippet(scenario) {
51
52
  convertedStep,
52
53
  currentArgument
53
54
  } = extractStepArgument(step.stepDescription);
54
- var pageFixtureUsed_Step = testDataMap.get(`'${convertedStep}'`) || null;
55
+ var pageFixtureUsed_Step = testDataMap.get(convertedStep) || null;
55
56
  /** Step Implementation Check (Walk Through Approach)*/
56
57
  if (!pageFixtureUsed_Step) {
57
- _logger.Logger.log(_logger.Logger.FAILURE_TYPE, `${step.stepDescription} Not Implemented`);
58
+ (0, _throwError.throwNotImplementError)(step.stepDescription, convertedStep, step.keyword);
58
59
  process.exit(0);
59
60
  }
60
61
  currentInputs.push(pageFixtureUsed_Step);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/testinglibrary",
3
- "version": "0.1.8-stb-bdd-v15",
3
+ "version": "0.1.8-stb-bdd-v16",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {