Skip to content

Commit

Permalink
Sreelekha | MOBN-2513| Fix. Test cases (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
SreelekhaDarsi authored Nov 5, 2024
1 parent 849406e commit 1e7a3d9
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3238,12 +3238,11 @@ describe("FormRecordTreeBuildService", function () {

let multiSelectObservation = observations[0].value[0];

expect(multiSelectObservation.concept.shortName).toBe("CodedForm");
expect(multiSelectObservation.groupMembers.length).toBe(1);
expect(multiSelectObservation.groupMembers[0].groupMembers.length).toBe(2);
expect(multiSelectObservation.groupMembers[0].type).toBe("multiSelect");
expect(multiSelectObservation.groupMembers[0].groupMembers[0].valueAsString).toBe("Susceptible");
expect(multiSelectObservation.groupMembers[0].groupMembers[1].valueAsString).toBe("Resistant");
expect(multiSelectObservation.concept.shortName).toBe("MD, Medical History");
expect(multiSelectObservation.groupMembers.length).toBe(2);
expect(multiSelectObservation.type).toBe("multiSelect");
expect(multiSelectObservation.groupMembers[0].valueAsString).toBe("Susceptible");
expect(multiSelectObservation.groupMembers[1].valueAsString).toBe("Resistant");
});

it('should return observations with out hierarchy when hasNoHierarchy is true', function () {
Expand Down Expand Up @@ -3357,9 +3356,10 @@ describe("FormRecordTreeBuildService", function () {
formDetailDeferred.resolve(formDetails);
$scope.$apply();

expect(observations[0].value[0].groupMembers.length, 2);
const observationOne = observations[0].value[0].groupMembers[0];
const observationTwo = observations[0].value[0].groupMembers[1];
expect(observations[0].value.length).toBe(2);

const observationOne = observations[0].value[0];
const observationTwo = observations[0].value[1];

expect(observationOne.concept.shortName).toBe("MD, Medical History");
expect(observationOne.formFieldPath).toBe("CodedForm.1/5-0");
Expand Down

0 comments on commit 1e7a3d9

Please sign in to comment.