browserstack-cypress-cli 1.32.4 → 1.32.6
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.
- package/bin/helpers/atsHelper.js +4 -2
- package/bin/helpers/utils.js +11 -4
- package/package.json +1 -1
- package/.nyc_output/09a0e0ae-5d0a-4d86-b6de-713f51cceac6.json +0 -1
- package/.nyc_output/30909378-c904-4fb4-9b14-25f7d6cb4c0e.json +0 -1
- package/.nyc_output/69956eaf-b7bb-410d-a4b8-b77fb53837a8.json +0 -1
- package/.nyc_output/processinfo/09a0e0ae-5d0a-4d86-b6de-713f51cceac6.json +0 -1
- package/.nyc_output/processinfo/30909378-c904-4fb4-9b14-25f7d6cb4c0e.json +0 -1
- package/.nyc_output/processinfo/69956eaf-b7bb-410d-a4b8-b77fb53837a8.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/log/usage.log +0 -9
package/bin/helpers/atsHelper.js
CHANGED
|
@@ -2,7 +2,7 @@ const path = require('path');
|
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const { consoleHolder } = require('../testObservability/helper/constants');
|
|
4
4
|
const HttpsProxyAgent = require('https-proxy-agent');
|
|
5
|
-
|
|
5
|
+
const { v4: uuidv4 } = require('uuid');
|
|
6
6
|
const axios = require('axios'),
|
|
7
7
|
logger = require('./logger').winstonLogger,
|
|
8
8
|
utils = require('./utils'),
|
|
@@ -108,7 +108,9 @@ exports.patchCypressConfigFileContent = (bsConfig) => {
|
|
|
108
108
|
|
|
109
109
|
let confPath = bsConfig.run_settings.cypress_config_file;
|
|
110
110
|
let patchedConfPathList = confPath.split(path.sep);
|
|
111
|
-
|
|
111
|
+
const uniqueNamePatchFileName = `patched_ats_config_file_${uuidv4()}.js`;
|
|
112
|
+
patchedConfPathList[patchedConfPathList.length - 1] = uniqueNamePatchFileName;
|
|
113
|
+
logger.debug("Patch file name is " + uniqueNamePatchFileName);
|
|
112
114
|
const patchedConfPath = patchedConfPathList.join(path.sep);
|
|
113
115
|
|
|
114
116
|
bsConfig.run_settings.patched_cypress_config_file = patchedConfPath;
|
package/bin/helpers/utils.js
CHANGED
|
@@ -1179,10 +1179,17 @@ exports.getNumberOfSpecFiles = (bsConfig, args, cypressConfig, turboScaleSession
|
|
|
1179
1179
|
logger.debug(`${files ? files.length : 0} spec files found`);
|
|
1180
1180
|
|
|
1181
1181
|
if (turboScaleSession) {
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1182
|
+
if (bsConfig.run_settings.cypress_config_file && bsConfig.run_settings.cypress_config_filename !== 'false') {
|
|
1183
|
+
const configFilePath = path.resolve(bsConfig.run_settings.cypressConfigFilePath);
|
|
1184
|
+
const directory = path.join(path.dirname(configFilePath), '/');
|
|
1185
|
+
// remove unwanted path prefix for turboscale
|
|
1186
|
+
files = files.map((x) => { return path.join('', x.split(directory)[1]) })
|
|
1187
|
+
// setting specs for turboScale as we don't have patched API for turboscale so we will rely on info from CLI
|
|
1188
|
+
bsConfig.run_settings.specs = files;
|
|
1189
|
+
} else {
|
|
1190
|
+
files = files.map((x) => { return path.join(testFolderPath, x.split(testFolderPath)[1]) })
|
|
1191
|
+
bsConfig.run_settings.specs = files;
|
|
1192
|
+
}
|
|
1186
1193
|
}
|
|
1187
1194
|
return files;
|
|
1188
1195
|
};
|