Skip to content

Commit f2b5cf7

Browse files
Merge pull request #123 from LambdaTest/dev
Release 2.4.2
2 parents e1407ec + 2b11178 commit f2b5cf7

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

commands/utils/poller/poller.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ function poll_build(lt_config, session_id, env) {
4141
console.log(stats);
4242
if (
4343
Object.keys(stats).length == 1 &&
44-
Object.keys(stats).includes("completed")
44+
(Object.keys(stats).includes("completed") ||
45+
Object.keys(stats).includes("passed"))
4546
) {
4647
resolve(0);
4748
} else {

commands/utils/validate.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,34 @@ module.exports = validate_config = function (lt_config, validation_configs) {
208208
reject("Smart UI porject name can not be blank");
209209
}
210210
}
211+
//validate if reporter json file is passed and exists
212+
if (
213+
lt_config["run_settings"]["reporter_config_file"] &&
214+
lt_config["run_settings"]["reporter_config_file"] != ""
215+
) {
216+
if (!fs.existsSync(lt_config["run_settings"]["reporter_config_file"])) {
217+
reject(
218+
"Error!! Reporter Json File does not exist, either remove the key reporter_config_file or pass a valid path"
219+
);
220+
} else {
221+
let rawdata = fs.readFileSync(
222+
lt_config["run_settings"]["reporter_config_file"]
223+
);
224+
try {
225+
let reporter_config = JSON.parse(rawdata);
226+
if (Object.keys(reporter_config).length == 0) {
227+
reject(
228+
"Error!! Reporter JSON File has no keys, either remove Key reporter_config_file from lambdatest config or pass some options"
229+
);
230+
}
231+
} catch {
232+
console.log(
233+
"reporter_config_file is not parsed, please provide a valid json in Reporter Config"
234+
);
235+
reject("Error!! Reporter JSON File does not has correct json");
236+
}
237+
}
238+
}
211239
resolve("Validated the Config");
212240
});
213241
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lambdatest-cypress-cli",
3-
"version": "2.4.1",
3+
"version": "2.4.2",
44
"description": "The lambdatest-cypress-cli is LambdaTest's command-line interface (CLI) aimed to help you run your Cypress tests on LambdaTest platform.",
55
"homepage": "https://github.com/LambdaTest/lambdatest-cypress-cli",
66
"author": "LambdaTest <[email protected]>",

0 commit comments

Comments
 (0)