@nsshunt/ststestrunner 1.1.128 → 1.1.130
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 +27 -134
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +27 -134
- 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.mjs
CHANGED
|
@@ -1226,6 +1226,17 @@ var TestCaseFhirBase = class {
|
|
|
1226
1226
|
GetClient = async () => {
|
|
1227
1227
|
return this.runnerExecutionWorker.GetClient();
|
|
1228
1228
|
};
|
|
1229
|
+
CheckReturnData = (p1obj, p2obj) => {
|
|
1230
|
+
const p1 = JSON.stringify(p1obj);
|
|
1231
|
+
const p2 = JSON.stringify(p2obj);
|
|
1232
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
1233
|
+
this.runner.instrumentData.errorCount++;
|
|
1234
|
+
console.log(chalk.red(`CheckReturnData(): Compare return data check failed.`));
|
|
1235
|
+
console.log(p1);
|
|
1236
|
+
console.log(p2);
|
|
1237
|
+
process.exit(1);
|
|
1238
|
+
}
|
|
1239
|
+
};
|
|
1229
1240
|
};
|
|
1230
1241
|
//#endregion
|
|
1231
1242
|
//#region src/libmodule/testCaseFhirQueryBase.ts
|
|
@@ -1328,19 +1339,7 @@ var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
|
|
|
1328
1339
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1329
1340
|
delete personRecord.meta;
|
|
1330
1341
|
delete retVal.body.meta;
|
|
1331
|
-
|
|
1332
|
-
const p2 = JSON.stringify(retVal.body);
|
|
1333
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1334
|
-
this.runner.instrumentData.errorCount++;
|
|
1335
|
-
console.log("");
|
|
1336
|
-
console.log(chalk.red(` ==> 2.1 ************************************************************************************************`));
|
|
1337
|
-
console.log(p1);
|
|
1338
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1339
|
-
console.log(p2);
|
|
1340
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1341
|
-
console.log("");
|
|
1342
|
-
process.exit(1);
|
|
1343
|
-
}
|
|
1342
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
1344
1343
|
return retVal.body;
|
|
1345
1344
|
};
|
|
1346
1345
|
};
|
|
@@ -1358,19 +1357,7 @@ var TestCaseFhir03 = class extends TestCaseFhirQueryBase {
|
|
|
1358
1357
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1359
1358
|
delete personRecord.meta;
|
|
1360
1359
|
delete retVal.body.meta;
|
|
1361
|
-
|
|
1362
|
-
const p2 = JSON.stringify(retVal.body);
|
|
1363
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1364
|
-
this.runner.instrumentData.errorCount++;
|
|
1365
|
-
console.log("");
|
|
1366
|
-
console.log(chalk.red(` ==> 3.1 ************************************************************************************************`));
|
|
1367
|
-
console.log(p1);
|
|
1368
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1369
|
-
console.log(p2);
|
|
1370
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1371
|
-
console.log("");
|
|
1372
|
-
process.exit(1);
|
|
1373
|
-
}
|
|
1360
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
1374
1361
|
return retVal.body;
|
|
1375
1362
|
};
|
|
1376
1363
|
};
|
|
@@ -1391,20 +1378,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1391
1378
|
const loadedPersonRecorded = { ...retVal.body };
|
|
1392
1379
|
delete compPersonRecord.meta;
|
|
1393
1380
|
delete loadedPersonRecorded.meta;
|
|
1394
|
-
|
|
1395
|
-
const p2 = JSON.stringify(loadedPersonRecorded);
|
|
1396
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1397
|
-
this.runner.instrumentData.errorCount++;
|
|
1398
|
-
console.log("");
|
|
1399
|
-
console.log(chalk.red(` ==> 4.1 ************************************************************************************************`));
|
|
1400
|
-
console.log(p1);
|
|
1401
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1402
|
-
console.log(p2);
|
|
1403
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1404
|
-
console.log("");
|
|
1405
|
-
process.exit(1);
|
|
1406
|
-
return retVal.body;
|
|
1407
|
-
}
|
|
1381
|
+
this.CheckReturnData(compPersonRecord, loadedPersonRecorded);
|
|
1408
1382
|
const originalPersonRecord = retVal.body;
|
|
1409
1383
|
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1410
1384
|
originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
|
|
@@ -1414,19 +1388,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1414
1388
|
const updatedRecord = { ...retVal.body };
|
|
1415
1389
|
delete updatedRecord.meta;
|
|
1416
1390
|
delete originalPersonRecord.meta;
|
|
1417
|
-
|
|
1418
|
-
const p2 = JSON.stringify(originalPersonRecord);
|
|
1419
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1420
|
-
this.runner.instrumentData.errorCount++;
|
|
1421
|
-
console.log("");
|
|
1422
|
-
console.log(chalk.red(` ==> 4.2 ************************************************************************************************`));
|
|
1423
|
-
console.log(p1);
|
|
1424
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1425
|
-
console.log(p2);
|
|
1426
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1427
|
-
console.log("");
|
|
1428
|
-
process.exit(1);
|
|
1429
|
-
}
|
|
1391
|
+
this.CheckReturnData(compPersonRecord, originalPersonRecord);
|
|
1430
1392
|
return retVal.body;
|
|
1431
1393
|
} else {
|
|
1432
1394
|
this.runner.instrumentData.errorCount++;
|
|
@@ -1451,19 +1413,7 @@ var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
|
|
|
1451
1413
|
const updatedRecord = { ...retVal.body };
|
|
1452
1414
|
delete updatedRecord.meta;
|
|
1453
1415
|
delete originalPersonRecord.meta;
|
|
1454
|
-
|
|
1455
|
-
const p2 = JSON.stringify(originalPersonRecord);
|
|
1456
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1457
|
-
this.runner.instrumentData.errorCount++;
|
|
1458
|
-
console.log("");
|
|
1459
|
-
console.log(chalk.red(` ==> 5.2 ************************************************************************************************`));
|
|
1460
|
-
console.log(p1);
|
|
1461
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1462
|
-
console.log(p2);
|
|
1463
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1464
|
-
console.log("");
|
|
1465
|
-
process.exit(1);
|
|
1466
|
-
}
|
|
1416
|
+
this.CheckReturnData(updatedRecord, originalPersonRecord);
|
|
1467
1417
|
return retVal.body;
|
|
1468
1418
|
} else {
|
|
1469
1419
|
this.runner.instrumentData.errorCount++;
|
|
@@ -1497,33 +1447,24 @@ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
|
|
|
1497
1447
|
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
|
|
1498
1448
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1499
1449
|
}
|
|
1450
|
+
const checkRetVal = { ...retVal.body };
|
|
1500
1451
|
const searchRetValCheck = {
|
|
1501
1452
|
resourceType: "Bundle",
|
|
1502
1453
|
type: "searchset",
|
|
1503
|
-
total:
|
|
1454
|
+
total: 0,
|
|
1504
1455
|
link: [{ relation: "self" }],
|
|
1505
|
-
entry: [
|
|
1456
|
+
entry: []
|
|
1506
1457
|
};
|
|
1507
|
-
|
|
1458
|
+
searchRetValCheck.total = checkRetVal.total;
|
|
1459
|
+
searchRetValCheck.entry = [];
|
|
1460
|
+
for (let i = 0; i < checkRetVal.entry.length; i++) searchRetValCheck.entry.push({});
|
|
1508
1461
|
delete checkRetVal.link[0].url;
|
|
1509
1462
|
for (let i = 0; i < checkRetVal.entry.length; i++) {
|
|
1510
1463
|
delete checkRetVal.entry[i].fullUrl;
|
|
1511
1464
|
delete checkRetVal.entry[i].resource;
|
|
1512
1465
|
delete checkRetVal.entry[i].search;
|
|
1513
1466
|
}
|
|
1514
|
-
|
|
1515
|
-
const p2 = JSON.stringify(checkRetVal);
|
|
1516
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
1517
|
-
this.runner.instrumentData.errorCount++;
|
|
1518
|
-
console.log("");
|
|
1519
|
-
console.log(chalk.red(` ==> 6.1 ************************************************************************************************`));
|
|
1520
|
-
console.log(p1);
|
|
1521
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1522
|
-
console.log(p2);
|
|
1523
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
1524
|
-
console.log("");
|
|
1525
|
-
process.exit(1);
|
|
1526
|
-
}
|
|
1467
|
+
this.CheckReturnData(searchRetValCheck, checkRetVal);
|
|
1527
1468
|
return retVal.body;
|
|
1528
1469
|
};
|
|
1529
1470
|
};
|
|
@@ -2199,19 +2140,7 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
|
|
|
2199
2140
|
personRecord.meta.versionId = "4";
|
|
2200
2141
|
delete personRecord.meta.lastUpdated;
|
|
2201
2142
|
delete retRecordCheck.meta.lastUpdated;
|
|
2202
|
-
|
|
2203
|
-
const p2 = JSON.stringify(retRecordCheck);
|
|
2204
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2205
|
-
this.runner.instrumentData.errorCount++;
|
|
2206
|
-
console.log("");
|
|
2207
|
-
console.log(chalk.red(` ==> 7.1 ************************************************************************************************`));
|
|
2208
|
-
console.log(p1);
|
|
2209
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2210
|
-
console.log(p2);
|
|
2211
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2212
|
-
console.log("");
|
|
2213
|
-
process.exit(1);
|
|
2214
|
-
}
|
|
2143
|
+
this.CheckReturnData(personRecord, retRecordCheck);
|
|
2215
2144
|
return retValPatched.body;
|
|
2216
2145
|
};
|
|
2217
2146
|
};
|
|
@@ -2238,19 +2167,7 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
|
2238
2167
|
personRecord.meta.versionId = "5";
|
|
2239
2168
|
delete personRecord.meta.lastUpdated;
|
|
2240
2169
|
delete retRecordCheck.meta.lastUpdated;
|
|
2241
|
-
|
|
2242
|
-
const p2 = JSON.stringify(retRecordCheck);
|
|
2243
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2244
|
-
this.runner.instrumentData.errorCount++;
|
|
2245
|
-
console.log("");
|
|
2246
|
-
console.log(chalk.red(` ==> 8.1 ************************************************************************************************`));
|
|
2247
|
-
console.log(p1);
|
|
2248
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2249
|
-
console.log(p2);
|
|
2250
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2251
|
-
console.log("");
|
|
2252
|
-
process.exit(1);
|
|
2253
|
-
}
|
|
2170
|
+
this.CheckReturnData(personRecord, retRecordCheck);
|
|
2254
2171
|
return retValPatched.body;
|
|
2255
2172
|
};
|
|
2256
2173
|
};
|
|
@@ -2275,19 +2192,7 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
|
|
|
2275
2192
|
diagnostics: `DeleteResource: Resource ${personRecord.id} version 6 has been deleted.`
|
|
2276
2193
|
}]
|
|
2277
2194
|
};
|
|
2278
|
-
|
|
2279
|
-
const p2 = JSON.stringify(retVal.body);
|
|
2280
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2281
|
-
this.runner.instrumentData.errorCount++;
|
|
2282
|
-
console.log("");
|
|
2283
|
-
console.log(chalk.red(` ==> 9.1 ************************************************************************************************`));
|
|
2284
|
-
console.log(p1);
|
|
2285
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2286
|
-
console.log(p2);
|
|
2287
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2288
|
-
console.log("");
|
|
2289
|
-
process.exit(1);
|
|
2290
|
-
}
|
|
2195
|
+
this.CheckReturnData(deletedRetValCheck, retVal.body);
|
|
2291
2196
|
return retVal.body;
|
|
2292
2197
|
} catch (error) {
|
|
2293
2198
|
if (axios.isAxiosError(error)) {
|
|
@@ -2320,19 +2225,7 @@ var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
|
|
|
2320
2225
|
delete retVal.body.meta;
|
|
2321
2226
|
delete personRecord.text.div;
|
|
2322
2227
|
delete retVal.body.text.div;
|
|
2323
|
-
|
|
2324
|
-
const p2 = JSON.stringify(retVal.body);
|
|
2325
|
-
if (p1.localeCompare(p2) !== 0) {
|
|
2326
|
-
this.runner.instrumentData.errorCount++;
|
|
2327
|
-
console.log("");
|
|
2328
|
-
console.log(chalk.red(` ==> 10.1 ************************************************************************************************`));
|
|
2329
|
-
console.log(p1);
|
|
2330
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2331
|
-
console.log(p2);
|
|
2332
|
-
console.log(chalk.red(`************************************************************************************************`));
|
|
2333
|
-
console.log("");
|
|
2334
|
-
process.exit(1);
|
|
2335
|
-
}
|
|
2228
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
2336
2229
|
return retVal.body;
|
|
2337
2230
|
};
|
|
2338
2231
|
};
|