Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoud authored and Mahmoud committed May 22, 2024
1 parent 4df2a75 commit 5c4dad1
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions publisher/src/stores/FormStore.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,31 +137,13 @@ test("disaggregation dimension value handler updates the disaggregation dimensio
expect.hasAssertions();
});

test("context value handler updates the context value", () => {
formStore.updateContextValue(
0,
"PROSECUTION_STAFF",
"PROGRAMMATIC_OR_MEDICAL_STAFF",
"100",
false,
"NUMBER",
true
);

expect(
formStore.contexts[0].PROSECUTION_STAFF.PROGRAMMATIC_OR_MEDICAL_STAFF.value
).toEqual("100");

expect.hasAssertions();
});

test("updatedReportValues maps all updated (and not updated) input values into required data structure", () => {
expect(JSON.stringify(formStore.reportUpdatedValuesForBackend(0))).toEqual(
JSON.stringify([
{
key: "PROSECUTION_STAFF",
value: 2000,
contexts: [{ key: "PROGRAMMATIC_OR_MEDICAL_STAFF", value: 100 }],
contexts: [],
disaggregations: [
{
key: "PROSECUTION_STAFF_TYPE",
Expand Down

0 comments on commit 5c4dad1

Please sign in to comment.