@nsshunt/ststestrunner 1.1.160 → 1.1.161

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.
@@ -1510,6 +1510,7 @@ var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
1510
1510
  this.bundleBatch.entry = [];
1511
1511
  this.personRecords = [];
1512
1512
  }
1513
+ await Sleep(500);
1513
1514
  return personRecord;
1514
1515
  };
1515
1516
  };
@@ -1547,15 +1548,14 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1547
1548
  this.runner.instrumentData.requestCount++;
1548
1549
  const compPersonRecord = { ...personRecord };
1549
1550
  const loadedPersonRecorded = { ...retVal.body };
1550
- console.log(` ==> version id: [${loadedPersonRecorded.meta.versionId}]`);
1551
- console.log(` ==> tag: [${loadedPersonRecorded.meta.tag}]`);
1551
+ const loadedRecordVersion = loadedPersonRecorded.meta.versionId;
1552
1552
  delete compPersonRecord.meta;
1553
1553
  delete loadedPersonRecorded.meta;
1554
1554
  this.CheckReturnData(compPersonRecord, loadedPersonRecorded);
1555
1555
  const originalPersonRecord = retVal.body;
1556
1556
  if (originalPersonRecord && originalPersonRecord.text) {
1557
1557
  originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
1558
- const retVal = await client.PutResource("Person", originalPersonRecord, `W/"1"`);
1558
+ const retVal = await client.PutResource("Person", originalPersonRecord, `W/"${loadedRecordVersion}"`);
1559
1559
  this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
1560
1560
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1561
1561
  const updatedRecord = { ...retVal.body };
@@ -2292,11 +2292,12 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
2292
2292
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2293
2293
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2294
2294
  const resource = retVal.body;
2295
+ const loadedRecordVersion = resource.meta.versionId;
2295
2296
  const patchText = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
2296
2297
  const observer = fast_json_patch_default.observe(resource);
2297
2298
  resource.text.div = patchText;
2298
2299
  const patchRecord = fast_json_patch_default.generate(observer);
2299
- const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"3"`);
2300
+ const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"${loadedRecordVersion}"`);
2300
2301
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
2301
2302
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2302
2303
  const retRecordCheck = { ...retValPatched.body };
@@ -2321,9 +2322,10 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
2321
2322
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2322
2323
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2323
2324
  const resource = retVal.body;
2325
+ const loadedRecordVersion = resource.meta.versionId;
2324
2326
  const patchText = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
2325
2327
  resource.text.div = patchText;
2326
- const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
2328
+ const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"${loadedRecordVersion}"`);
2327
2329
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
2328
2330
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2329
2331
  const retRecordCheck = { ...retValPatched.body };