@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.
@@ -1515,6 +1515,7 @@ var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
1515
1515
  this.bundleBatch.entry = [];
1516
1516
  this.personRecords = [];
1517
1517
  }
1518
+ await (0, _nsshunt_stsutils.Sleep)(500);
1518
1519
  return personRecord;
1519
1520
  };
1520
1521
  };
@@ -1552,15 +1553,14 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1552
1553
  this.runner.instrumentData.requestCount++;
1553
1554
  const compPersonRecord = { ...personRecord };
1554
1555
  const loadedPersonRecorded = { ...retVal.body };
1555
- console.log(` ==> version id: [${loadedPersonRecorded.meta.versionId}]`);
1556
- console.log(` ==> tag: [${loadedPersonRecorded.meta.tag}]`);
1556
+ const loadedRecordVersion = loadedPersonRecorded.meta.versionId;
1557
1557
  delete compPersonRecord.meta;
1558
1558
  delete loadedPersonRecorded.meta;
1559
1559
  this.CheckReturnData(compPersonRecord, loadedPersonRecorded);
1560
1560
  const originalPersonRecord = retVal.body;
1561
1561
  if (originalPersonRecord && originalPersonRecord.text) {
1562
1562
  originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
1563
- const retVal = await client.PutResource("Person", originalPersonRecord, `W/"1"`);
1563
+ const retVal = await client.PutResource("Person", originalPersonRecord, `W/"${loadedRecordVersion}"`);
1564
1564
  this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
1565
1565
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1566
1566
  const updatedRecord = { ...retVal.body };
@@ -2297,11 +2297,12 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
2297
2297
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2298
2298
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2299
2299
  const resource = retVal.body;
2300
+ const loadedRecordVersion = resource.meta.versionId;
2300
2301
  const patchText = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
2301
2302
  const observer = fast_json_patch_default.observe(resource);
2302
2303
  resource.text.div = patchText;
2303
2304
  const patchRecord = fast_json_patch_default.generate(observer);
2304
- const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"3"`);
2305
+ const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"${loadedRecordVersion}"`);
2305
2306
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
2306
2307
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2307
2308
  const retRecordCheck = { ...retValPatched.body };
@@ -2326,9 +2327,10 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
2326
2327
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2327
2328
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2328
2329
  const resource = retVal.body;
2330
+ const loadedRecordVersion = resource.meta.versionId;
2329
2331
  const patchText = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
2330
2332
  resource.text.div = patchText;
2331
- const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
2333
+ const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"${loadedRecordVersion}"`);
2332
2334
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
2333
2335
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2334
2336
  const retRecordCheck = { ...retValPatched.body };