@zohodesk/testinglibrary 0.1.8-stb-bdd-v5 → 0.1.8-stb-bdd-v6

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.
@@ -19,7 +19,7 @@ function stepFileCreation(featureContent, stepFilename, featureFilePath) {
19
19
  }
20
20
  async function generateSpecFiles() {
21
21
  const featureFilePattern = (0, _pathConfig.getFeatureFilePath)();
22
- const generatedFolderPath = _path.default.resolve(process.cwd(), 'uat', 'feature-gen');
22
+ const generatedFolderPath = _path.default.resolve(process.cwd(), 'uat', '.feature-gen');
23
23
  if (!(0, _fileUtils.checkIfFileExists)(generatedFolderPath)) {
24
24
  (0, _fileUtils.createFolderSync)(generatedFolderPath, {
25
25
  recursive: true
@@ -33,7 +33,10 @@ function testDataCreation() {
33
33
  scenarioTable: false
34
34
  };
35
35
  if ($scenario !== null && $scenario !== void 0 && $scenario.background) {
36
- $scenario.scenario = $scenario.background;
36
+ $scenario.scenario = {
37
+ ...$scenario.background,
38
+ examples: []
39
+ };
37
40
  }
38
41
  (_$scenario$scenario = $scenario.scenario) === null || _$scenario$scenario === void 0 || _$scenario$scenario.steps.forEach(step => {
39
42
  var _step$dataTable;
@@ -52,7 +55,7 @@ function testDataCreation() {
52
55
  const Table = cell.cells.map(element => element.value);
53
56
  dataTableStep.push(Table);
54
57
  });
55
- if (step.dataTable) {
58
+ if (step !== null && step !== void 0 && step.dataTable) {
56
59
  $currentScenario.dataTableStep = dataTableStep;
57
60
  $currentScenario.steptable = true;
58
61
  }
@@ -34,7 +34,7 @@ const projects = (0, _configUtils.getProjects)({
34
34
  viewport
35
35
  });
36
36
  // const testDir = getTestDir(bddMode, process.cwd(), { featureFilesFolder, stepDefinitionsFolder });
37
- const testDir = _path.default.resolve(process.cwd(), 'uat', 'feature-gen');
37
+ const testDir = _path.default.resolve(process.cwd(), 'uat', '.feature-gen');
38
38
  const testOptions = (0, _configUtils.getTestUseOptions)({
39
39
  trace,
40
40
  video,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/testinglibrary",
3
- "version": "0.1.8-stb-bdd-v5",
3
+ "version": "0.1.8-stb-bdd-v6",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {