@bigbinary/neetoui 3.2.79 → 3.2.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +1 -1
- package/index.js +1 -1
- package/layouts.js +1 -1
- package/package.json +1 -1
- package/.circleci/config.yml +0 -37
- package/.eslint-rules/imports/enforced.js +0 -20
- package/.eslint-rules/imports/order.js +0 -15
- package/.eslint-rules/overrides.js +0 -12
- package/.eslint-rules/react.js +0 -34
- package/jest-setup.js +0 -22
- package/tests/Accordion.test.js +0 -103
- package/tests/ActionDropdown.test.js +0 -61
- package/tests/Alert.test.js +0 -126
- package/tests/Button.test.js +0 -73
- package/tests/Callout.test.js +0 -20
- package/tests/Checkbox.test.js +0 -43
- package/tests/Collapse.test.js +0 -19
- package/tests/ColorPicker.test.js +0 -117
- package/tests/DatePicker.test.js +0 -111
- package/tests/Dropdown.test.js +0 -185
- package/tests/EmailInput.test.js +0 -166
- package/tests/Input.test.js +0 -75
- package/tests/Label.test.js +0 -61
- package/tests/Modal.test.js +0 -116
- package/tests/PageLoader.test.js +0 -15
- package/tests/Pagination.test.js +0 -125
- package/tests/Pane.test.js +0 -116
- package/tests/Radio.test.js +0 -83
- package/tests/Select.test.js +0 -85
- package/tests/Spinner.test.js +0 -10
- package/tests/Switch.test.js +0 -61
- package/tests/Tab.test.js +0 -60
- package/tests/Table.test.js +0 -204
- package/tests/Tag.test.js +0 -40
- package/tests/Textarea.test.js +0 -51
- package/tests/TimePicker.test.js +0 -92
- package/tests/Toastr.test.js +0 -217
- package/tests/Tooltip.test.js +0 -44
- package/tests/Typography.test.js +0 -20
package/tests/Tooltip.test.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Tooltip, Typography } from "../lib/components";
|
|
3
|
-
import { render, screen, waitFor } from "@testing-library/react";
|
|
4
|
-
import userEvent from "@testing-library/user-event";
|
|
5
|
-
|
|
6
|
-
describe("Tooltip", () => {
|
|
7
|
-
it("should render on hover ", () => {
|
|
8
|
-
render(
|
|
9
|
-
<Tooltip content="Tooltip">
|
|
10
|
-
<Typography>Text</Typography>
|
|
11
|
-
</Tooltip>
|
|
12
|
-
);
|
|
13
|
-
const text = screen.getByText("Text")
|
|
14
|
-
userEvent.hover(text)
|
|
15
|
-
const tooltip = screen.getByText("Tooltip")
|
|
16
|
-
expect(tooltip).toBeInTheDocument();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it("should not render when user stops hovering", async () => {
|
|
20
|
-
render(
|
|
21
|
-
<Tooltip content="Tooltip" >
|
|
22
|
-
<Typography>Text</Typography>
|
|
23
|
-
</Tooltip>
|
|
24
|
-
);
|
|
25
|
-
const text = screen.getByText("Text")
|
|
26
|
-
userEvent.hover(text)
|
|
27
|
-
const tooltip = screen.getByText("Tooltip")
|
|
28
|
-
userEvent.unhover(text)
|
|
29
|
-
await waitFor(() => expect(tooltip).not.toBeVisible())
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it("should auto hide tooltip after n milliseconds", async () => {
|
|
33
|
-
render(
|
|
34
|
-
<Tooltip content="Tooltip" hideAfter={100}>
|
|
35
|
-
<Typography>Text</Typography>
|
|
36
|
-
</Tooltip>
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
const text = screen.getByText("Text")
|
|
40
|
-
userEvent.hover(text)
|
|
41
|
-
const tooltip = screen.getByText("Tooltip")
|
|
42
|
-
await waitFor(() => expect(tooltip).not.toBeVisible())
|
|
43
|
-
});
|
|
44
|
-
});
|
package/tests/Typography.test.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Typography } from "../lib/components";
|
|
3
|
-
import { render } from "@testing-library/react";
|
|
4
|
-
|
|
5
|
-
describe("Typography", () => {
|
|
6
|
-
it("should render without error", () => {
|
|
7
|
-
const { getByText } = render(<Typography style="body1">Typography</Typography>);
|
|
8
|
-
expect(getByText("Typography")).toBeInTheDocument();
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
it("should render a heading when style is of heading type", () => {
|
|
12
|
-
const { getByRole } = render(<Typography style="h1">Typography</Typography>);
|
|
13
|
-
expect(getByRole("heading", { level: 1 })).toBeInTheDocument();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it("should override default tag when component prop is given", () => {
|
|
17
|
-
const { getByRole } = render(<Typography style="h1" component="h2">Typography</Typography>);
|
|
18
|
-
expect(getByRole("heading", { level: 2 })).toBeInTheDocument();
|
|
19
|
-
});
|
|
20
|
-
});
|