@nsshunt/ststestrunner 1.1.124 → 1.1.126

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,6 +1497,9 @@ 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
1503
  return retVal.body;
1501
1504
  };
1502
1505
  };
@@ -2160,12 +2163,31 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
2160
2163
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2161
2164
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2162
2165
  const resource = retVal.body;
2166
+ const patchText = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
2163
2167
  const observer = fast_json_patch_default.observe(resource);
2164
- resource.text.div = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
2168
+ resource.text.div = patchText;
2165
2169
  const patchRecord = fast_json_patch_default.generate(observer);
2166
2170
  const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"3"`);
2167
2171
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
2168
2172
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2173
+ const retRecordCheck = { ...retValPatched.body };
2174
+ personRecord.text.div = patchText;
2175
+ personRecord.meta.versionId = "4";
2176
+ delete personRecord.meta.lastUpdated;
2177
+ delete retRecordCheck.meta.lastUpdated;
2178
+ const p1 = JSON.stringify(personRecord);
2179
+ const p2 = JSON.stringify(retRecordCheck);
2180
+ if (p1.localeCompare(p2) !== 0) {
2181
+ this.runner.instrumentData.errorCount++;
2182
+ console.log("");
2183
+ console.log(chalk.red(` ==> 7.1 ************************************************************************************************`));
2184
+ console.log(p1);
2185
+ console.log(chalk.red(`************************************************************************************************`));
2186
+ console.log(p2);
2187
+ console.log(chalk.red(`************************************************************************************************`));
2188
+ console.log("");
2189
+ process.exit(1);
2190
+ }
2169
2191
  return retValPatched.body;
2170
2192
  };
2171
2193
  };
@@ -2186,6 +2208,9 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
2186
2208
  const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
2187
2209
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
2188
2210
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2211
+ console.log("08");
2212
+ console.log(personRecord);
2213
+ console.log(retValPatched.body);
2189
2214
  return retValPatched.body;
2190
2215
  };
2191
2216
  };
@@ -2202,6 +2227,9 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
2202
2227
  const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
2203
2228
  this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
2204
2229
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2230
+ console.log("09");
2231
+ console.log(personRecord);
2232
+ console.log(retVal.body);
2205
2233
  return retVal.body;
2206
2234
  } catch (error) {
2207
2235
  if (axios.isAxiosError(error)) {