@zohodesk/testinglibrary 3.2.0 → 3.2.2

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.
@@ -44,12 +44,6 @@ const testDir = (0, _configUtils.getTestDir)(bddMode, {
44
44
  outputDir: _path.default.join(process.cwd(), 'uat', '.features-gen'),
45
45
  uatPath: _path.default.join(process.cwd(), 'uat')
46
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')
52
- });
53
47
  const use = {
54
48
  trace,
55
49
  video,
@@ -77,14 +71,23 @@ function getPlaywrightConfig() {
77
71
  storageState: isAuthMode ? (0, _readConfigFile.getAuthFilePath)(_path.default.resolve(process.cwd(), authFilePath)) : {}
78
72
  };
79
73
  const dependencies = isAuthMode ? ['setup'] : [];
80
- const smokeTestProject = {
81
- name: 'smokeTest',
82
- testDir: smokeTestDir,
83
- use: {
84
- ...commonConfig
85
- },
86
- dependencies: dependencies
87
- };
74
+ const smokeTestProject = isSmokeTest ? smokeTestConfig() : [];
75
+ function smokeTestConfig() {
76
+ const smokeTestDir = (0, _configUtils.getTestDir)(bddMode, {
77
+ featureFilesFolder: _path.default.join(process.cwd(), 'uat', 'smokeTest', '**', '*.feature'),
78
+ stepDefinitionsFolder: _path.default.join(process.cwd(), 'uat', 'smokeTest', '**', '*smokeTest.spec.js'),
79
+ outputDir: _path.default.join(process.cwd(), 'uat', '.features-smoke-gen'),
80
+ uatPath: _path.default.join(process.cwd(), 'uat', 'smokeTest')
81
+ });
82
+ return {
83
+ name: 'smokeTest',
84
+ testDir: smokeTestDir,
85
+ use: {
86
+ ...commonConfig
87
+ },
88
+ dependencies: dependencies
89
+ };
90
+ }
88
91
  const playwrightConfig = {
89
92
  testDir,
90
93
  globalTimeout: globalTimeout || 3600000,
@@ -101,11 +104,11 @@ function getPlaywrightConfig() {
101
104
  testMatch: /.*\.setup\.js/,
102
105
  testDir: _path.default.join(process.cwd(), 'uat'),
103
106
  teardown: 'cleanup'
104
- }, ...(isSmokeTest ? [smokeTestProject] : []), {
107
+ }, smokeTestProject, {
105
108
  name: 'cleanup',
106
109
  testMatch: /.*\.teardown\.js/,
107
110
  testDir: _path.default.join(process.cwd(), 'uat')
108
- }, ...projects] : [...projects, ...(isSmokeTest ? [smokeTestProject] : [])],
111
+ }, ...projects] : [...projects, smokeTestProject],
109
112
  ...uatConfig
110
113
  };
111
114
  return playwrightConfig;
@@ -105,7 +105,7 @@ function main() {
105
105
  //This is only used for pass the user arguments to need places in legacy code. We need to rewamp that also.
106
106
  const userArgsObject = userArgConfig.getAll();
107
107
  const tagProcessor = new _tagProcessor.default(editionOrder);
108
- const tagArgs = tagProcessor.processTags(userArgsObject);
108
+ const tagArgs = tagProcessor.processTags(uatConfig.getAll());
109
109
  const runnerObj = new _Runner.default();
110
110
  runnerObj.setTagArgs(tagArgs);
111
111
  runnerObj.setUserArgs(userArgsObject);