Skip to content

dev -> master #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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