@qoretechnologies/reqore 0.22.0 → 0.23.0
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/__tests__/dropdown.test.tsx +9 -0
- package/__tests__/popover.test.tsx +119 -28
- package/dist/components/Breadcrumbs/index.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/Breadcrumbs/index.js.map +1 -1
- package/dist/components/Table/headerCell.js +2 -2
- package/dist/components/Table/headerCell.js.map +1 -1
- package/dist/hooks/usePopover.d.ts +2 -1
- package/dist/hooks/usePopover.d.ts.map +1 -1
- package/dist/hooks/usePopover.js +32 -13
- package/dist/hooks/usePopover.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Breadcrumbs/index.tsx +1 -0
- package/src/components/Table/headerCell.tsx +2 -2
- package/src/hooks/usePopover.tsx +43 -14
- package/src/stories/Popover/Popover.stories.tsx +16 -1
- package/tests.json +1 -1
|
@@ -9,8 +9,13 @@ import {
|
|
|
9
9
|
ReqoreUIProvider,
|
|
10
10
|
} from '../src';
|
|
11
11
|
|
|
12
|
+
beforeAll(() => {
|
|
13
|
+
jest.useFakeTimers();
|
|
14
|
+
});
|
|
15
|
+
|
|
12
16
|
test('Renders <Dropdown /> properly', () => {
|
|
13
17
|
act(() => {
|
|
18
|
+
jest.advanceTimersByTime(1);
|
|
14
19
|
render(
|
|
15
20
|
<ReqoreUIProvider>
|
|
16
21
|
<ReqoreLayoutContent>
|
|
@@ -40,6 +45,7 @@ test('Renders <Dropdown /> properly', () => {
|
|
|
40
45
|
});
|
|
41
46
|
|
|
42
47
|
fireEvent.click(document.querySelector('.reqore-button')!);
|
|
48
|
+
jest.advanceTimersByTime(1);
|
|
43
49
|
|
|
44
50
|
expect(document.querySelector('.reqore-button')?.getAttribute('disabled')).toBe(null);
|
|
45
51
|
expect(document.querySelectorAll('.reqore-button').length).toBe(5);
|
|
@@ -106,6 +112,7 @@ test('Renders <Dropdown /> with custom component and custom handler', () => {
|
|
|
106
112
|
|
|
107
113
|
if (component) {
|
|
108
114
|
fireEvent.focus(component);
|
|
115
|
+
jest.advanceTimersByTime(1);
|
|
109
116
|
}
|
|
110
117
|
|
|
111
118
|
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
|
|
@@ -148,6 +155,7 @@ test('Renders <Dropdown /> is opened by default', () => {
|
|
|
148
155
|
</ReqoreLayoutContent>
|
|
149
156
|
</ReqoreUIProvider>
|
|
150
157
|
);
|
|
158
|
+
jest.advanceTimersByTime(1);
|
|
151
159
|
});
|
|
152
160
|
|
|
153
161
|
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
|
|
@@ -186,6 +194,7 @@ test('Renders filterable <Dropdown /> and filters items correctly', () => {
|
|
|
186
194
|
});
|
|
187
195
|
|
|
188
196
|
fireEvent.click(document.querySelector('.reqore-button')!);
|
|
197
|
+
jest.advanceTimersByTime(1);
|
|
189
198
|
fireEvent.change(document.querySelector('.reqore-input')!, {
|
|
190
199
|
target: { value: 'how' },
|
|
191
200
|
});
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { act, fireEvent, render, screen } from
|
|
2
|
-
import React from
|
|
3
|
-
import { ReqorePopover, ReqoreUIProvider } from
|
|
1
|
+
import { act, fireEvent, render, screen } from '@testing-library/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReqorePopover, ReqoreUIProvider } from '../src/index';
|
|
4
4
|
|
|
5
5
|
const SimpleContent = (props: any) => {
|
|
6
6
|
return (
|
|
7
7
|
<ReqorePopover
|
|
8
|
-
component=
|
|
9
|
-
content={props.content ||
|
|
8
|
+
component='p'
|
|
9
|
+
content={props.content || 'Tooltip content'}
|
|
10
10
|
handler={props.type}
|
|
11
|
+
delay={props.delay}
|
|
11
12
|
isReqoreComponent
|
|
12
13
|
>
|
|
13
14
|
Hover me
|
|
@@ -18,9 +19,9 @@ const SimpleContent = (props: any) => {
|
|
|
18
19
|
const FullContent = (props: any) => {
|
|
19
20
|
return (
|
|
20
21
|
<ReqorePopover
|
|
21
|
-
component=
|
|
22
|
-
content={props.content ||
|
|
23
|
-
placement=
|
|
22
|
+
component='p'
|
|
23
|
+
content={props.content || 'test'}
|
|
24
|
+
placement='right'
|
|
24
25
|
componentProps={{ onMouseEnter: () => props.fn() }}
|
|
25
26
|
>
|
|
26
27
|
Hover me
|
|
@@ -32,45 +33,47 @@ beforeAll(() => {
|
|
|
32
33
|
jest.useFakeTimers();
|
|
33
34
|
});
|
|
34
35
|
|
|
35
|
-
test(
|
|
36
|
+
test('Shows popover on hover, hides on leave', async () => {
|
|
36
37
|
render(
|
|
37
38
|
<ReqoreUIProvider>
|
|
38
39
|
<SimpleContent />
|
|
39
40
|
</ReqoreUIProvider>
|
|
40
41
|
);
|
|
41
42
|
|
|
42
|
-
fireEvent.mouseEnter(screen.getByText(
|
|
43
|
+
fireEvent.mouseEnter(screen.getByText('Hover me'));
|
|
44
|
+
jest.advanceTimersByTime(1);
|
|
43
45
|
|
|
44
|
-
expect(document.querySelectorAll(
|
|
46
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
|
|
45
47
|
|
|
46
|
-
fireEvent.mouseLeave(screen.getByText(
|
|
48
|
+
fireEvent.mouseLeave(screen.getByText('Hover me'));
|
|
47
49
|
|
|
48
|
-
expect(document.querySelectorAll(
|
|
50
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(0);
|
|
49
51
|
});
|
|
50
52
|
|
|
51
|
-
test(
|
|
53
|
+
test('Shows popover on click, hides only on click away', async () => {
|
|
52
54
|
act(() => {
|
|
53
55
|
render(
|
|
54
56
|
<ReqoreUIProvider>
|
|
55
|
-
<SimpleContent type=
|
|
57
|
+
<SimpleContent type='click' />
|
|
56
58
|
</ReqoreUIProvider>
|
|
57
59
|
);
|
|
58
60
|
});
|
|
59
61
|
|
|
60
|
-
fireEvent.click(screen.getByText(
|
|
62
|
+
fireEvent.click(screen.getByText('Hover me'));
|
|
63
|
+
jest.advanceTimersByTime(1);
|
|
61
64
|
|
|
62
|
-
expect(document.querySelectorAll(
|
|
65
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
|
|
63
66
|
|
|
64
|
-
fireEvent.click(screen.getByText(
|
|
67
|
+
fireEvent.click(screen.getByText('Tooltip content'));
|
|
65
68
|
|
|
66
|
-
expect(document.querySelectorAll(
|
|
69
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
|
|
67
70
|
|
|
68
|
-
fireEvent.click(screen.getByText(
|
|
71
|
+
fireEvent.click(screen.getByText('Hover me'));
|
|
69
72
|
|
|
70
|
-
expect(document.querySelectorAll(
|
|
73
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(0);
|
|
71
74
|
});
|
|
72
75
|
|
|
73
|
-
test(
|
|
76
|
+
test('Shows custom content', async () => {
|
|
74
77
|
act(() => {
|
|
75
78
|
render(
|
|
76
79
|
<ReqoreUIProvider>
|
|
@@ -79,14 +82,15 @@ test("Shows custom content", async () => {
|
|
|
79
82
|
);
|
|
80
83
|
});
|
|
81
84
|
|
|
82
|
-
fireEvent.mouseEnter(screen.getByText(
|
|
85
|
+
fireEvent.mouseEnter(screen.getByText('Hover me'));
|
|
86
|
+
jest.advanceTimersByTime(1);
|
|
83
87
|
|
|
84
|
-
expect(document.querySelectorAll(
|
|
88
|
+
expect(document.querySelectorAll('h1').length).toBe(1);
|
|
85
89
|
|
|
86
|
-
fireEvent.mouseLeave(screen.getByText(
|
|
90
|
+
fireEvent.mouseLeave(screen.getByText('Hover me'));
|
|
87
91
|
});
|
|
88
92
|
|
|
89
|
-
test(
|
|
93
|
+
test('Runs callback function', async () => {
|
|
90
94
|
const fn = jest.fn();
|
|
91
95
|
|
|
92
96
|
act(() => {
|
|
@@ -97,9 +101,96 @@ test("Runs callback function", async () => {
|
|
|
97
101
|
);
|
|
98
102
|
});
|
|
99
103
|
|
|
100
|
-
fireEvent.mouseEnter(screen.getByText(
|
|
104
|
+
fireEvent.mouseEnter(screen.getByText('Hover me'));
|
|
105
|
+
jest.advanceTimersByTime(1);
|
|
101
106
|
|
|
102
107
|
expect(fn).toHaveBeenCalled();
|
|
103
108
|
|
|
104
|
-
fireEvent.mouseLeave(screen.getByText(
|
|
109
|
+
fireEvent.mouseLeave(screen.getByText('Hover me'));
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test('Shows the popover after a delay', async () => {
|
|
113
|
+
render(
|
|
114
|
+
<ReqoreUIProvider>
|
|
115
|
+
<SimpleContent delay={500} />
|
|
116
|
+
</ReqoreUIProvider>
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
fireEvent.mouseEnter(screen.getByText('Hover me'));
|
|
120
|
+
|
|
121
|
+
jest.advanceTimersByTime(100);
|
|
122
|
+
|
|
123
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(0);
|
|
124
|
+
|
|
125
|
+
jest.advanceTimersByTime(400);
|
|
126
|
+
|
|
127
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
|
|
128
|
+
|
|
129
|
+
fireEvent.mouseLeave(screen.getByText('Hover me'));
|
|
130
|
+
|
|
131
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(0);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
test('Does not show the popover with delay if time not reached', async () => {
|
|
135
|
+
render(
|
|
136
|
+
<ReqoreUIProvider>
|
|
137
|
+
<SimpleContent delay={500} />
|
|
138
|
+
</ReqoreUIProvider>
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
fireEvent.mouseEnter(screen.getByText('Hover me'));
|
|
142
|
+
|
|
143
|
+
jest.advanceTimersByTime(100);
|
|
144
|
+
|
|
145
|
+
fireEvent.mouseLeave(screen.getByText('Hover me'));
|
|
146
|
+
|
|
147
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(0);
|
|
148
|
+
|
|
149
|
+
jest.advanceTimersByTime(500);
|
|
150
|
+
|
|
151
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(0);
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
test('Shows the hoverStay popover after a delay and stays, ', async () => {
|
|
155
|
+
render(
|
|
156
|
+
<ReqoreUIProvider>
|
|
157
|
+
<SimpleContent delay={500} type='hoverStay' />
|
|
158
|
+
</ReqoreUIProvider>
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
fireEvent.mouseEnter(screen.getByText('Hover me'));
|
|
162
|
+
|
|
163
|
+
jest.advanceTimersByTime(100);
|
|
164
|
+
|
|
165
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(0);
|
|
166
|
+
|
|
167
|
+
jest.advanceTimersByTime(400);
|
|
168
|
+
|
|
169
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
|
|
170
|
+
|
|
171
|
+
fireEvent.mouseLeave(screen.getByText('Hover me'));
|
|
172
|
+
|
|
173
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
test('Shows the hoverStay popover after a delay and stays, ', async () => {
|
|
177
|
+
render(
|
|
178
|
+
<ReqoreUIProvider>
|
|
179
|
+
<SimpleContent delay={500} type='hoverStay' />
|
|
180
|
+
</ReqoreUIProvider>
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
fireEvent.mouseEnter(screen.getByText('Hover me'));
|
|
184
|
+
|
|
185
|
+
jest.advanceTimersByTime(100);
|
|
186
|
+
|
|
187
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(0);
|
|
188
|
+
|
|
189
|
+
jest.advanceTimersByTime(500);
|
|
190
|
+
|
|
191
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
|
|
192
|
+
|
|
193
|
+
fireEvent.mouseLeave(screen.getByText('Hover me'));
|
|
194
|
+
|
|
195
|
+
expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
|
|
105
196
|
});
|
|
@@ -1 +1 @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,OAAO,CAAC;IAE3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAkHD,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAoHxD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -144,7 +144,7 @@ var ReqoreBreadcrumbs = function (_a) {
|
|
|
144
144
|
return ((0, jsx_runtime_1.jsxs)(react_2["default"].Fragment, { children: [(0, jsx_runtime_1.jsx)(Icon_1["default"], { icon: 'ArrowRightSLine', size: "".concat(sizes_1.TEXT_FROM_SIZE[size], "px"), margin: 'both' }, 'icon' + index), (0, jsx_runtime_1.jsx)(__1.ReqorePopover, { component: item_3["default"], isReqoreComponent: true, componentProps: {
|
|
145
145
|
icon: 'MoreFill',
|
|
146
146
|
interactive: true
|
|
147
|
-
}, handler: 'hoverStay', content: (0, jsx_runtime_1.jsx)(Menu_1["default"], { children: item.map(function (_a) {
|
|
147
|
+
}, handler: 'hoverStay', delay: 500, content: (0, jsx_runtime_1.jsx)(Menu_1["default"], { children: item.map(function (_a) {
|
|
148
148
|
var icon = _a.icon, label = _a.label, as = _a.as, tooltip = _a.tooltip, props = _a.props;
|
|
149
149
|
return ((0, react_1.createElement)(item_1["default"], __assign({}, props, { icon: icon, as: as, onClick: function (_itemId, event) {
|
|
150
150
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,6CAAuC;AACvC,uCAAuC;AACvC,qEAAgD;AAChD,2BAAsC;AACtC,+CAM+B;AAE/B,+CAA+F;AAC/F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R,MAAM,GAAG,KAAK,CAEnB,CACH,EACD,2BAAC,iBAAqB,eAAK,IAAI,IAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,IAAI,KATlE,KAAK,CAUT,CAClB,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,wBAAC,uBAAuB,eAClB,IAAI,IACR,SAAS,EAAE,UAAG,IAAI,CAAC,SAAS,IAAI,EAAE,gCAA6B,EAC/D,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,iBAEV,0CACG,gBAAgB,CAAC,GAAG,CACnB,UAAC,IAAqD,EAAE,KAAa;oBACnE,OAAA,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC;gBAAvB,CAAuB,CAC1B,IAJM,iCAAiC,CAKpC,EACL,YAAY,IAAI,0CAAM,YAAY,GAAO,KAClB,CAC3B,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAe,iBAAiB,CAAC"}
|
|
@@ -58,7 +58,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
58
58
|
var react_1 = require("react");
|
|
59
59
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
60
60
|
var colors_1 = require("../../helpers/colors");
|
|
61
|
-
var
|
|
61
|
+
var useTooltip_1 = require("../../hooks/useTooltip");
|
|
62
62
|
var Icon_1 = __importDefault(require("../Icon"));
|
|
63
63
|
var row_1 = require("./row");
|
|
64
64
|
exports.StyledTableHeader = styled_components_1["default"].div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n\n ", "\n\n ", ";\n"], ["\n ", ";\n\n ", "\n\n ", ";\n"])), function (_a) {
|
|
@@ -75,7 +75,7 @@ var StyledTableHeaderLabel = styled_components_1["default"].span(templateObject_
|
|
|
75
75
|
var ReqoreTableHeaderCell = function (_a) {
|
|
76
76
|
var width = _a.width, grow = _a.grow, align = _a.align, header = _a.header, onSortChange = _a.onSortChange, dataId = _a.dataId, sortable = _a.sortable, sortData = _a.sortData, onClick = _a.onClick, className = _a.className, icon = _a.icon, iconSize = _a.iconSize, tooltip = _a.tooltip, props = __rest(_a, ["width", "grow", "align", "header", "onSortChange", "dataId", "sortable", "sortData", "onClick", "className", "icon", "iconSize", "tooltip"]);
|
|
77
77
|
var _b = (0, react_1.useState)(null), ref = _b[0], setRef = _b[1];
|
|
78
|
-
(0,
|
|
78
|
+
(0, useTooltip_1.useTooltip)(ref, { content: tooltip || header, delay: 300 });
|
|
79
79
|
return ((0, jsx_runtime_1.jsxs)(exports.StyledTableHeader, __assign({}, props, { className: "".concat(className || '', " reqore-table-header-cell"), ref: setRef, width: width, grow: grow, align: align, interactive: sortable || !!onClick, onClick: function (event) {
|
|
80
80
|
if (sortable) {
|
|
81
81
|
onSortChange(dataId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headerCell.js","sourceRoot":"","sources":["../../../src/components/Table/headerCell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,WAAW;AACX,+BAAwC;AACxC,qEAAgD;AAGhD,+CAAyE;AACzE,
|
|
1
|
+
{"version":3,"file":"headerCell.js","sourceRoot":"","sources":["../../../src/components/Table/headerCell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,WAAW;AACX,+BAAwC;AACxC,qEAAgD;AAGhD,+CAAyE;AACzE,qDAAoD;AACpD,iDAAiC;AACjC,6BAAoC;AAiBvB,QAAA,iBAAiB,GAAG,8BAAM,CAAC,GAAG,qGAAyB,MAChE,EAIC,SAED,EAGD,QAEC,EAUC,KACJ,KAtBG,UAAC,EAAe;QAAb,KAAK,WAAA,EAAE,IAAI,UAAA;IACd,WAAA,uBAAG,0HAAA,iBACQ,EAAiC,wBAC7B,EAA+B,SAC7C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ideClick?: boolean;
|
|
12
12
|
closeOnAnyClick?: boolean;
|
|
13
|
+
delay?: number;
|
|
13
14
|
}
|
|
14
15
|
export interface IPopoverOptions extends IPopover {
|
|
15
16
|
targetElement?: HTMLElement;
|
|
16
17
|
}
|
|
17
|
-
declare const usePopover: ({ targetElement, content, handler, placement, show, noArrow, useTargetWidth, closeOnOutsideClick, openOnMount, }: IPopoverOptions) => string;
|
|
18
|
+
declare const usePopover: ({ targetElement, content, handler, placement, show, noArrow, useTargetWidth, closeOnOutsideClick, openOnMount, delay, }: IPopoverOptions) => string;
|
|
18
19
|
export default usePopover;
|
|
19
20
|
//# sourceMappingURL=usePopover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePopover.d.ts","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAoB3C,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAC;IACpD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"usePopover.d.ts","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAoB3C,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,CAAC;IACpD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,aAAa,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED,QAAA,MAAM,UAAU,4HAWb,eAAe,WAgGjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/dist/hooks/usePopover.js
CHANGED
|
@@ -20,31 +20,40 @@ var endEvents = {
|
|
|
20
20
|
focus: null
|
|
21
21
|
};
|
|
22
22
|
var usePopover = function (_a) {
|
|
23
|
-
var targetElement = _a.targetElement, content = _a.content, _b = _a.handler, handler = _b === void 0 ? 'hover' : _b, placement = _a.placement, _c = _a.show, show = _c === void 0 ? true : _c, noArrow = _a.noArrow, useTargetWidth = _a.useTargetWidth, _d = _a.closeOnOutsideClick, closeOnOutsideClick = _d === void 0 ? true : _d, _e = _a.openOnMount, openOnMount = _e === void 0 ? false : _e;
|
|
23
|
+
var targetElement = _a.targetElement, content = _a.content, _b = _a.handler, handler = _b === void 0 ? 'hover' : _b, placement = _a.placement, _c = _a.show, show = _c === void 0 ? true : _c, noArrow = _a.noArrow, useTargetWidth = _a.useTargetWidth, _d = _a.closeOnOutsideClick, closeOnOutsideClick = _d === void 0 ? true : _d, _e = _a.openOnMount, openOnMount = _e === void 0 ? false : _e, delay = _a.delay;
|
|
24
24
|
var _f = (0, react_1.useContext)(PopoverContext_1["default"]), addPopover = _f.addPopover, removePopover = _f.removePopover, updatePopover = _f.updatePopover, popovers = _f.popovers;
|
|
25
25
|
var current = (0, react_1.useRef)(shortid_1["default"].generate()).current;
|
|
26
|
+
var timeout = (0, react_1.useRef)(0).current;
|
|
26
27
|
var startEvent = startEvents[handler];
|
|
27
28
|
var endEvent = endEvents[handler];
|
|
29
|
+
var currentPopover = (0, react_1.useMemo)(function () { return popovers === null || popovers === void 0 ? void 0 : popovers.find(function (p) { return p.id === current; }); }, [popovers, current]);
|
|
28
30
|
var _addPopover = function () {
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
+
if (currentPopover) {
|
|
32
|
+
_removePopover === null || _removePopover === void 0 ? void 0 : _removePopover();
|
|
31
33
|
}
|
|
32
34
|
else if (show) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
timeout = setTimeout(function () {
|
|
36
|
+
addPopover === null || addPopover === void 0 ? void 0 : addPopover({
|
|
37
|
+
id: current,
|
|
38
|
+
content: content,
|
|
39
|
+
targetElement: targetElement,
|
|
40
|
+
placement: placement,
|
|
41
|
+
noArrow: noArrow,
|
|
42
|
+
useTargetWidth: useTargetWidth,
|
|
43
|
+
closeOnOutsideClick: closeOnOutsideClick,
|
|
44
|
+
closeOnAnyClick: handler === 'hover' || handler === 'hoverStay'
|
|
45
|
+
});
|
|
46
|
+
}, delay || 0);
|
|
43
47
|
}
|
|
44
48
|
};
|
|
45
49
|
var _removePopover = function () {
|
|
50
|
+
cancelTimeout();
|
|
46
51
|
removePopover === null || removePopover === void 0 ? void 0 : removePopover(current);
|
|
47
52
|
};
|
|
53
|
+
var cancelTimeout = function () {
|
|
54
|
+
clearTimeout(timeout);
|
|
55
|
+
timeout = null;
|
|
56
|
+
};
|
|
48
57
|
(0, react_use_1.useUpdateEffect)(function () {
|
|
49
58
|
if (show) {
|
|
50
59
|
updatePopover === null || updatePopover === void 0 ? void 0 : updatePopover(current, {
|
|
@@ -70,15 +79,25 @@ var usePopover = function (_a) {
|
|
|
70
79
|
if (endEvent) {
|
|
71
80
|
targetElement.addEventListener(endEvent, _removePopover);
|
|
72
81
|
}
|
|
82
|
+
if (handler === 'hoverStay') {
|
|
83
|
+
targetElement.addEventListener('mouseleave', cancelTimeout);
|
|
84
|
+
}
|
|
73
85
|
}
|
|
74
86
|
return function () {
|
|
75
87
|
if (targetElement && content) {
|
|
88
|
+
cancelTimeout();
|
|
76
89
|
targetElement.removeEventListener(startEvent, _addPopover);
|
|
77
90
|
if (endEvent) {
|
|
78
91
|
targetElement.removeEventListener(endEvent, _removePopover);
|
|
79
92
|
}
|
|
93
|
+
if (handler === 'hoverStay') {
|
|
94
|
+
targetElement.removeEventListener('mouseleave', cancelTimeout);
|
|
95
|
+
}
|
|
80
96
|
}
|
|
81
97
|
};
|
|
98
|
+
}, [targetElement, content, current, currentPopover]);
|
|
99
|
+
(0, react_use_1.useUnmount)(function () {
|
|
100
|
+
cancelTimeout();
|
|
82
101
|
});
|
|
83
102
|
return current;
|
|
84
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePopover.js","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";;;;;AACA,+
|
|
1
|
+
{"version":3,"file":"usePopover.js","sourceRoot":"","sources":["../../src/hooks/usePopover.tsx"],"names":[],"mappings":";;;;;AACA,+BAAiF;AACjF,uCAAwD;AACxD,oDAA8B;AAC9B,6EAAuD;AAEvD,IAAM,WAAW,GAAG;IAClB,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,YAAY;IACvB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,IAAM,SAAS,GAAG;IAChB,KAAK,EAAE,YAAY;IACnB,SAAS,EAAE,IAAI;IACf,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;CACZ,CAAC;AAmBF,IAAM,UAAU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,aAAa,CAAC,gBAAgB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;aAC7D;SACF;QAED,OAAO;YACL,IAAI,aAAa,IAAI,OAAO,EAAE;gBAC5B,aAAa,EAAE,CAAC;gBAChB,aAAa,CAAC,mBAAmB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;gBAE3D,IAAI,QAAQ,EAAE;oBACZ,aAAa,CAAC,mBAAmB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;iBAC7D;gBAED,IAAI,OAAO,KAAK,WAAW,EAAE;oBAC3B,aAAa,CAAC,mBAAmB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;iBAChE;aACF;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;IAEtD,IAAA,sBAAU,EAAC;QACT,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,qBAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import styled, { css } from 'styled-components';
|
|
|
4
4
|
import { IReqoreTableColumn, IReqoreTableSort } from '.';
|
|
5
5
|
import { IReqoreTheme } from '../../constants/theme';
|
|
6
6
|
import { changeLightness, getReadableColor } from '../../helpers/colors';
|
|
7
|
-
import
|
|
7
|
+
import { useTooltip } from '../../hooks/useTooltip';
|
|
8
8
|
import ReqoreIcon from '../Icon';
|
|
9
9
|
import { alignToFlex } from './row';
|
|
10
10
|
|
|
@@ -72,7 +72,7 @@ const ReqoreTableHeaderCell = ({
|
|
|
72
72
|
}: IReqoreTableHeaderCellProps) => {
|
|
73
73
|
const [ref, setRef] = useState(null);
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
useTooltip(ref, { content: tooltip || header, delay: 300 });
|
|
76
76
|
|
|
77
77
|
return (
|
|
78
78
|
<StyledTableHeader
|
package/src/hooks/usePopover.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Placement } from '@popperjs/core';
|
|
2
|
-
import { MutableRefObject, useContext, useEffect, useRef } from 'react';
|
|
3
|
-
import { useUpdateEffect } from 'react-use';
|
|
2
|
+
import { MutableRefObject, useContext, useEffect, useMemo, useRef } from 'react';
|
|
3
|
+
import { useUnmount, useUpdateEffect } from 'react-use';
|
|
4
4
|
import shortid from 'shortid';
|
|
5
5
|
import PopoverContext from '../context/PopoverContext';
|
|
6
6
|
|
|
@@ -28,6 +28,7 @@ export interface IPopover {
|
|
|
28
28
|
useTargetWidth?: boolean;
|
|
29
29
|
closeOnOutsideClick?: boolean;
|
|
30
30
|
closeOnAnyClick?: boolean;
|
|
31
|
+
delay?: number;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export interface IPopoverOptions extends IPopover {
|
|
@@ -44,34 +45,48 @@ const usePopover = ({
|
|
|
44
45
|
useTargetWidth,
|
|
45
46
|
closeOnOutsideClick = true,
|
|
46
47
|
openOnMount = false,
|
|
48
|
+
delay,
|
|
47
49
|
}: IPopoverOptions) => {
|
|
48
50
|
const { addPopover, removePopover, updatePopover, popovers } = useContext(PopoverContext);
|
|
49
51
|
const { current }: MutableRefObject<string> = useRef(shortid.generate());
|
|
52
|
+
let { current: timeout }: MutableRefObject<any> = useRef(0);
|
|
50
53
|
|
|
51
54
|
const startEvent = startEvents[handler];
|
|
52
55
|
const endEvent = endEvents[handler];
|
|
56
|
+
const currentPopover = useMemo(
|
|
57
|
+
() => popovers?.find((p) => p.id === current),
|
|
58
|
+
[popovers, current]
|
|
59
|
+
);
|
|
53
60
|
|
|
54
61
|
const _addPopover = () => {
|
|
55
|
-
if (
|
|
56
|
-
|
|
62
|
+
if (currentPopover) {
|
|
63
|
+
_removePopover?.();
|
|
57
64
|
} else if (show) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
timeout = setTimeout(() => {
|
|
66
|
+
addPopover?.({
|
|
67
|
+
id: current,
|
|
68
|
+
content,
|
|
69
|
+
targetElement,
|
|
70
|
+
placement,
|
|
71
|
+
noArrow,
|
|
72
|
+
useTargetWidth,
|
|
73
|
+
closeOnOutsideClick,
|
|
74
|
+
closeOnAnyClick: handler === 'hover' || handler === 'hoverStay',
|
|
75
|
+
});
|
|
76
|
+
}, delay || 0);
|
|
68
77
|
}
|
|
69
78
|
};
|
|
70
79
|
|
|
71
80
|
const _removePopover = () => {
|
|
81
|
+
cancelTimeout();
|
|
72
82
|
removePopover?.(current);
|
|
73
83
|
};
|
|
74
84
|
|
|
85
|
+
const cancelTimeout = () => {
|
|
86
|
+
clearTimeout(timeout);
|
|
87
|
+
timeout = null;
|
|
88
|
+
};
|
|
89
|
+
|
|
75
90
|
useUpdateEffect(() => {
|
|
76
91
|
if (show) {
|
|
77
92
|
updatePopover?.(current, {
|
|
@@ -100,16 +115,30 @@ const usePopover = ({
|
|
|
100
115
|
if (endEvent) {
|
|
101
116
|
targetElement.addEventListener(endEvent, _removePopover);
|
|
102
117
|
}
|
|
118
|
+
|
|
119
|
+
if (handler === 'hoverStay') {
|
|
120
|
+
targetElement.addEventListener('mouseleave', cancelTimeout);
|
|
121
|
+
}
|
|
103
122
|
}
|
|
104
123
|
|
|
105
124
|
return () => {
|
|
106
125
|
if (targetElement && content) {
|
|
126
|
+
cancelTimeout();
|
|
107
127
|
targetElement.removeEventListener(startEvent, _addPopover);
|
|
128
|
+
|
|
108
129
|
if (endEvent) {
|
|
109
130
|
targetElement.removeEventListener(endEvent, _removePopover);
|
|
110
131
|
}
|
|
132
|
+
|
|
133
|
+
if (handler === 'hoverStay') {
|
|
134
|
+
targetElement.removeEventListener('mouseleave', cancelTimeout);
|
|
135
|
+
}
|
|
111
136
|
}
|
|
112
137
|
};
|
|
138
|
+
}, [targetElement, content, current, currentPopover]);
|
|
139
|
+
|
|
140
|
+
useUnmount(() => {
|
|
141
|
+
cancelTimeout();
|
|
113
142
|
});
|
|
114
143
|
|
|
115
144
|
return current;
|
|
@@ -24,7 +24,7 @@ const ClickButton = ({ content, placement }: any) => {
|
|
|
24
24
|
content: content || 'I am a tooltip on click',
|
|
25
25
|
handler: 'click',
|
|
26
26
|
placement,
|
|
27
|
-
closeOnOutsideClick:
|
|
27
|
+
closeOnOutsideClick: true,
|
|
28
28
|
noArrow: true,
|
|
29
29
|
useTargetWidth: true,
|
|
30
30
|
});
|
|
@@ -32,6 +32,19 @@ const ClickButton = ({ content, placement }: any) => {
|
|
|
32
32
|
return <ReqoreButton ref={setRefElement}>Click popover</ReqoreButton>;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
+
const DelayButton = ({ content, placement }: any) => {
|
|
36
|
+
const [refElement, setRefElement] = useState(null);
|
|
37
|
+
|
|
38
|
+
usePopover({
|
|
39
|
+
targetElement: refElement,
|
|
40
|
+
content: content || 'I am a tooltip on click',
|
|
41
|
+
placement,
|
|
42
|
+
delay: 500,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return <ReqoreButton ref={setRefElement}>Tooltip with delay of 500ms</ReqoreButton>;
|
|
46
|
+
};
|
|
47
|
+
|
|
35
48
|
const Template: Story<IReqorePopoverProps> = (args: IReqorePopoverProps) => {
|
|
36
49
|
return (
|
|
37
50
|
<>
|
|
@@ -39,6 +52,8 @@ const Template: Story<IReqorePopoverProps> = (args: IReqorePopoverProps) => {
|
|
|
39
52
|
<br />
|
|
40
53
|
<ClickButton {...args} />
|
|
41
54
|
<br />
|
|
55
|
+
<DelayButton {...args} />
|
|
56
|
+
<br />
|
|
42
57
|
<ReqorePopover
|
|
43
58
|
component={ReqoreButton}
|
|
44
59
|
content='I am shown on mount'
|
package/tests.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":23,"numPassedTests":90,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":23,"numTotalTests":90,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1664261648643,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Table /> properly","location":null,"status":"passed","title":"Renders basic <Table /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with grouped columns properly","location":null,"status":"passed","title":"Renders <Table /> with grouped columns properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with custom content","location":null,"status":"passed","title":"Renders <Table /> with custom content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with predefined content","location":null,"status":"passed","title":"Renders <Table /> with predefined content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Sorting on <Table /> works properly","location":null,"status":"passed","title":"Sorting on <Table /> works properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> can be selected","location":null,"status":"passed","title":"Rows on <Table /> can be selected"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> cannot be selected if _selectId is missing","location":null,"status":"passed","title":"Rows on <Table /> cannot be selected if _selectId is missing"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> are all selected/deselected when clicking on header","location":null,"status":"passed","title":"Rows on <Table /> are all selected/deselected when clicking on header"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Cells on <Table /> are interactive","location":null,"status":"passed","title":"Cells on <Table /> are interactive"}],"endTime":1664261664351,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/table.test.tsx","startTime":1664261649249,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders full <Tabs /> properly","location":null,"status":"passed","title":"Renders full <Tabs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders shortened <Tabs /> properly","location":null,"status":"passed","title":"Renders shortened <Tabs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Default active tab can be specified","location":null,"status":"passed","title":"Default active tab can be specified"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Changes tab and runs callback","location":null,"status":"passed","title":"Changes tab and runs callback"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not change tab and run callback when disabled","location":null,"status":"passed","title":"Does not change tab and run callback when disabled"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Changes tab programatically and runs callback","location":null,"status":"passed","title":"Changes tab programatically and runs callback"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Closable tab can be closed if not disabled","location":null,"status":"passed","title":"Closable tab can be closed if not disabled"}],"endTime":1664261666064,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tabs.test.tsx","startTime":1664261664377,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders sidebar","location":null,"status":"passed","title":"Renders sidebar"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Sidebar can be collapsed","location":null,"status":"passed","title":"Sidebar can be collapsed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Can open submenu manually","location":null,"status":"passed","title":"Can open submenu manually"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Submenu opens automatically if path matches","location":null,"status":"passed","title":"Submenu opens automatically if path matches"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Bookmarks can be added and removed","location":null,"status":"passed","title":"Bookmarks can be added and removed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Bookmarks clicks are not propagated through","location":null,"status":"passed","title":"Bookmarks clicks are not propagated through"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders item as <p> element with onClick","location":null,"status":"passed","title":"Renders item as <p> element with onClick"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders floating sidebar with item as <p> element with onClick, closes on item click","location":null,"status":"passed","title":"Renders floating sidebar with item as <p> element with onClick, closes on item click"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders custom item at the top","location":null,"status":"passed","title":"Renders custom item at the top"}],"endTime":1664261667612,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/sidebar.test.tsx","startTime":1664261666085,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> properly","location":null,"status":"passed","title":"Renders <Dropdown /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders disabled <Dropdown /> when children are empty","location":null,"status":"passed","title":"Renders disabled <Dropdown /> when children are empty"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> with custom component and custom handler","location":null,"status":"passed","title":"Renders <Dropdown /> with custom component and custom handler"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> is opened by default","location":null,"status":"passed","title":"Renders <Dropdown /> is opened by default"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders filterable <Dropdown /> and filters items correctly","location":null,"status":"passed","title":"Renders filterable <Dropdown /> and filters items correctly"}],"endTime":1664261669490,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/dropdown.test.tsx","startTime":1664261667626,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Adds notifications and dismisses them automatically","location":null,"status":"passed","title":"Adds notifications and dismisses them automatically"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Adds a notification and updates it","location":null,"status":"passed","title":"Adds a notification and updates it"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a click event","location":null,"status":"passed","title":"Notification has a click event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a close event","location":null,"status":"passed","title":"Notification has a close event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a finish event","location":null,"status":"passed","title":"Notification has a finish event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Maximum of 5 notifications is shown at once","location":null,"status":"passed","title":"Maximum of 5 notifications is shown at once"}],"endTime":1664261670660,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/notifications.test.tsx","startTime":1664261669503,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> properly","location":null,"status":"passed","title":"Renders <Button /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with size properly","location":null,"status":"passed","title":"Renders <Button /> with size properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with icon properly","location":null,"status":"passed","title":"Renders <Button /> with icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with intent properly","location":null,"status":"passed","title":"Renders <Button /> with intent properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with right icon properly","location":null,"status":"passed","title":"Renders <Button /> with right icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with icon and right icon properly","location":null,"status":"passed","title":"Renders <Button /> with icon and right icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with onClick function","location":null,"status":"passed","title":"Renders <Button /> with onClick function"}],"endTime":1664261671845,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/button.test.tsx","startTime":1664261670707,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> properly","location":null,"status":"passed","title":"Renders <Tag /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> group properly","location":null,"status":"passed","title":"Renders <Tag /> group properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> without remove button if disabled","location":null,"status":"passed","title":"Renders <Tag /> without remove button if disabled"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Fires onClick and onRemoveClick <Tag /> events","location":null,"status":"passed","title":"Fires onClick and onRemoveClick <Tag /> events"}],"endTime":1664261672695,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tag.test.tsx","startTime":1664261671857,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Modal /> properly","location":null,"status":"passed","title":"Renders basic <Modal /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not renders <Modal /> if its not open","location":null,"status":"passed","title":"Does not renders <Modal /> if its not open"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Modal /> with custom dimensions","location":null,"status":"passed","title":"Renders <Modal /> with custom dimensions"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders confirmation <Modal /> ","location":null,"status":"passed","title":"Renders confirmation <Modal /> "}],"endTime":1664261673753,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/modal.test.tsx","startTime":1664261672706,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not render <Drawer /> if not open","location":null,"status":"passed","title":"Does not render <Drawer /> if not open"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders opened <Drawer /> properly","location":null,"status":"passed","title":"Renders opened <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders hidable <Drawer /> properly","location":null,"status":"passed","title":"Renders hidable <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders closable <Drawer /> properly","location":null,"status":"passed","title":"Renders closable <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Drawer /> with interactive backdrop","location":null,"status":"passed","title":"Renders <Drawer /> with interactive backdrop"}],"endTime":1664261674680,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/drawer.test.tsx","startTime":1664261673769,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> properly","location":null,"status":"passed","title":"Renders basic <Panel /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> with title properly","location":null,"status":"passed","title":"Renders basic <Panel /> with title properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> that is collapsed by default and can be expanded","location":null,"status":"passed","title":"Renders basic <Panel /> that is collapsed by default and can be expanded"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders closable <Panel /> properly","location":null,"status":"passed","title":"Renders closable <Panel /> properly"}],"endTime":1664261675412,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/panel.test.tsx","startTime":1664261674692,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Tree /> properly","location":null,"status":"passed","title":"Renders basic <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows types for <Tree /> properly","location":null,"status":"passed","title":"Shows types for <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows textarea for <Tree /> properly","location":null,"status":"passed","title":"Shows textarea for <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Tree /> items can be expanded and collapsed","location":null,"status":"passed","title":"<Tree /> items can be expanded and collapsed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tree /> with clickable items","location":null,"status":"passed","title":"Renders <Tree /> with clickable items"}],"endTime":1664261677048,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tree.test.tsx","startTime":1664261675423,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows popover on hover, hides on leave","location":null,"status":"passed","title":"Shows popover on hover, hides on leave"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows popover on click, hides only on click away","location":null,"status":"passed","title":"Shows popover on click, hides only on click away"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows custom content","location":null,"status":"passed","title":"Shows custom content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs callback function","location":null,"status":"passed","title":"Runs callback function"}],"endTime":1664261677814,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/popover.test.tsx","startTime":1664261677060,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Menu /> properly","location":null,"status":"passed","title":"Renders <Menu /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Menu /> item can be clicked","location":null,"status":"passed","title":"<Menu /> item can be clicked"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Menu /> item has right clickable button","location":null,"status":"passed","title":"<Menu /> item has right clickable button"}],"endTime":1664261678556,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/menu.test.tsx","startTime":1664261677826,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Input /> properly","location":null,"status":"passed","title":"Renders <Input /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Input /> with clear button properly","location":null,"status":"passed","title":"Renders <Input /> with clear button properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Disabled <Input /> cannot be cleared","location":null,"status":"passed","title":"Disabled <Input /> cannot be cleared"}],"endTime":1664261679356,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/input.test.tsx","startTime":1664261678568,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders full <Breadcrumbs /> properly","location":null,"status":"passed","title":"Renders full <Breadcrumbs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders shortened <Breadcrumbs /> properly","location":null,"status":"passed","title":"Renders shortened <Breadcrumbs /> properly"}],"endTime":1664261680021,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/breadcrumbs.test.tsx","startTime":1664261679369,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TextArea /> properly","location":null,"status":"passed","title":"Renders <TextArea /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TextArea /> with clear button properly","location":null,"status":"passed","title":"Renders <TextArea /> with clear button properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Disabled <TextArea /> cannot be cleared","location":null,"status":"passed","title":"Disabled <TextArea /> cannot be cleared"}],"endTime":1664261680711,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/textarea.test.tsx","startTime":1664261680042,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Message /> properly","location":null,"status":"passed","title":"Renders <Message /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs onFinish on message after duration","location":null,"status":"passed","title":"Runs onFinish on message after duration"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs onClose when closed","location":null,"status":"passed","title":"Runs onClose when closed"}],"endTime":1664261681388,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/messages.test.tsx","startTime":1664261680732,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Checkbox /> properly","location":null,"status":"passed","title":"Renders <Checkbox /> properly"}],"endTime":1664261681984,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/radiogroup.test.tsx","startTime":1664261681399,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders Layout properly","location":null,"status":"passed","title":"Renders Layout properly"}],"endTime":1664261682603,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/layout.test.tsx","startTime":1664261681995,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Icon /> properly","location":null,"status":"passed","title":"Renders <Icon /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders empty <Icon /> if icon does not exist","location":null,"status":"passed","title":"Renders empty <Icon /> if icon does not exist"}],"endTime":1664261684167,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/icon.test.tsx","startTime":1664261682663,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders Navbar properly","location":null,"status":"passed","title":"Renders Navbar properly"}],"endTime":1664261684761,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/navbar.test.tsx","startTime":1664261684179,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Checkbox /> properly","location":null,"status":"passed","title":"Renders <Checkbox /> properly"}],"endTime":1664261685397,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/checkbox.test.tsx","startTime":1664261684773,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TimeAgo /> data properly","location":null,"status":"passed","title":"Renders <TimeAgo /> data properly"}],"endTime":1664261685949,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/timeAgo.test.tsx","startTime":1664261685419,"status":"passed","summary":""}],"wasInterrupted":false}
|
|
1
|
+
{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":23,"numPassedTests":94,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":23,"numTotalTests":94,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1664430402122,"success":true,"testResults":[{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Table /> properly","location":null,"status":"passed","title":"Renders basic <Table /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with grouped columns properly","location":null,"status":"passed","title":"Renders <Table /> with grouped columns properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with custom content","location":null,"status":"passed","title":"Renders <Table /> with custom content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Table /> with predefined content","location":null,"status":"passed","title":"Renders <Table /> with predefined content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Sorting on <Table /> works properly","location":null,"status":"passed","title":"Sorting on <Table /> works properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> can be selected","location":null,"status":"passed","title":"Rows on <Table /> can be selected"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> cannot be selected if _selectId is missing","location":null,"status":"passed","title":"Rows on <Table /> cannot be selected if _selectId is missing"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Rows on <Table /> are all selected/deselected when clicking on header","location":null,"status":"passed","title":"Rows on <Table /> are all selected/deselected when clicking on header"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Cells on <Table /> are interactive","location":null,"status":"passed","title":"Cells on <Table /> are interactive"}],"endTime":1664430417852,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/table.test.tsx","startTime":1664430402732,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders full <Tabs /> properly","location":null,"status":"passed","title":"Renders full <Tabs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders shortened <Tabs /> properly","location":null,"status":"passed","title":"Renders shortened <Tabs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Default active tab can be specified","location":null,"status":"passed","title":"Default active tab can be specified"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Changes tab and runs callback","location":null,"status":"passed","title":"Changes tab and runs callback"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not change tab and run callback when disabled","location":null,"status":"passed","title":"Does not change tab and run callback when disabled"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Changes tab programatically and runs callback","location":null,"status":"passed","title":"Changes tab programatically and runs callback"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Closable tab can be closed if not disabled","location":null,"status":"passed","title":"Closable tab can be closed if not disabled"}],"endTime":1664430419605,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tabs.test.tsx","startTime":1664430417884,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders sidebar","location":null,"status":"passed","title":"Renders sidebar"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Sidebar can be collapsed","location":null,"status":"passed","title":"Sidebar can be collapsed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Can open submenu manually","location":null,"status":"passed","title":"Can open submenu manually"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Submenu opens automatically if path matches","location":null,"status":"passed","title":"Submenu opens automatically if path matches"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Bookmarks can be added and removed","location":null,"status":"passed","title":"Bookmarks can be added and removed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Bookmarks clicks are not propagated through","location":null,"status":"passed","title":"Bookmarks clicks are not propagated through"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders item as <p> element with onClick","location":null,"status":"passed","title":"Renders item as <p> element with onClick"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders floating sidebar with item as <p> element with onClick, closes on item click","location":null,"status":"passed","title":"Renders floating sidebar with item as <p> element with onClick, closes on item click"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders custom item at the top","location":null,"status":"passed","title":"Renders custom item at the top"}],"endTime":1664430421188,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/sidebar.test.tsx","startTime":1664430419636,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> properly","location":null,"status":"passed","title":"Renders <Dropdown /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders disabled <Dropdown /> when children are empty","location":null,"status":"passed","title":"Renders disabled <Dropdown /> when children are empty"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> with custom component and custom handler","location":null,"status":"passed","title":"Renders <Dropdown /> with custom component and custom handler"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Dropdown /> is opened by default","location":null,"status":"passed","title":"Renders <Dropdown /> is opened by default"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders filterable <Dropdown /> and filters items correctly","location":null,"status":"passed","title":"Renders filterable <Dropdown /> and filters items correctly"}],"endTime":1664430423056,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/dropdown.test.tsx","startTime":1664430421203,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows popover on hover, hides on leave","location":null,"status":"passed","title":"Shows popover on hover, hides on leave"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows popover on click, hides only on click away","location":null,"status":"passed","title":"Shows popover on click, hides only on click away"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows custom content","location":null,"status":"passed","title":"Shows custom content"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs callback function","location":null,"status":"passed","title":"Runs callback function"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows the popover after a delay","location":null,"status":"passed","title":"Shows the popover after a delay"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not show the popover with delay if time not reached","location":null,"status":"passed","title":"Does not show the popover with delay if time not reached"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows the hoverStay popover after a delay and stays, ","location":null,"status":"passed","title":"Shows the hoverStay popover after a delay and stays, "},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows the hoverStay popover after a delay and stays, ","location":null,"status":"passed","title":"Shows the hoverStay popover after a delay and stays, "}],"endTime":1664430424144,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/popover.test.tsx","startTime":1664430423069,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Adds notifications and dismisses them automatically","location":null,"status":"passed","title":"Adds notifications and dismisses them automatically"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Adds a notification and updates it","location":null,"status":"passed","title":"Adds a notification and updates it"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a click event","location":null,"status":"passed","title":"Notification has a click event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a close event","location":null,"status":"passed","title":"Notification has a close event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Notification has a finish event","location":null,"status":"passed","title":"Notification has a finish event"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Maximum of 5 notifications is shown at once","location":null,"status":"passed","title":"Maximum of 5 notifications is shown at once"}],"endTime":1664430425299,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/notifications.test.tsx","startTime":1664430424165,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> properly","location":null,"status":"passed","title":"Renders <Button /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with size properly","location":null,"status":"passed","title":"Renders <Button /> with size properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with icon properly","location":null,"status":"passed","title":"Renders <Button /> with icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with intent properly","location":null,"status":"passed","title":"Renders <Button /> with intent properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with right icon properly","location":null,"status":"passed","title":"Renders <Button /> with right icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with icon and right icon properly","location":null,"status":"passed","title":"Renders <Button /> with icon and right icon properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Button /> with onClick function","location":null,"status":"passed","title":"Renders <Button /> with onClick function"}],"endTime":1664430426463,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/button.test.tsx","startTime":1664430425321,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> properly","location":null,"status":"passed","title":"Renders <Tag /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> group properly","location":null,"status":"passed","title":"Renders <Tag /> group properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tag /> without remove button if disabled","location":null,"status":"passed","title":"Renders <Tag /> without remove button if disabled"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Fires onClick and onRemoveClick <Tag /> events","location":null,"status":"passed","title":"Fires onClick and onRemoveClick <Tag /> events"}],"endTime":1664430427270,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tag.test.tsx","startTime":1664430426475,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Modal /> properly","location":null,"status":"passed","title":"Renders basic <Modal /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not renders <Modal /> if its not open","location":null,"status":"passed","title":"Does not renders <Modal /> if its not open"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Modal /> with custom dimensions","location":null,"status":"passed","title":"Renders <Modal /> with custom dimensions"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders confirmation <Modal /> ","location":null,"status":"passed","title":"Renders confirmation <Modal /> "}],"endTime":1664430428421,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/modal.test.tsx","startTime":1664430427281,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Does not render <Drawer /> if not open","location":null,"status":"passed","title":"Does not render <Drawer /> if not open"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders opened <Drawer /> properly","location":null,"status":"passed","title":"Renders opened <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders hidable <Drawer /> properly","location":null,"status":"passed","title":"Renders hidable <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders closable <Drawer /> properly","location":null,"status":"passed","title":"Renders closable <Drawer /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Drawer /> with interactive backdrop","location":null,"status":"passed","title":"Renders <Drawer /> with interactive backdrop"}],"endTime":1664430429365,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/drawer.test.tsx","startTime":1664430428439,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> properly","location":null,"status":"passed","title":"Renders basic <Panel /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> with title properly","location":null,"status":"passed","title":"Renders basic <Panel /> with title properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Panel /> that is collapsed by default and can be expanded","location":null,"status":"passed","title":"Renders basic <Panel /> that is collapsed by default and can be expanded"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders closable <Panel /> properly","location":null,"status":"passed","title":"Renders closable <Panel /> properly"}],"endTime":1664430430092,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/panel.test.tsx","startTime":1664430429379,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders basic <Tree /> properly","location":null,"status":"passed","title":"Renders basic <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows types for <Tree /> properly","location":null,"status":"passed","title":"Shows types for <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Shows textarea for <Tree /> properly","location":null,"status":"passed","title":"Shows textarea for <Tree /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Tree /> items can be expanded and collapsed","location":null,"status":"passed","title":"<Tree /> items can be expanded and collapsed"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Tree /> with clickable items","location":null,"status":"passed","title":"Renders <Tree /> with clickable items"}],"endTime":1664430431726,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/tree.test.tsx","startTime":1664430430103,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Menu /> properly","location":null,"status":"passed","title":"Renders <Menu /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Menu /> item can be clicked","location":null,"status":"passed","title":"<Menu /> item can be clicked"},{"ancestorTitles":[],"failureMessages":[],"fullName":"<Menu /> item has right clickable button","location":null,"status":"passed","title":"<Menu /> item has right clickable button"}],"endTime":1664430432505,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/menu.test.tsx","startTime":1664430431749,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Input /> properly","location":null,"status":"passed","title":"Renders <Input /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Input /> with clear button properly","location":null,"status":"passed","title":"Renders <Input /> with clear button properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Disabled <Input /> cannot be cleared","location":null,"status":"passed","title":"Disabled <Input /> cannot be cleared"}],"endTime":1664430433376,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/input.test.tsx","startTime":1664430432516,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders full <Breadcrumbs /> properly","location":null,"status":"passed","title":"Renders full <Breadcrumbs /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders shortened <Breadcrumbs /> properly","location":null,"status":"passed","title":"Renders shortened <Breadcrumbs /> properly"}],"endTime":1664430434019,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/breadcrumbs.test.tsx","startTime":1664430433388,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TextArea /> properly","location":null,"status":"passed","title":"Renders <TextArea /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TextArea /> with clear button properly","location":null,"status":"passed","title":"Renders <TextArea /> with clear button properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Disabled <TextArea /> cannot be cleared","location":null,"status":"passed","title":"Disabled <TextArea /> cannot be cleared"}],"endTime":1664430434711,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/textarea.test.tsx","startTime":1664430434031,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Message /> properly","location":null,"status":"passed","title":"Renders <Message /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs onFinish on message after duration","location":null,"status":"passed","title":"Runs onFinish on message after duration"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Runs onClose when closed","location":null,"status":"passed","title":"Runs onClose when closed"}],"endTime":1664430435358,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/messages.test.tsx","startTime":1664430434722,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Checkbox /> properly","location":null,"status":"passed","title":"Renders <Checkbox /> properly"}],"endTime":1664430435907,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/radiogroup.test.tsx","startTime":1664430435369,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders Layout properly","location":null,"status":"passed","title":"Renders Layout properly"}],"endTime":1664430436531,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/layout.test.tsx","startTime":1664430435919,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Icon /> properly","location":null,"status":"passed","title":"Renders <Icon /> properly"},{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders empty <Icon /> if icon does not exist","location":null,"status":"passed","title":"Renders empty <Icon /> if icon does not exist"}],"endTime":1664430438030,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/icon.test.tsx","startTime":1664430436542,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders Navbar properly","location":null,"status":"passed","title":"Renders Navbar properly"}],"endTime":1664430438685,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/navbar.test.tsx","startTime":1664430438046,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <Checkbox /> properly","location":null,"status":"passed","title":"Renders <Checkbox /> properly"}],"endTime":1664430439350,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/checkbox.test.tsx","startTime":1664430438700,"status":"passed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"Renders <TimeAgo /> data properly","location":null,"status":"passed","title":"Renders <TimeAgo /> data properly"}],"endTime":1664430439906,"message":"","name":"/home/runner/work/reqore/reqore/__tests__/timeAgo.test.tsx","startTime":1664430439372,"status":"passed","summary":""}],"wasInterrupted":false}
|