|
1
|
import { render, screen } from "@testing-library/react" |
|
2
|
import * as React from "react" |
|
3
|
import { InlineTip } from "./inline-tip" |
|
4
|
|
|
5
|
describe("InlineTip", () => { |
|
6
|
it("renders a InlineTip", () => { |
|
7
|
render(<InlineTip label="Test">This is a test</InlineTip>) |
|
8
|
expect(screen.getByText("This is a test")).toBeInTheDocument() |
|
9
|
}) |
|
10
|
|
|
11
|
it("renders a InlineTip with a warning variant", () => { |
|
12
|
render( |
|
13
|
<InlineTip variant="warning" label="Test"> |
|
14
|
This is a test |
|
15
|
</InlineTip> |
|
16
|
) |
|
17
|
expect(screen.getByText("This is a test")).toBeInTheDocument() |
|
18
|
}) |
|
19
|
|
|
20
|
it("renders a InlineTip with an error variant", () => { |
|
21
|
render( |
|
22
|
<InlineTip variant="error" label="Test"> |
|
23
|
This is a test |
|
24
|
</InlineTip> |
|
25
|
) |
|
26
|
expect(screen.getByText("This is a test")).toBeInTheDocument() |
|
27
|
}) |
|
28
|
|
|
29
|
it("renders a InlineTip with a success variant", () => { |
|
30
|
render( |
|
31
|
<InlineTip variant="success" label="Test"> |
|
32
|
This is a test |
|
33
|
</InlineTip> |
|
34
|
) |
|
35
|
expect(screen.getByText("This is a test")).toBeInTheDocument() |
|
36
|
}) |
|
37
|
}) |