Skip to content

Commit

Permalink
Adding visible class test
Browse files Browse the repository at this point in the history
  • Loading branch information
grantbacon-jaspersoft committed Jul 8, 2024
1 parent f09ad3d commit e877791
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,13 @@ describe("useControlClasses custom hook", () => {
expect(result.current).toContain("jv-uReadOnly");
expect(result.current).not.toContain("jv-uMandatory");
});

it("should return hidden if not visible", () => {
const icProps = { ...requiredProps, visible: false };
const { result } = renderHook(() => useControlClasses([], icProps));
expect(result.current).toContain("jv-uVisibility-hide");
expect(result.current).not.toContain("jv-uMandatory");
expect(result.current).not.toContain("jv-uReadOnly");
expect(result.current).not.toContain("jv-uMandatory");
});
});

0 comments on commit e877791

Please sign in to comment.