@nsshunt/ststestrunner 1.1.129 → 1.1.131
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/dist/ststestrunner.cjs +21 -131
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +21 -131
- package/dist/ststestrunner.mjs.map +1 -1
- package/package.json +1 -1
- package/types/libmodule/testCaseFhir02.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir03.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir04.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir05.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir06.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir07.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir08.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir09.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir10.d.ts.map +1 -1
- package/types/libmodule/testCaseFhirBase.d.ts +1 -0
- package/types/libmodule/testCaseFhirBase.d.ts.map +1 -1
package/dist/ststestrunner.cjs
CHANGED
|
@@ -1231,6 +1231,17 @@ var TestCaseFhirBase = class {
|
|
|
1231
1231
|
GetClient = async () => {
|
|
1232
1232
|
return this.runnerExecutionWorker.GetClient();
|
|
1233
1233
|
};
|
|
1234
|
+
CheckReturnData = (p1obj, p2obj) => {
|
|
1235
|
+
const p1 = JSON.stringify(p1obj);
|
|
1236
|
+
const p2 = JSON.stringify(p2obj);
|
|
1237
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
1238
|
+
this.runner.instrumentData.errorCount++;
|
|
1239
|
+
console.log(chalk.default.red(`TestCaseFhirBase:CheckReturnData(): Compare return data check failed.`));
|
|
1240
|
+
console.log(p1);
|
|
1241
|
+
console.log(p2);
|
|
1242
|
+
process.exit(1);
|
|
1243
|
+
}
|
|
1244
|
+
};
|
|
1234
1245
|
};
|
|
1235
1246
|
//#endregion
|
|
1236
1247
|
//#region src/libmodule/testCaseFhirQueryBase.ts
|
|
@@ -1333,19 +1344,7 @@ var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
|
|
|
1333
1344
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1334
1345
|
delete personRecord.meta;
|
|
1335
1346
|
delete retVal.body.meta;
|
|
1336
|
-
|
|
1337
|
-
const p2 = JSON.stringify(retVal.body);
|
|
1338
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1339
|
-
this.runner.instrumentData.errorCount++;
|
|
1340
|
-
console.log("");
|
|
1341
|
-
console.log(chalk.default.red(` ==> 2.1 ************************************************************************************************`));
|
|
1342
|
-
console.log(p1);
|
|
1343
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1344
|
-
console.log(p2);
|
|
1345
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1346
|
-
console.log("");
|
|
1347
|
-
process.exit(1);
|
|
1348
|
-
}
|
|
1347
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
1349
1348
|
return retVal.body;
|
|
1350
1349
|
};
|
|
1351
1350
|
};
|
|
@@ -1363,19 +1362,7 @@ var TestCaseFhir03 = class extends TestCaseFhirQueryBase {
|
|
|
1363
1362
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1364
1363
|
delete personRecord.meta;
|
|
1365
1364
|
delete retVal.body.meta;
|
|
1366
|
-
|
|
1367
|
-
const p2 = JSON.stringify(retVal.body);
|
|
1368
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1369
|
-
this.runner.instrumentData.errorCount++;
|
|
1370
|
-
console.log("");
|
|
1371
|
-
console.log(chalk.default.red(` ==> 3.1 ************************************************************************************************`));
|
|
1372
|
-
console.log(p1);
|
|
1373
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1374
|
-
console.log(p2);
|
|
1375
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1376
|
-
console.log("");
|
|
1377
|
-
process.exit(1);
|
|
1378
|
-
}
|
|
1365
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
1379
1366
|
return retVal.body;
|
|
1380
1367
|
};
|
|
1381
1368
|
};
|
|
@@ -1396,20 +1383,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1396
1383
|
const loadedPersonRecorded = { ...retVal.body };
|
|
1397
1384
|
delete compPersonRecord.meta;
|
|
1398
1385
|
delete loadedPersonRecorded.meta;
|
|
1399
|
-
|
|
1400
|
-
const p2 = JSON.stringify(loadedPersonRecorded);
|
|
1401
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1402
|
-
this.runner.instrumentData.errorCount++;
|
|
1403
|
-
console.log("");
|
|
1404
|
-
console.log(chalk.default.red(` ==> 4.1 ************************************************************************************************`));
|
|
1405
|
-
console.log(p1);
|
|
1406
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1407
|
-
console.log(p2);
|
|
1408
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1409
|
-
console.log("");
|
|
1410
|
-
process.exit(1);
|
|
1411
|
-
return retVal.body;
|
|
1412
|
-
}
|
|
1386
|
+
this.CheckReturnData(compPersonRecord, loadedPersonRecorded);
|
|
1413
1387
|
const originalPersonRecord = retVal.body;
|
|
1414
1388
|
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1415
1389
|
originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
|
|
@@ -1419,19 +1393,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1419
1393
|
const updatedRecord = { ...retVal.body };
|
|
1420
1394
|
delete updatedRecord.meta;
|
|
1421
1395
|
delete originalPersonRecord.meta;
|
|
1422
|
-
|
|
1423
|
-
const p2 = JSON.stringify(originalPersonRecord);
|
|
1424
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1425
|
-
this.runner.instrumentData.errorCount++;
|
|
1426
|
-
console.log("");
|
|
1427
|
-
console.log(chalk.default.red(` ==> 4.2 ************************************************************************************************`));
|
|
1428
|
-
console.log(p1);
|
|
1429
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1430
|
-
console.log(p2);
|
|
1431
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1432
|
-
console.log("");
|
|
1433
|
-
process.exit(1);
|
|
1434
|
-
}
|
|
1396
|
+
this.CheckReturnData(compPersonRecord, originalPersonRecord);
|
|
1435
1397
|
return retVal.body;
|
|
1436
1398
|
} else {
|
|
1437
1399
|
this.runner.instrumentData.errorCount++;
|
|
@@ -1456,19 +1418,7 @@ var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
|
|
|
1456
1418
|
const updatedRecord = { ...retVal.body };
|
|
1457
1419
|
delete updatedRecord.meta;
|
|
1458
1420
|
delete originalPersonRecord.meta;
|
|
1459
|
-
|
|
1460
|
-
const p2 = JSON.stringify(originalPersonRecord);
|
|
1461
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1462
|
-
this.runner.instrumentData.errorCount++;
|
|
1463
|
-
console.log("");
|
|
1464
|
-
console.log(chalk.default.red(` ==> 5.2 ************************************************************************************************`));
|
|
1465
|
-
console.log(p1);
|
|
1466
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1467
|
-
console.log(p2);
|
|
1468
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1469
|
-
console.log("");
|
|
1470
|
-
process.exit(1);
|
|
1471
|
-
}
|
|
1421
|
+
this.CheckReturnData(updatedRecord, originalPersonRecord);
|
|
1472
1422
|
return retVal.body;
|
|
1473
1423
|
} else {
|
|
1474
1424
|
this.runner.instrumentData.errorCount++;
|
|
@@ -1519,19 +1469,7 @@ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
|
|
|
1519
1469
|
delete checkRetVal.entry[i].resource;
|
|
1520
1470
|
delete checkRetVal.entry[i].search;
|
|
1521
1471
|
}
|
|
1522
|
-
|
|
1523
|
-
const p2 = JSON.stringify(checkRetVal);
|
|
1524
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1525
|
-
this.runner.instrumentData.errorCount++;
|
|
1526
|
-
console.log("");
|
|
1527
|
-
console.log(chalk.default.red(` ==> 6.1 ************************************************************************************************`));
|
|
1528
|
-
console.log(p1);
|
|
1529
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1530
|
-
console.log(p2);
|
|
1531
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1532
|
-
console.log("");
|
|
1533
|
-
process.exit(1);
|
|
1534
|
-
}
|
|
1472
|
+
this.CheckReturnData(searchRetValCheck, checkRetVal);
|
|
1535
1473
|
return retVal.body;
|
|
1536
1474
|
};
|
|
1537
1475
|
};
|
|
@@ -2207,19 +2145,7 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
|
|
|
2207
2145
|
personRecord.meta.versionId = "4";
|
|
2208
2146
|
delete personRecord.meta.lastUpdated;
|
|
2209
2147
|
delete retRecordCheck.meta.lastUpdated;
|
|
2210
|
-
|
|
2211
|
-
const p2 = JSON.stringify(retRecordCheck);
|
|
2212
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2213
|
-
this.runner.instrumentData.errorCount++;
|
|
2214
|
-
console.log("");
|
|
2215
|
-
console.log(chalk.default.red(` ==> 7.1 ************************************************************************************************`));
|
|
2216
|
-
console.log(p1);
|
|
2217
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2218
|
-
console.log(p2);
|
|
2219
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2220
|
-
console.log("");
|
|
2221
|
-
process.exit(1);
|
|
2222
|
-
}
|
|
2148
|
+
this.CheckReturnData(personRecord, retRecordCheck);
|
|
2223
2149
|
return retValPatched.body;
|
|
2224
2150
|
};
|
|
2225
2151
|
};
|
|
@@ -2246,19 +2172,7 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
|
2246
2172
|
personRecord.meta.versionId = "5";
|
|
2247
2173
|
delete personRecord.meta.lastUpdated;
|
|
2248
2174
|
delete retRecordCheck.meta.lastUpdated;
|
|
2249
|
-
|
|
2250
|
-
const p2 = JSON.stringify(retRecordCheck);
|
|
2251
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2252
|
-
this.runner.instrumentData.errorCount++;
|
|
2253
|
-
console.log("");
|
|
2254
|
-
console.log(chalk.default.red(` ==> 8.1 ************************************************************************************************`));
|
|
2255
|
-
console.log(p1);
|
|
2256
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2257
|
-
console.log(p2);
|
|
2258
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2259
|
-
console.log("");
|
|
2260
|
-
process.exit(1);
|
|
2261
|
-
}
|
|
2175
|
+
this.CheckReturnData(personRecord, retRecordCheck);
|
|
2262
2176
|
return retValPatched.body;
|
|
2263
2177
|
};
|
|
2264
2178
|
};
|
|
@@ -2283,19 +2197,7 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
|
|
|
2283
2197
|
diagnostics: `DeleteResource: Resource ${personRecord.id} version 6 has been deleted.`
|
|
2284
2198
|
}]
|
|
2285
2199
|
};
|
|
2286
|
-
|
|
2287
|
-
const p2 = JSON.stringify(retVal.body);
|
|
2288
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2289
|
-
this.runner.instrumentData.errorCount++;
|
|
2290
|
-
console.log("");
|
|
2291
|
-
console.log(chalk.default.red(` ==> 9.1 ************************************************************************************************`));
|
|
2292
|
-
console.log(p1);
|
|
2293
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2294
|
-
console.log(p2);
|
|
2295
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2296
|
-
console.log("");
|
|
2297
|
-
process.exit(1);
|
|
2298
|
-
}
|
|
2200
|
+
this.CheckReturnData(deletedRetValCheck, retVal.body);
|
|
2299
2201
|
return retVal.body;
|
|
2300
2202
|
} catch (error) {
|
|
2301
2203
|
if (axios.default.isAxiosError(error)) {
|
|
@@ -2328,19 +2230,7 @@ var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
|
|
|
2328
2230
|
delete retVal.body.meta;
|
|
2329
2231
|
delete personRecord.text.div;
|
|
2330
2232
|
delete retVal.body.text.div;
|
|
2331
|
-
|
|
2332
|
-
const p2 = JSON.stringify(retVal.body);
|
|
2333
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2334
|
-
this.runner.instrumentData.errorCount++;
|
|
2335
|
-
console.log("");
|
|
2336
|
-
console.log(chalk.default.red(` ==> 10.1 ************************************************************************************************`));
|
|
2337
|
-
console.log(p1);
|
|
2338
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2339
|
-
console.log(p2);
|
|
2340
|
-
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2341
|
-
console.log("");
|
|
2342
|
-
process.exit(1);
|
|
2343
|
-
}
|
|
2233
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
2344
2234
|
return retVal.body;
|
|
2345
2235
|
};
|
|
2346
2236
|
};
|