@nsshunt/ststestrunner 1.1.127 → 1.1.129

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.
@@ -1502,9 +1502,36 @@ 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
- console.log("06");
1506
- console.log(personRecord);
1507
- console.log(retVal.body);
1505
+ const checkRetVal = { ...retVal.body };
1506
+ const searchRetValCheck = {
1507
+ resourceType: "Bundle",
1508
+ type: "searchset",
1509
+ total: 0,
1510
+ link: [{ relation: "self" }],
1511
+ entry: []
1512
+ };
1513
+ searchRetValCheck.total = checkRetVal.total;
1514
+ searchRetValCheck.entry = [];
1515
+ for (let i = 0; i < checkRetVal.entry.length; i++) searchRetValCheck.entry.push({});
1516
+ delete checkRetVal.link[0].url;
1517
+ for (let i = 0; i < checkRetVal.entry.length; i++) {
1518
+ delete checkRetVal.entry[i].fullUrl;
1519
+ delete checkRetVal.entry[i].resource;
1520
+ delete checkRetVal.entry[i].search;
1521
+ }
1522
+ const p1 = JSON.stringify(searchRetValCheck);
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
+ }
1508
1535
  return retVal.body;
1509
1536
  };
1510
1537
  };
@@ -2209,13 +2236,29 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
2209
2236
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2210
2237
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2211
2238
  const resource = retVal.body;
2212
- resource.text.div = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
2239
+ const patchText = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
2240
+ resource.text.div = patchText;
2213
2241
  const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
2214
2242
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
2215
2243
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2216
- console.log("08");
2217
- console.log(personRecord);
2218
- console.log(retValPatched.body);
2244
+ const retRecordCheck = { ...retValPatched.body };
2245
+ personRecord.text.div = patchText;
2246
+ personRecord.meta.versionId = "5";
2247
+ delete personRecord.meta.lastUpdated;
2248
+ delete retRecordCheck.meta.lastUpdated;
2249
+ const p1 = JSON.stringify(personRecord);
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
+ }
2219
2262
  return retValPatched.body;
2220
2263
  };
2221
2264
  };