@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.
@@ -1497,9 +1497,36 @@ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
1497
1497
  this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
1498
1498
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1499
1499
  }
1500
- console.log("06");
1501
- console.log(personRecord);
1502
- console.log(retVal.body);
1500
+ const checkRetVal = { ...retVal.body };
1501
+ const searchRetValCheck = {
1502
+ resourceType: "Bundle",
1503
+ type: "searchset",
1504
+ total: 0,
1505
+ link: [{ relation: "self" }],
1506
+ entry: []
1507
+ };
1508
+ searchRetValCheck.total = checkRetVal.total;
1509
+ searchRetValCheck.entry = [];
1510
+ for (let i = 0; i < checkRetVal.entry.length; i++) searchRetValCheck.entry.push({});
1511
+ delete checkRetVal.link[0].url;
1512
+ for (let i = 0; i < checkRetVal.entry.length; i++) {
1513
+ delete checkRetVal.entry[i].fullUrl;
1514
+ delete checkRetVal.entry[i].resource;
1515
+ delete checkRetVal.entry[i].search;
1516
+ }
1517
+ const p1 = JSON.stringify(searchRetValCheck);
1518
+ const p2 = JSON.stringify(checkRetVal);
1519
+ if (p1.localeCompare(p2) !== 0) {
1520
+ this.runner.instrumentData.errorCount++;
1521
+ console.log("");
1522
+ console.log(chalk.red(` ==> 6.1 ************************************************************************************************`));
1523
+ console.log(p1);
1524
+ console.log(chalk.red(`************************************************************************************************`));
1525
+ console.log(p2);
1526
+ console.log(chalk.red(`************************************************************************************************`));
1527
+ console.log("");
1528
+ process.exit(1);
1529
+ }
1503
1530
  return retVal.body;
1504
1531
  };
1505
1532
  };
@@ -2204,13 +2231,29 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
2204
2231
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2205
2232
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2206
2233
  const resource = retVal.body;
2207
- resource.text.div = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
2234
+ const patchText = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
2235
+ resource.text.div = patchText;
2208
2236
  const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
2209
2237
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
2210
2238
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2211
- console.log("08");
2212
- console.log(personRecord);
2213
- console.log(retValPatched.body);
2239
+ const retRecordCheck = { ...retValPatched.body };
2240
+ personRecord.text.div = patchText;
2241
+ personRecord.meta.versionId = "5";
2242
+ delete personRecord.meta.lastUpdated;
2243
+ delete retRecordCheck.meta.lastUpdated;
2244
+ const p1 = JSON.stringify(personRecord);
2245
+ const p2 = JSON.stringify(retRecordCheck);
2246
+ if (p1.localeCompare(p2) !== 0) {
2247
+ this.runner.instrumentData.errorCount++;
2248
+ console.log("");
2249
+ console.log(chalk.red(` ==> 8.1 ************************************************************************************************`));
2250
+ console.log(p1);
2251
+ console.log(chalk.red(`************************************************************************************************`));
2252
+ console.log(p2);
2253
+ console.log(chalk.red(`************************************************************************************************`));
2254
+ console.log("");
2255
+ process.exit(1);
2256
+ }
2214
2257
  return retValPatched.body;
2215
2258
  };
2216
2259
  };