Files
calendar/packages/ui/components/organization-banner/OrgBanner.test.tsx
T
7ee3f9409c feat: [CAL-3939] fix org banner (#15557)
* update documentation for proper hostile command

* add OrgBanner component and replace it in ee organization profile settings

* add width and height defaults, with option to override

* updated sizing with image loaded

* fix: add alt to OrgBanner in test

* fix: failing OrgBanner test, added neg test

---------

Co-authored-by: Keith Williams <keithwillcode@gmail.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2024-07-19 05:30:50 +00:00

21 lines
771 B
TypeScript

/* eslint-disable playwright/missing-playwright-await */
import { render } from "@testing-library/react";
import { OrgBanner } from "./OrgBanner";
describe("tests for OrgBanner component", () => {
test("Should render the OrgBanner correctly when supplied imageSrc", () => {
const { getByTestId } = render(
<OrgBanner alt="Test Org Banner" data-testid="org-banner-test" imageSrc="/logo.svg" />
);
const orgBanner = getByTestId("org-banner-test");
expect(orgBanner).toBeInTheDocument();
});
test("Should not render the OrgBanner when no imageSrc is supplied", () => {
const { getByTestId } = render(<OrgBanner alt="Test Org Banner" data-testid="org-banner-test" />);
expect(() => getByTestId("org-banner-test")).toThrow();
});
});