@etsoo/react 1.5.49 → 1.5.50
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.
|
@@ -78,6 +78,33 @@ test('Confirm tests', async () => {
|
|
|
78
78
|
jest.runOnlyPendingTimers();
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
+
test('Confirm tests without cancel button', async () => {
|
|
82
|
+
// Click
|
|
83
|
+
const handleClick = jest.fn();
|
|
84
|
+
|
|
85
|
+
act(() => {
|
|
86
|
+
// Add the notification
|
|
87
|
+
notifier.confirm('Confirm message', undefined, handleClick, {
|
|
88
|
+
cancelButton: false
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Button
|
|
93
|
+
const button = root.getElementsByTagName('button');
|
|
94
|
+
|
|
95
|
+
expect(button.length).toBe(1);
|
|
96
|
+
expect(button[0].innerHTML).toContain('OK');
|
|
97
|
+
|
|
98
|
+
await act(async () => {
|
|
99
|
+
button[0].click();
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
expect(handleClick).toBeCalled();
|
|
103
|
+
|
|
104
|
+
// Fast forward
|
|
105
|
+
jest.runOnlyPendingTimers();
|
|
106
|
+
});
|
|
107
|
+
|
|
81
108
|
test('Prompt tests', async () => {
|
|
82
109
|
// Click
|
|
83
110
|
const handleClick = jest.fn((result: boolean) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.50",
|
|
4
4
|
"description": "TypeScript ReactJs framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@emotion/react": "^11.9.3",
|
|
51
51
|
"@emotion/style": "^0.8.0",
|
|
52
52
|
"@emotion/styled": "^11.9.3",
|
|
53
|
-
"@etsoo/appscript": "^1.2.
|
|
53
|
+
"@etsoo/appscript": "^1.2.63",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.4",
|
|
55
55
|
"@etsoo/shared": "^1.1.40",
|
|
56
56
|
"@mui/icons-material": "^5.8.4",
|