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.
@@ -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
- archive.append(cypressConfigFileString, {name: `${cypressAppendFilesZipLocation}${runSettings.cypress_config_filename}`});
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
  }
@@ -306,6 +306,8 @@ const allowedFileTypes = [
306
306
  "pmc",
307
307
  "pmp",
308
308
  "max",
309
+ "mjpeg",
310
+ "y4m"
309
311
  ];
310
312
 
311
313
  const filesToIgnoreWhileUploading = [
@@ -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.cypressProjDir}`);
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
@@ -136,7 +136,7 @@ var argv = yargs
136
136
  'ccf': {
137
137
  alias: 'cypress-config-file',
138
138
  describe: Constants.cliMessages.RUN.CYPRESS_DESC,
139
- default: './cypress.config.js',
139
+ default: './cypress.json',
140
140
  type: 'string',
141
141
  nargs: 1,
142
142
  demand: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserstack-cypress-cli",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "BrowserStack Cypress CLI for Cypress integration with BrowserStack's remote devices.",
5
5
  "main": "index.js",
6
6
  "scripts": {