Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Malavika Koppula committed Dec 6, 2023
1 parent b834121 commit d8def69
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe("the small manual promo feature", () => {
});

it("should render heading first when imagePosition is set to below", () => {
render(<SmallManualPromo customFields={{ ...customFields, imagePosition: "below" }} />);
render(<SmallManualPromo customFields={{ ...customFields, imagePosition: "inset-block-end" }} />);
const stack = screen.queryByRole("article");
const heading = screen.queryByRole("heading");
expect(stack.firstChild).toBe(heading);

Check warning on line 106 in blocks/small-manual-promo-block/features/small-manual-promo/default.test.jsx

View workflow job for this annotation

GitHub Actions / ensure_minimum_test_coverage_linting

Avoid direct Node access. Prefer using the methods from Testing Library
Expand All @@ -109,7 +109,7 @@ describe("the small manual promo feature", () => {
it("should render image first when imagePosition is set to left", () => {
render(
<SmallManualPromo
customFields={{ ...customFields, imagePosition: "left", linkURL: undefined }}
customFields={{ ...customFields, imagePosition: "inset-inline-start", linkURL: undefined }}
/>
);
const stack = screen.queryByRole("article");
Expand Down Expand Up @@ -155,7 +155,7 @@ describe("the small manual promo feature", () => {
});

it("should render heading first when imagePosition is set to right", () => {
render(<SmallManualPromo customFields={{ ...customFields, imagePosition: "right" }} />);
render(<SmallManualPromo customFields={{ ...customFields, imagePosition: "inset-inline-end" }} />);
const stack = screen.queryByRole("article");
const heading = screen.queryByRole("heading");
expect(stack.firstChild).toBe(heading);
Expand Down

0 comments on commit d8def69

Please sign in to comment.