@zohodesk/testinglibrary 3.1.13 → 3.1.14

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.
@@ -38,9 +38,17 @@ const projects = (0, _configUtils.getProjects)({
38
38
  testTimeout,
39
39
  viewport
40
40
  });
41
- const testDir = (0, _configUtils.getTestDir)(bddMode, process.cwd(), {
42
- featureFilesFolder,
43
- stepDefinitionsFolder
41
+ const testDir = (0, _configUtils.getTestDir)(bddMode, {
42
+ featureFilesFolder: (0, _configUtils.getPathsForFeatureFiles)(process.cwd()),
43
+ stepDefinitionsFolder: _path.default.join(process.cwd(), 'uat', '**', 'steps', '*.spec.js'),
44
+ outputDir: _path.default.join(process.cwd(), 'uat', '.features-gen'),
45
+ uatPath: _path.default.join(process.cwd(), 'uat')
46
+ });
47
+ const smokeTestDir = (0, _configUtils.getTestDir)(bddMode, {
48
+ featureFilesFolder: _path.default.join(process.cwd(), 'uat', 'smokeTest', '**', '*.feature'),
49
+ stepDefinitionsFolder: _path.default.join(process.cwd(), 'uat', 'smokeTest', '**', '*smokeTest.spec.js'),
50
+ outputDir: _path.default.join(process.cwd(), 'uat', '.features-smoke-gen'),
51
+ uatPath: _path.default.join(process.cwd(), 'uat', 'smokeTest')
44
52
  });
45
53
  const use = {
46
54
  trace,
@@ -71,8 +79,7 @@ function getPlaywrightConfig() {
71
79
  const dependencies = isAuthMode ? ['setup'] : [];
72
80
  const smokeTestProject = {
73
81
  name: 'smokeTest',
74
- testMatch: /.*\.smokeTest\.js/,
75
- testDir: _path.default.join(process.cwd(), 'uat'),
82
+ testDir: smokeTestDir,
76
83
  use: {
77
84
  ...commonConfig
78
85
  },
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.getBrowsersList = getBrowsersList;
8
8
  exports.getModulePathForFeatureFiles = getModulePathForFeatureFiles;
9
+ exports.getPathsForFeatureFiles = getPathsForFeatureFiles;
9
10
  exports.getProjects = getProjects;
10
11
  exports.getTestDir = getTestDir;
11
12
  var _test = require("@playwright/test");
@@ -168,18 +169,21 @@ function getModulePathForFeatureFiles(moduleList) {
168
169
  });
169
170
  return validModuleList;
170
171
  }
171
- function getTestDir(bddMode, cwd, {
172
- stepDefinitionsFolder
172
+ function getTestDir(bddMode, {
173
+ featureFilesFolder,
174
+ stepDefinitionsFolder,
175
+ outputDir,
176
+ uatPath
173
177
  }) {
174
178
  return bddMode ? (0, _playwrightBdd.defineBddConfig)({
175
- features: getPathsForFeatureFiles(cwd),
176
- steps: [_path.default.join(cwd, 'uat', '**', stepDefinitionsFolder, '*.spec.js'), require.resolve('../fixtures.js')],
179
+ features: featureFilesFolder,
180
+ steps: [stepDefinitionsFolder, require.resolve('../fixtures.js')],
177
181
  importTestFrom: require.resolve('../fixtures.js'),
178
- featuresRoot: _path.default.join(cwd, 'uat'),
179
- outputDir: _path.default.join(cwd, 'uat', '.features-gen'),
182
+ featuresRoot: uatPath,
183
+ outputDir: outputDir,
180
184
  disableWarnings: {
181
185
  importTestFrom: true
182
186
  },
183
187
  publish: true
184
- }) : _path.default.join(cwd, 'uat');
188
+ }) : uatPath;
185
189
  }