You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
loggerWarningSpy=sinon.stub(logger,'warn').returns('You have passed an invalid value to the interactive_debugging capability. Proceeding with the default value (True).');
1236
+
});
1237
+
1238
+
afterEach(function(){
1239
+
loggerWarningSpy.restore();
1240
+
});
1241
+
it("show the warning if interactive_debugging passed is a non boolean value",()=>{
1242
+
letbsConfig={
1243
+
auth: {},
1244
+
browsers: [
1245
+
{
1246
+
browser: "chrome",
1247
+
os: "Windows 10",
1248
+
versions: ["78","77"],
1249
+
},
1250
+
],
1251
+
run_settings: {
1252
+
cypress_proj_dir: "random path",
1253
+
cypressConfigFilePath: "random path",
1254
+
cypressProjectDir: "random path",
1255
+
cypress_config_filename: "false",
1256
+
interactive_debugging: "abc"
1257
+
},
1258
+
connection_settings: {}
1259
+
}
1260
+
// sinon.assert.calledWith(loggerWarningSpy, 'You have passed an invalid value to the interactive_debugging capability. Proceeding with the default value (True).');
1261
+
returncapabilityHelper
1262
+
.validate(bsConfig,{})
1263
+
.then(function(data){
1264
+
sinon.assert.calledWith(loggerWarningSpy,'You have passed an invalid value to the interactive_debugging capability. Proceeding with the default value (True).');
1265
+
});
1266
+
});
1267
+
1268
+
it("show the warning if interactiveDebugging passed is a non boolean value",()=>{
1269
+
letbsConfig={
1270
+
auth: {},
1271
+
browsers: [
1272
+
{
1273
+
browser: "chrome",
1274
+
os: "Windows 10",
1275
+
versions: ["78","77"],
1276
+
},
1277
+
],
1278
+
run_settings: {
1279
+
cypress_proj_dir: "random path",
1280
+
cypressConfigFilePath: "random path",
1281
+
cypressProjectDir: "random path",
1282
+
cypress_config_filename: "false",
1283
+
interactiveDebugging: "abc"
1284
+
},
1285
+
connection_settings: {}
1286
+
}
1287
+
// sinon.assert.calledWith(loggerWarningSpy, 'You have passed an invalid value to the interactive_debugging capability. Proceeding with the default value (True).');
1288
+
returncapabilityHelper
1289
+
.validate(bsConfig,{})
1290
+
.then(function(data){
1291
+
sinon.assert.calledWith(loggerWarningSpy,'You have passed an invalid value to the interactive_debugging capability. Proceeding with the default value (True).');
1292
+
});
1293
+
});
1294
+
1295
+
it("show the warning if both the interactive caps are non boolean",()=>{
1296
+
letbsConfig={
1297
+
auth: {},
1298
+
browsers: [
1299
+
{
1300
+
browser: "chrome",
1301
+
os: "Windows 10",
1302
+
versions: ["78","77"],
1303
+
},
1304
+
],
1305
+
run_settings: {
1306
+
cypress_proj_dir: "random path",
1307
+
cypressConfigFilePath: "random path",
1308
+
cypressProjectDir: "random path",
1309
+
cypress_config_filename: "false",
1310
+
interactiveDebugging: "def",
1311
+
interactive_debugging: "abc"
1312
+
},
1313
+
connection_settings: {}
1314
+
}
1315
+
// sinon.assert.calledWith(loggerWarningSpy, 'You have passed an invalid value to the interactive_debugging capability. Proceeding with the default value (True).');
1316
+
returncapabilityHelper
1317
+
.validate(bsConfig,{})
1318
+
.then(function(data){
1319
+
sinon.assert.calledWith(loggerWarningSpy,'You have passed an invalid value to the interactive_debugging capability. Proceeding with the default value (True).');
0 commit comments