datagrok-tools 4.14.59 → 4.14.61
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.
- package/bin/commands/test-all.js +5 -1
- package/bin/utils/test-utils.js +11 -1
- package/package.json +1 -1
package/bin/commands/test-all.js
CHANGED
|
@@ -79,7 +79,9 @@ async function testAll(args) {
|
|
|
79
79
|
(0, _testUtils.printBrowsersResult)(result, args.verbose);
|
|
80
80
|
}
|
|
81
81
|
if (args.csv) {
|
|
82
|
-
console.log(`Saving ${testsResults.length} results`);
|
|
82
|
+
console.log(`Saving ${testsResults.length} browsers results`);
|
|
83
|
+
for (const res of testsResults) console.log(`DEBUG: testAll: number of lines in csv ${res.csv.length}`);
|
|
84
|
+
console.log(`Saving ${testsResults.length} browsers results`);
|
|
83
85
|
(0, _testUtils.saveCsvResults)(testsResults.map(result => result.csv), csvReportDir);
|
|
84
86
|
}
|
|
85
87
|
return testsResults.every(test => !test.failed);
|
|
@@ -121,10 +123,12 @@ async function runTests(browsersOrder, browserOptions) {
|
|
|
121
123
|
browsersPromises.push((0, _testUtils.runBrowser)(browserCommands, browserOptions, browsersStarted++, testInvocationTimeout));
|
|
122
124
|
}
|
|
123
125
|
let resultObjects = await Promise.all(browsersPromises);
|
|
126
|
+
for (const res of resultObjects) console.log(`DEBUG: runTests BEFORE LOOP: number of lines in csv ${res.csv.length}`);
|
|
124
127
|
for (let i = 0; i < resultObjects.length; i++) {
|
|
125
128
|
resultObjects[i].csv = (0, _testUtils.addColumnToCsv)(resultObjects[i].csv, "browser", i);
|
|
126
129
|
resultObjects[i].csv = (0, _testUtils.addColumnToCsv)(resultObjects[i].csv, "stress_test", browserOptions.stressTest ?? false);
|
|
127
130
|
resultObjects[i].csv = (0, _testUtils.addColumnToCsv)(resultObjects[i].csv, "benchmark", browserOptions.benchmark ?? false);
|
|
128
131
|
}
|
|
132
|
+
for (const res of resultObjects) console.log(`DEBUG: runTests AFTER LOOP: number of lines in csv ${res.csv.length}`);
|
|
129
133
|
return resultObjects;
|
|
130
134
|
}
|
package/bin/utils/test-utils.js
CHANGED
|
@@ -358,6 +358,7 @@ async function runTests(testsParams, stopOnFail) {
|
|
|
358
358
|
continue;
|
|
359
359
|
}
|
|
360
360
|
let row = df.rows.get(0);
|
|
361
|
+
console.log(`DEBUG: runTests: IN A LOOP: rows in df ${df.rowCount}`);
|
|
361
362
|
if (df.rowCount > 1) {
|
|
362
363
|
const unhandledErrorRow = df.rows.get(1);
|
|
363
364
|
if (!unhandledErrorRow.get('success')) {
|
|
@@ -378,7 +379,13 @@ async function runTests(testsParams, stopOnFail) {
|
|
|
378
379
|
if (df.col('widgetsDifference')) df.changeColumnType('widgetsDifference', window.DG.COLUMN_TYPE.STRING);
|
|
379
380
|
// df.changeColumnType('memoryDelta', (<any>window).DG.COLUMN_TYPE.BIG_INT);
|
|
380
381
|
|
|
381
|
-
if (resultDF === undefined) resultDF = df;else
|
|
382
|
+
if (resultDF === undefined) resultDF = df;else {
|
|
383
|
+
console.log(`DEBUG: COLUMN NAMES IN RESULT_DF: ${resultDF.columns.names()}`);
|
|
384
|
+
console.log(`DEBUG: COLUMN TYPES IN RESULT_DF: ${resultDF.columns.names().map(c => `${c}: ${resultDF.col(c)?.type}`)}`);
|
|
385
|
+
console.log(`DEBUG: COLUMN NAMES IN DF: ${df.columns.names()}`);
|
|
386
|
+
console.log(`DEBUG: COLUMN TYPES IN DF: ${df.columns.names().map(c => `${c}: ${df.col(c)?.type}`)}`);
|
|
387
|
+
resultDF = resultDF.append(df);
|
|
388
|
+
}
|
|
382
389
|
if (row['skipped']) {
|
|
383
390
|
verboseSkipped += `Test result : Skipped : ${time} : ${category}: ${testName} : ${result}\n`;
|
|
384
391
|
countSkipped += 1;
|
|
@@ -397,6 +404,7 @@ async function runTests(testsParams, stopOnFail) {
|
|
|
397
404
|
debugger;
|
|
398
405
|
}
|
|
399
406
|
res = '';
|
|
407
|
+
console.log(`DEBUG: runTests: AFTER THE LOOP: rows in resultDF ${resultDF?.rowCount}`);
|
|
400
408
|
if (resultDF) {
|
|
401
409
|
const bs = window.DG.BitSet.create(resultDF.rowCount);
|
|
402
410
|
bs.setAll(true);
|
|
@@ -404,7 +412,9 @@ async function runTests(testsParams, stopOnFail) {
|
|
|
404
412
|
if (resultDF.rows.get(i).get('category') === 'Unhandled exceptions') bs.set(i, false);
|
|
405
413
|
}
|
|
406
414
|
resultDF = resultDF.clone(bs);
|
|
415
|
+
console.log(`DEBUG: runTests: IN IF CONDITION: rows in resultDF ${resultDF.rowCount}`);
|
|
407
416
|
res = resultDF.toCsv();
|
|
417
|
+
console.log(`DEBUG: runTests: IN IF CONDITION: csv length ${res?.length}`);
|
|
408
418
|
}
|
|
409
419
|
} catch (e) {
|
|
410
420
|
failed = true;
|
package/package.json
CHANGED