browserstack-cypress-cli 1.18.0 → 1.19.0
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/archiver.js
CHANGED
|
@@ -83,7 +83,12 @@ const archiveSpecs = (runSettings, filePath, excludeFiles, md5data) => {
|
|
|
83
83
|
) {
|
|
84
84
|
if (runSettings.cypressTestSuiteType === Constants.CYPRESS_V10_AND_ABOVE_TYPE) {
|
|
85
85
|
let cypressConfigFileString = fs.readFileSync(runSettings.cypressConfigFilePath, {encoding: "utf-8"});
|
|
86
|
-
|
|
86
|
+
for (const possibleCypressFileName of Constants.CYPRESS_CONFIG_FILE_NAMES) {
|
|
87
|
+
if (path.extname(runSettings.cypress_config_filename) == path.extname(possibleCypressFileName)) {
|
|
88
|
+
archive.append(cypressConfigFileString, {name: `${cypressAppendFilesZipLocation}${possibleCypressFileName}`});
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
87
92
|
} else if (runSettings.cypressTestSuiteType === Constants.CYPRESS_V9_AND_OLDER_TYPE) {
|
|
88
93
|
let cypressJSON = JSON.parse(fs.readFileSync(runSettings.cypressConfigFilePath));
|
|
89
94
|
let cypressJSONString = JSON.stringify(cypressJSON, null, 4);
|
|
@@ -250,7 +250,7 @@ const validate = (bsConfig, args) => {
|
|
|
250
250
|
let listOfFiles = fs.readdirSync(cypressFileDirectory);
|
|
251
251
|
let configFilesPresent = [];
|
|
252
252
|
for (const possibleCypressFileName of Constants.CYPRESS_CONFIG_FILE_NAMES) {
|
|
253
|
-
if (listOfFiles.includes(possibleCypressFileName)) {
|
|
253
|
+
if (listOfFiles.includes(possibleCypressFileName) || path.extname(possibleCypressFileName) == path.extname(bsConfig.run_settings.cypress_config_filename)) {
|
|
254
254
|
configFilesPresent.push(possibleCypressFileName);
|
|
255
255
|
}
|
|
256
256
|
}
|
package/bin/helpers/constants.js
CHANGED
package/bin/helpers/utils.js
CHANGED
|
@@ -308,14 +308,14 @@ exports.setCypressConfigFilename = (bsConfig, args) => {
|
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
logger.debug(`Setting cypress config file path = ${bsConfig.run_settings.cypressConfigFilePath}`);
|
|
311
|
-
logger.debug(`Setting cypress project dir = ${bsConfig.run_settings.
|
|
311
|
+
logger.debug(`Setting cypress project dir = ${bsConfig.run_settings.cypressProjectDir}`);
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
exports.setCypressTestSuiteType = (bsConfig) => {
|
|
315
315
|
for (const possibleCypressFileName of Constants.CYPRESS_CONFIG_FILE_NAMES) {
|
|
316
316
|
if (bsConfig.run_settings.cypressConfigFilePath &&
|
|
317
317
|
typeof(bsConfig.run_settings.cypressConfigFilePath) === 'string' &&
|
|
318
|
-
bsConfig.run_settings.cypressConfigFilePath.endsWith(possibleCypressFileName)) {
|
|
318
|
+
(path.extname(bsConfig.run_settings.cypressConfigFilePath) == path.extname(possibleCypressFileName) || bsConfig.run_settings.cypressConfigFilePath.endsWith(possibleCypressFileName))) {
|
|
319
319
|
bsConfig.run_settings.cypressTestSuiteType = Constants.CYPRESS_CONFIG_FILE_MAPPING[possibleCypressFileName].type;
|
|
320
320
|
break;
|
|
321
321
|
}
|
package/bin/runner.js
CHANGED