Skip to content

Commit

Permalink
test: added iconposition test case
Browse files Browse the repository at this point in the history
  • Loading branch information
yaswanth-deriv committed Mar 29, 2024
1 parent 48ebed8 commit af328dc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/InlineMessage/__test__/InlineMessage.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,14 @@ describe("InlineMessage Component", () => {
);
expect(container.firstChild).toHaveClass("custom-class");
});

it("should position the icon at the top", () => {
const { container } = render(
<InlineMessage iconPosition="top" variant="info">
Test Message
</InlineMessage>
);
const iconElement = container.querySelector(".deriv-inline-message__icon--top")
expect(iconElement).toBeInTheDocument();
});
});

0 comments on commit af328dc

Please sign in to comment.