Skip to content

Commit

Permalink
Updated test file queries for medium-promo-block
Browse files Browse the repository at this point in the history
  • Loading branch information
Gripholder committed Sep 12, 2024
1 parent ac7fd7c commit 3c7ec41
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions blocks/medium-promo-block/features/medium-promo/default.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ describe("the medium promo feature", () => {
jest.clearAllMocks();
});

it("should return null if lazyLoad on the server and not in the admin", () => {
it("should not render if lazyLoad on the server and not in the admin", () => {
const config = {
lazyLoad: true,
};
const { container } = render(<MediumPromo customFields={config} />);
expect(container.firstChild).toBe(null);
render(<MediumPromo customFields={config} />);
expect(screen.queryByRole("article")).not.toBeInTheDocument();
});

it("should return null if none of the show... flags are true", () => {
it("should not render if none of the show... flags are true", () => {
const config = {};
const { container } = render(<MediumPromo customFields={config} />);
expect(container.firstChild).toBeNull();
render(<MediumPromo customFields={config} />);
expect(screen.queryByRole("article")).not.toBeInTheDocument();
});

it("should display a headline if showHeadline is true", () => {
Expand Down

0 comments on commit 3c7ec41

Please sign in to comment.