Skip to content

Commit

Permalink
Merge pull request #189 from LambdaTest/dev
Browse files Browse the repository at this point in the history
dev -> master
  • Loading branch information
asad9711 authored Sep 10, 2022
2 parents 0d64376 + 227c040 commit 9095327
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 16 deletions.
6 changes: 3 additions & 3 deletions commands/default_custom_support_file.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const addContext = require('mochawesome/addContext')

// NOTE: import this file in cypress/support/e2e.js
// import '../../custom_support_file';
// require('../../custom_support_file');

Cypress.on('test:after:run', (test, runnable) => {
if (test.state === 'failed') {
let item = runnable
Expand All @@ -20,9 +23,6 @@ Cypress.on('test:after:run', (test, runnable) => {
.join(' -- ') // this is how cypress joins the test title fragments

const imageUrl = `${fullTestName} (failed).png`

addContext({ test }, imageUrl)


}
})
6 changes: 1 addition & 5 deletions commands/utils/archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function archive_batch(lt_config, batch) {
} else if (!lt_config["run_settings"]["cypress_config_file"]) {
archive.append("{}", { name: constants.CYPRESS_CONFIG_NAME });
}
if (lt_config["run_settings"]["reporter_config_file"]) {
if (lt_config["run_settings"]["reporter_config_file"] && lt_config["run_settings"]["reporter_config_file"] !="") {
if (fs.existsSync(lt_config["run_settings"]["reporter_config_file"])) {
let rawdata = fs.readFileSync(
lt_config["run_settings"]["reporter_config_file"]
Expand All @@ -243,10 +243,6 @@ function archive_batch(lt_config, batch) {
lt_config["run_settings"]["reporter_config_file"]
),
});
} else {
reject(
"Provided reporter config file not found. Please check the provided the value of reporter_config_file in lambdatest-config.json"
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion commands/utils/default_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
reporter_config_file: "base_reporter_config.json",
build_name: "build-name",
parallels: 1,
specs: "./*.spec.js",
specs: "<path_of_cypress_spec_files>",
ignore_files: "",
network: false,
headless: false,
Expand Down
8 changes: 4 additions & 4 deletions commands/utils/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,16 @@ module.exports = validate_config = function (lt_config, validation_configs) {
if (!("project" in lt_config.run_settings.smart_ui)) {
reject("Smart UI project name is missing");
} else if (lt_config.run_settings.smart_ui.project == "") {
reject("Smart UI porject name can not be blank");
reject("Smart UI project name can not be blank");
}
}
if (
lt_config["run_settings"]["reporter_config_file"] &&
lt_config["run_settings"]["reporter_config_file"] != ""
) {
if (!fs.existsSync(lt_config["run_settings"]["reporter_config_file"])) {
reject(
"Error!! Reporter Config File does not exist, Pass a valid path"
console.log(
"Warning!! Reporter Config File does not exist, Commands section on dashboard may not get generated. Use lambdatest-cypress init command to generate."
);
} else {
let rawdata = fs.readFileSync(
Expand All @@ -251,7 +251,7 @@ module.exports = validate_config = function (lt_config, validation_configs) {
}
}
}else{
console.log("Warning !! Value of reporter_config_file parameter missing. Proceeding with default reporter config")
console.log("Warning!! Value of reporter_config_file parameter missing. Proceeding with default reporter config")
}

if (
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lambdatest-cypress-cli",
"version": "3.0.0",
"version": "3.0.1",
"description": "The lambdatest-cypress-cli is LambdaTest's command-line interface (CLI) aimed to help you run your Cypress tests on LambdaTest platform.",
"homepage": "https://github.com/LambdaTest/lambdatest-cypress-cli",
"author": "LambdaTest <[email protected]>",
Expand Down

0 comments on commit 9095327

Please sign in to comment.