@nsshunt/ststestrunner 1.1.126 → 1.1.128
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 +68 -10
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +68 -10
- package/dist/ststestrunner.mjs.map +1 -1
- package/package.json +1 -1
- package/types/libmodule/testCaseFhir06.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir08.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir09.d.ts.map +1 -1
package/dist/ststestrunner.cjs
CHANGED
|
@@ -1502,9 +1502,33 @@ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
|
|
|
1502
1502
|
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
|
|
1503
1503
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1504
1504
|
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1505
|
+
const searchRetValCheck = {
|
|
1506
|
+
resourceType: "Bundle",
|
|
1507
|
+
type: "searchset",
|
|
1508
|
+
total: 2,
|
|
1509
|
+
link: [{ relation: "self" }],
|
|
1510
|
+
entry: [{}, {}]
|
|
1511
|
+
};
|
|
1512
|
+
const checkRetVal = { ...retVal.body };
|
|
1513
|
+
delete checkRetVal.link[0].url;
|
|
1514
|
+
for (let i = 0; i < checkRetVal.entry.length; i++) {
|
|
1515
|
+
delete checkRetVal.entry[i].fullUrl;
|
|
1516
|
+
delete checkRetVal.entry[i].resource;
|
|
1517
|
+
delete checkRetVal.entry[i].search;
|
|
1518
|
+
}
|
|
1519
|
+
const p1 = JSON.stringify(searchRetValCheck);
|
|
1520
|
+
const p2 = JSON.stringify(checkRetVal);
|
|
1521
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
1522
|
+
this.runner.instrumentData.errorCount++;
|
|
1523
|
+
console.log("");
|
|
1524
|
+
console.log(chalk.default.red(` ==> 6.1 ************************************************************************************************`));
|
|
1525
|
+
console.log(p1);
|
|
1526
|
+
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1527
|
+
console.log(p2);
|
|
1528
|
+
console.log(chalk.default.red(`************************************************************************************************`));
|
|
1529
|
+
console.log("");
|
|
1530
|
+
process.exit(1);
|
|
1531
|
+
}
|
|
1508
1532
|
return retVal.body;
|
|
1509
1533
|
};
|
|
1510
1534
|
};
|
|
@@ -2209,13 +2233,29 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
|
2209
2233
|
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
2210
2234
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2211
2235
|
const resource = retVal.body;
|
|
2212
|
-
|
|
2236
|
+
const patchText = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
|
|
2237
|
+
resource.text.div = patchText;
|
|
2213
2238
|
const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
|
|
2214
2239
|
this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
|
|
2215
2240
|
if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2241
|
+
const retRecordCheck = { ...retValPatched.body };
|
|
2242
|
+
personRecord.text.div = patchText;
|
|
2243
|
+
personRecord.meta.versionId = "5";
|
|
2244
|
+
delete personRecord.meta.lastUpdated;
|
|
2245
|
+
delete retRecordCheck.meta.lastUpdated;
|
|
2246
|
+
const p1 = JSON.stringify(personRecord);
|
|
2247
|
+
const p2 = JSON.stringify(retRecordCheck);
|
|
2248
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
2249
|
+
this.runner.instrumentData.errorCount++;
|
|
2250
|
+
console.log("");
|
|
2251
|
+
console.log(chalk.default.red(` ==> 8.1 ************************************************************************************************`));
|
|
2252
|
+
console.log(p1);
|
|
2253
|
+
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2254
|
+
console.log(p2);
|
|
2255
|
+
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2256
|
+
console.log("");
|
|
2257
|
+
process.exit(1);
|
|
2258
|
+
}
|
|
2219
2259
|
return retValPatched.body;
|
|
2220
2260
|
};
|
|
2221
2261
|
};
|
|
@@ -2232,9 +2272,27 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
|
|
|
2232
2272
|
const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
|
|
2233
2273
|
this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
|
|
2234
2274
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2275
|
+
const deletedRetValCheck = {
|
|
2276
|
+
resourceType: "OperationOutcome",
|
|
2277
|
+
issue: [{
|
|
2278
|
+
severity: "error",
|
|
2279
|
+
code: "deleted",
|
|
2280
|
+
diagnostics: `DeleteResource: Resource ${personRecord.id} version 6 has been deleted.`
|
|
2281
|
+
}]
|
|
2282
|
+
};
|
|
2283
|
+
const p1 = JSON.stringify(deletedRetValCheck);
|
|
2284
|
+
const p2 = JSON.stringify(retVal.body);
|
|
2285
|
+
if (p1.localeCompare(p2) !== 0) {
|
|
2286
|
+
this.runner.instrumentData.errorCount++;
|
|
2287
|
+
console.log("");
|
|
2288
|
+
console.log(chalk.default.red(` ==> 9.1 ************************************************************************************************`));
|
|
2289
|
+
console.log(p1);
|
|
2290
|
+
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2291
|
+
console.log(p2);
|
|
2292
|
+
console.log(chalk.default.red(`************************************************************************************************`));
|
|
2293
|
+
console.log("");
|
|
2294
|
+
process.exit(1);
|
|
2295
|
+
}
|
|
2238
2296
|
return retVal.body;
|
|
2239
2297
|
} catch (error) {
|
|
2240
2298
|
if (axios.default.isAxiosError(error)) {
|