* 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>
21 lines
771 B
TypeScript
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();
|
|
});
|
|
});
|