@zohodesk/testinglibrary 0.0.43-n20-experimental → 0.0.45-n20-experimental

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.
@@ -5,13 +5,25 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.copyCommonSpecs = copyCommonSpecs;
8
+ exports.copyGithubFolder = copyGithubFolder;
8
9
  var _fileUtils = require("./fileUtils");
9
10
  var _path = _interopRequireDefault(require("path"));
11
+ var _configConstants = _interopRequireDefault(require("../core/playwright/constants/configConstants"));
12
+ var _ConfigurationHelper = require("../core/playwright/configuration/ConfigurationHelper");
13
+ const stage = (0, _ConfigurationHelper.getRunStage)();
10
14
  function copyCommonSpecs() {
11
15
  const libraryPath = require.resolve("@zohodesk/testinglibrary");
12
16
  // libraryPath will be build/index.js to go to the common specs we need to go one level up
13
17
  const commonSpecPath = _path.default.resolve(libraryPath, '../', 'common');
14
- const destDirectory = _path.default.resolve(process.cwd(), 'uat', 'modules', '.testingLib-common');
18
+ const destDirectory = _path.default.resolve(process.cwd(), _configConstants.default.TEST_SLICE_FOLDER, stage, 'modules', '.testingLib-common');
15
19
  (0, _fileUtils.deleteFolder)(destDirectory);
16
20
  (0, _fileUtils.copyDirectory)(commonSpecPath, destDirectory);
21
+ }
22
+ function copyGithubFolder() {
23
+ const libraryPath = require.resolve("@zohodesk/testinglibrary");
24
+ // libraryPath will be build/index.js, go two levels up to reach the package root where .github lives
25
+ const githubSrcPath = _path.default.resolve(libraryPath, '../../', '.github');
26
+ const destDirectory = _path.default.resolve(process.cwd(), '../../', '.github');
27
+ (0, _fileUtils.deleteFolder)(destDirectory);
28
+ (0, _fileUtils.copyDirectory)(githubSrcPath, destDirectory);
17
29
  }