diff --git a/src/components/Buttons/Button/Button.tsx b/src/components/Buttons/Button/Button.tsx index 20c5189c..55d3d90a 100644 --- a/src/components/Buttons/Button/Button.tsx +++ b/src/components/Buttons/Button/Button.tsx @@ -63,6 +63,3 @@ const Button: React.FC = ({ }; export default Button; -// ${size === "large" ? "px-4 py-3 text-lg" : ""} -// ${size === "normal" ? "px-4 py-2 text-base" : ""} -// ${size === "small" ? "px-3 py-1.5 text-sm rounded-lg" : ""} diff --git a/src/components/Buttons/Button/Test/Button.spec.tsx b/src/components/Buttons/Button/Test/Button.spec.tsx index 318fdac9..ddac88ef 100644 --- a/src/components/Buttons/Button/Test/Button.spec.tsx +++ b/src/components/Buttons/Button/Test/Button.spec.tsx @@ -128,4 +128,22 @@ describe("Button Component", () => { const button = screen.getByText(Texts.TEXT); expect(button).toHaveClass("bg-transparent text-primary"); }); + + // Centered + + test("If centered prop is true, should have justify-center text-center classes", () => { + render(); + const button = screen.getByText(Texts.TEXT); + expect(button).toHaveClass("justify-center text-center"); + }); + + test("if onlyIcon prop is true, then there is not children", () => { + render( + + ); + const button = screen.getByRole("button"); + expect(button).not.toHaveTextContent("Children"); + }); }); diff --git a/src/utils/storageFunctions/storageFunctions.spec.ts b/src/utils/storageFunctions/storageFunctions.spec.ts index e16aa112..49df570c 100644 --- a/src/utils/storageFunctions/storageFunctions.spec.ts +++ b/src/utils/storageFunctions/storageFunctions.spec.ts @@ -26,6 +26,12 @@ describe("Storage Functions", () => { localStorageMock.clear(); }); + it("the 3 functions should be defined", () => { + expect(getLocalStorage).toBeDefined(); + expect(setToLocalStorage).toBeDefined(); + expect(removeFromLocalStorage).toBeDefined(); + }); + it("should get a value from localStorage", () => { const key = "testKey"; const initialValue = "defaultValue";