@tamagui/react-native-web-lite 1.138.2 → 1.138.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/react-native-web-lite",
|
|
3
|
-
"version": "1.138.
|
|
3
|
+
"version": "1.138.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React Native for Web",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -54,16 +54,16 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@tamagui/normalize-css-color": "1.138.
|
|
58
|
-
"@tamagui/react-native-use-pressable": "1.138.
|
|
59
|
-
"@tamagui/react-native-use-responder-events": "1.138.
|
|
60
|
-
"@tamagui/react-native-web-internals": "1.138.
|
|
61
|
-
"@tamagui/web": "1.138.
|
|
57
|
+
"@tamagui/normalize-css-color": "1.138.4",
|
|
58
|
+
"@tamagui/react-native-use-pressable": "1.138.4",
|
|
59
|
+
"@tamagui/react-native-use-responder-events": "1.138.4",
|
|
60
|
+
"@tamagui/react-native-web-internals": "1.138.4",
|
|
61
|
+
"@tamagui/web": "1.138.4",
|
|
62
62
|
"invariant": "^2.2.4",
|
|
63
63
|
"memoize-one": "^6.0.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@tamagui/build": "1.138.
|
|
66
|
+
"@tamagui/build": "1.138.4",
|
|
67
67
|
"react": "*",
|
|
68
68
|
"react-dom": "*"
|
|
69
69
|
},
|
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
};
|
|
12
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
13
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
14
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
15
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
16
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
17
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
18
|
-
mod
|
|
19
|
-
));
|
|
20
|
-
var import_react = require("@testing-library/react"), import_dom_event_testing_library = require("dom-event-testing-library"), import_react2 = __toESM(require("react")), import_test_utils = require("react-dom/test-utils"), import__ = __toESM(require("..")), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
-
function findInput(container) {
|
|
22
|
-
return container.querySelector("input");
|
|
23
|
-
}
|
|
24
|
-
function findTextArea(container) {
|
|
25
|
-
return container.querySelector("textarea");
|
|
26
|
-
}
|
|
27
|
-
const testIfDocumentIsFocused = (message, fn) => {
|
|
28
|
-
document.hasFocus && document.hasFocus() ? test(message, fn) : test.skip(`${message} \u2013 document is not focused`, () => {
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
function createEvent(type, data = {}) {
|
|
32
|
-
const event = document.createEvent("CustomEvent");
|
|
33
|
-
return event.initCustomEvent(type, !0, !0), data != null && Object.keys(data).forEach((key) => {
|
|
34
|
-
const value = data[key];
|
|
35
|
-
key === "timeStamp" && !value || Object.defineProperty(event, key, { value });
|
|
36
|
-
}), event;
|
|
37
|
-
}
|
|
38
|
-
function createKeyboardEvent(type, {
|
|
39
|
-
altKey = !1,
|
|
40
|
-
ctrlKey = !1,
|
|
41
|
-
isComposing = !1,
|
|
42
|
-
key = "",
|
|
43
|
-
keyCode = 0,
|
|
44
|
-
metaKey = !1,
|
|
45
|
-
preventDefault = () => {
|
|
46
|
-
},
|
|
47
|
-
shiftKey = !1
|
|
48
|
-
} = {}) {
|
|
49
|
-
return createEvent(type, {
|
|
50
|
-
altKey,
|
|
51
|
-
ctrlKey,
|
|
52
|
-
isComposing,
|
|
53
|
-
key,
|
|
54
|
-
keyCode,
|
|
55
|
-
metaKey,
|
|
56
|
-
preventDefault,
|
|
57
|
-
shiftKey
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function keydown(payload) {
|
|
61
|
-
return createKeyboardEvent("keydown", payload);
|
|
62
|
-
}
|
|
63
|
-
describe("components/TextInput", () => {
|
|
64
|
-
describe('prop "autoComplete"', () => {
|
|
65
|
-
test('value "on"', () => {
|
|
66
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {})), input = findInput(container);
|
|
67
|
-
expect(input.getAttribute("autoComplete")).toEqual("on");
|
|
68
|
-
}), test('value "off"', () => {
|
|
69
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { autoComplete: "off" })), input = findInput(container);
|
|
70
|
-
expect(input.getAttribute("autoComplete")).toEqual("off");
|
|
71
|
-
}), test("autoCompleteType fallback", () => {
|
|
72
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { autoCompleteType: "off" })), input = findInput(container);
|
|
73
|
-
expect(input.getAttribute("autoComplete")).toEqual("off");
|
|
74
|
-
});
|
|
75
|
-
}), describe('prop "autoFocus"', () => {
|
|
76
|
-
test('value "false"', () => {
|
|
77
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {})), input = findInput(container);
|
|
78
|
-
expect(document.activeElement).not.toBe(input);
|
|
79
|
-
}), test('value "true"', () => {
|
|
80
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { autoFocus: !0 })), input = findInput(container);
|
|
81
|
-
expect(document.activeElement).toBe(input);
|
|
82
|
-
});
|
|
83
|
-
}), describe('prop "clearTextOnFocus"', () => {
|
|
84
|
-
const defaultValue = "defaultValue";
|
|
85
|
-
testIfDocumentIsFocused('value "false"', () => {
|
|
86
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { defaultValue })), input = findInput(container);
|
|
87
|
-
input.focus(), expect(input.node.value).toEqual(defaultValue);
|
|
88
|
-
}), testIfDocumentIsFocused('value "true"', () => {
|
|
89
|
-
const { container } = (0, import_react.render)(
|
|
90
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { clearTextOnFocus: !0, defaultValue })
|
|
91
|
-
), input = findInput(container);
|
|
92
|
-
input.focus(), expect(input.node.value).toEqual("");
|
|
93
|
-
});
|
|
94
|
-
}), test('prop "defaultValue"', () => {
|
|
95
|
-
const defaultValue = "defaultValue", { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { defaultValue })), input = findInput(container);
|
|
96
|
-
expect(input.value).toEqual(defaultValue);
|
|
97
|
-
}), describe('prop "disabled"', () => {
|
|
98
|
-
test('value "false"', () => {
|
|
99
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {})), input = findInput(container);
|
|
100
|
-
expect(input.disabled).toEqual(!1);
|
|
101
|
-
}), test('value "true"', () => {
|
|
102
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { disabled: !0 })), input = findInput(container);
|
|
103
|
-
expect(input.disabled).toEqual(!0);
|
|
104
|
-
});
|
|
105
|
-
}), describe('prop "editable"', () => {
|
|
106
|
-
test('value "true"', () => {
|
|
107
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {})), input = findInput(container);
|
|
108
|
-
expect(input.readOnly).toEqual(!1);
|
|
109
|
-
}), test('value "false"', () => {
|
|
110
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { editable: !1 })), input = findInput(container);
|
|
111
|
-
expect(input.readOnly).toEqual(!0);
|
|
112
|
-
});
|
|
113
|
-
}), describe('prop "keyboardType"', () => {
|
|
114
|
-
test("default value", () => {
|
|
115
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { keyboardType: "default" })), input = findInput(container);
|
|
116
|
-
expect(input.type).toEqual("text");
|
|
117
|
-
}), test('value "email-address"', () => {
|
|
118
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { keyboardType: "email-address" })), input = findInput(container);
|
|
119
|
-
expect(input.type).toEqual("email");
|
|
120
|
-
}), test('value "decimal-pad"', () => {
|
|
121
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { keyboardType: "decimal-pad" })), input = findInput(container);
|
|
122
|
-
expect(input.inputMode).toEqual("decimal");
|
|
123
|
-
}), test('value "number-pad"', () => {
|
|
124
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { keyboardType: "number-pad" })), input = findInput(container);
|
|
125
|
-
expect(input.inputMode).toEqual("numeric");
|
|
126
|
-
}), test('value "numeric"', () => {
|
|
127
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { keyboardType: "numeric" })), input = findInput(container);
|
|
128
|
-
expect(input.inputMode).toEqual("numeric");
|
|
129
|
-
}), test('value "phone-pad"', () => {
|
|
130
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { keyboardType: "phone-pad" })), input = findInput(container);
|
|
131
|
-
expect(input.type).toEqual("tel");
|
|
132
|
-
}), test('value "url"', () => {
|
|
133
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { keyboardType: "url" })), input = findInput(container);
|
|
134
|
-
expect(input.type).toEqual("url");
|
|
135
|
-
});
|
|
136
|
-
}), test('prop "maxLength"', () => {
|
|
137
|
-
let { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {})), input = findInput(container);
|
|
138
|
-
expect(input.getAttribute("maxLength")).toEqual(null), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { maxLength: 10 })), input = findInput(container), expect(input.getAttribute("maxLength")).toEqual("10");
|
|
139
|
-
}), describe('prop "multiline"', () => {
|
|
140
|
-
test('value "false"', () => {
|
|
141
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {})), input = findInput(container);
|
|
142
|
-
expect(input).toBeDefined();
|
|
143
|
-
}), test('value "true"', () => {
|
|
144
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { multiline: !0 })), textarea = findTextArea(container);
|
|
145
|
-
expect(textarea).toBeDefined();
|
|
146
|
-
});
|
|
147
|
-
}), describe('prop "numberOfLines"', () => {
|
|
148
|
-
test('without "multiline"', () => {
|
|
149
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { numberOfLines: 2 })), input = findInput(container), textarea = findTextArea(container);
|
|
150
|
-
expect(input).toBeDefined(), expect(textarea).toBeNull();
|
|
151
|
-
}), test('with "multiline"', () => {
|
|
152
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { multiline: !0, numberOfLines: 3 })), textarea = findTextArea(container);
|
|
153
|
-
expect(textarea.getAttribute("rows")).toEqual("3");
|
|
154
|
-
});
|
|
155
|
-
}), test('prop "onBlur"', () => {
|
|
156
|
-
const onBlur = jest.fn(), ref = import_react2.default.createRef();
|
|
157
|
-
(0, import_test_utils.act)(() => {
|
|
158
|
-
(0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onBlur, ref }));
|
|
159
|
-
});
|
|
160
|
-
const target = (0, import_dom_event_testing_library.createEventTarget)(ref.current), body = (0, import_dom_event_testing_library.createEventTarget)(document.body);
|
|
161
|
-
(0, import_test_utils.act)(() => {
|
|
162
|
-
target.focus(), body.focus({ relatedTarget: target.node });
|
|
163
|
-
}), expect(onBlur).toHaveBeenCalledTimes(1), expect(import__.default.State.currentlyFocusedField()).toBe(null);
|
|
164
|
-
}), test.skip('prop "onChange"', () => {
|
|
165
|
-
const onChange = jest.fn(), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onChange }));
|
|
166
|
-
findInput(container).dispatchEvent(new window.Event("change", { bubbles: !0 })), expect(onChange).toHaveBeenCalledTimes(1);
|
|
167
|
-
}), test.skip('prop "onChangeText"', () => {
|
|
168
|
-
const onChangeText = jest.fn(), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onChangeText })), input = findInput(container);
|
|
169
|
-
input.dispatchEvent(keydown({ key: "a" })), input.dispatchEvent(new window.Event("change", { bubbles: !0 })), expect(onChangeText).toHaveBeenCalledTimes(1), expect(onChangeText).toBeCalledWith("a");
|
|
170
|
-
}), test('prop "onFocus"', () => {
|
|
171
|
-
const onFocus = jest.fn(), ref = import_react2.default.createRef();
|
|
172
|
-
(0, import_test_utils.act)(() => {
|
|
173
|
-
(0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onFocus, ref }));
|
|
174
|
-
});
|
|
175
|
-
const target = (0, import_dom_event_testing_library.createEventTarget)(ref.current);
|
|
176
|
-
(0, import_test_utils.act)(() => {
|
|
177
|
-
target.focus();
|
|
178
|
-
}), expect(onFocus).toHaveBeenCalledTimes(1), target.node.focus(), expect(import__.default.State.currentlyFocusedField()).toBe(target.node);
|
|
179
|
-
}), describe('prop "onKeyPress"', () => {
|
|
180
|
-
test("arrow key", () => {
|
|
181
|
-
const onKeyPress = jest.fn((e) => {
|
|
182
|
-
e.persist();
|
|
183
|
-
}), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onKeyPress }));
|
|
184
|
-
findInput(container).dispatchEvent(keydown({ key: "ArrowLeft" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
185
|
-
expect.objectContaining({
|
|
186
|
-
nativeEvent: expect.objectContaining({
|
|
187
|
-
altKey: !1,
|
|
188
|
-
ctrlKey: !1,
|
|
189
|
-
key: "ArrowLeft",
|
|
190
|
-
metaKey: !1,
|
|
191
|
-
shiftKey: !1,
|
|
192
|
-
target: expect.anything()
|
|
193
|
-
})
|
|
194
|
-
})
|
|
195
|
-
);
|
|
196
|
-
}), test("backspace key", () => {
|
|
197
|
-
const onKeyPress = jest.fn((e) => {
|
|
198
|
-
e.persist();
|
|
199
|
-
}), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onKeyPress }));
|
|
200
|
-
findInput(container).dispatchEvent(keydown({ key: "Backspace" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
201
|
-
expect.objectContaining({
|
|
202
|
-
nativeEvent: expect.objectContaining({
|
|
203
|
-
altKey: !1,
|
|
204
|
-
ctrlKey: !1,
|
|
205
|
-
key: "Backspace",
|
|
206
|
-
metaKey: !1,
|
|
207
|
-
shiftKey: !1,
|
|
208
|
-
target: expect.anything()
|
|
209
|
-
})
|
|
210
|
-
})
|
|
211
|
-
);
|
|
212
|
-
}), test("enter key", () => {
|
|
213
|
-
const onKeyPress = jest.fn((e) => {
|
|
214
|
-
e.persist();
|
|
215
|
-
}), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onKeyPress }));
|
|
216
|
-
findInput(container).dispatchEvent(keydown({ key: "Enter" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
217
|
-
expect.objectContaining({
|
|
218
|
-
nativeEvent: expect.objectContaining({
|
|
219
|
-
altKey: !1,
|
|
220
|
-
ctrlKey: !1,
|
|
221
|
-
key: "Enter",
|
|
222
|
-
metaKey: !1,
|
|
223
|
-
shiftKey: !1,
|
|
224
|
-
target: expect.anything()
|
|
225
|
-
})
|
|
226
|
-
})
|
|
227
|
-
);
|
|
228
|
-
}), test("escape key", () => {
|
|
229
|
-
const onKeyPress = jest.fn((e) => {
|
|
230
|
-
e.persist();
|
|
231
|
-
}), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onKeyPress }));
|
|
232
|
-
findInput(container).dispatchEvent(keydown({ key: "Escape" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
233
|
-
expect.objectContaining({
|
|
234
|
-
nativeEvent: expect.objectContaining({
|
|
235
|
-
altKey: !1,
|
|
236
|
-
ctrlKey: !1,
|
|
237
|
-
key: "Escape",
|
|
238
|
-
metaKey: !1,
|
|
239
|
-
shiftKey: !1,
|
|
240
|
-
target: expect.anything()
|
|
241
|
-
})
|
|
242
|
-
})
|
|
243
|
-
);
|
|
244
|
-
}), test("space key", () => {
|
|
245
|
-
const onKeyPress = jest.fn((e) => {
|
|
246
|
-
e.persist();
|
|
247
|
-
}), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onKeyPress }));
|
|
248
|
-
findInput(container).dispatchEvent(keydown({ key: " " })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
249
|
-
expect.objectContaining({
|
|
250
|
-
nativeEvent: expect.objectContaining({
|
|
251
|
-
altKey: !1,
|
|
252
|
-
ctrlKey: !1,
|
|
253
|
-
key: " ",
|
|
254
|
-
metaKey: !1,
|
|
255
|
-
shiftKey: !1,
|
|
256
|
-
target: expect.anything()
|
|
257
|
-
})
|
|
258
|
-
})
|
|
259
|
-
);
|
|
260
|
-
}), test("tab key", () => {
|
|
261
|
-
const onKeyPress = jest.fn((e) => {
|
|
262
|
-
e.persist();
|
|
263
|
-
}), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onKeyPress }));
|
|
264
|
-
findInput(container).dispatchEvent(keydown({ key: "Tab" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
265
|
-
expect.objectContaining({
|
|
266
|
-
nativeEvent: expect.objectContaining({
|
|
267
|
-
altKey: !1,
|
|
268
|
-
ctrlKey: !1,
|
|
269
|
-
key: "Tab",
|
|
270
|
-
metaKey: !1,
|
|
271
|
-
shiftKey: !1,
|
|
272
|
-
target: expect.anything()
|
|
273
|
-
})
|
|
274
|
-
})
|
|
275
|
-
);
|
|
276
|
-
}), test("text key", () => {
|
|
277
|
-
const onKeyPress = jest.fn((e) => {
|
|
278
|
-
e.persist();
|
|
279
|
-
}), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onKeyPress }));
|
|
280
|
-
findInput(container).dispatchEvent(keydown({ key: "a" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
281
|
-
expect.objectContaining({
|
|
282
|
-
nativeEvent: expect.objectContaining({
|
|
283
|
-
altKey: !1,
|
|
284
|
-
ctrlKey: !1,
|
|
285
|
-
key: "a",
|
|
286
|
-
metaKey: !1,
|
|
287
|
-
shiftKey: !1,
|
|
288
|
-
target: expect.anything()
|
|
289
|
-
})
|
|
290
|
-
})
|
|
291
|
-
);
|
|
292
|
-
}), test("modifier keys are included", () => {
|
|
293
|
-
const onKeyPress = jest.fn((e) => {
|
|
294
|
-
e.persist();
|
|
295
|
-
}), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onKeyPress }));
|
|
296
|
-
findInput(container).dispatchEvent(
|
|
297
|
-
keydown({
|
|
298
|
-
altKey: !0,
|
|
299
|
-
ctrlKey: !0,
|
|
300
|
-
metaKey: !0,
|
|
301
|
-
shiftKey: !0,
|
|
302
|
-
key: " "
|
|
303
|
-
})
|
|
304
|
-
), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
305
|
-
expect.objectContaining({
|
|
306
|
-
nativeEvent: expect.objectContaining({
|
|
307
|
-
altKey: !0,
|
|
308
|
-
ctrlKey: !0,
|
|
309
|
-
key: " ",
|
|
310
|
-
metaKey: !0,
|
|
311
|
-
shiftKey: !0,
|
|
312
|
-
target: expect.anything()
|
|
313
|
-
})
|
|
314
|
-
})
|
|
315
|
-
);
|
|
316
|
-
}), test('meta key + Enter calls "onKeyPress"', () => {
|
|
317
|
-
const onKeyPress = jest.fn((e) => {
|
|
318
|
-
e.persist();
|
|
319
|
-
}), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onKeyPress }));
|
|
320
|
-
findInput(container).dispatchEvent(
|
|
321
|
-
keydown({
|
|
322
|
-
metaKey: !0,
|
|
323
|
-
key: "Enter"
|
|
324
|
-
})
|
|
325
|
-
), expect(onKeyPress).toHaveBeenCalledTimes(1);
|
|
326
|
-
});
|
|
327
|
-
}), describe('prop "onSelectionChange"', () => {
|
|
328
|
-
test("is called on select", () => {
|
|
329
|
-
const { container } = (0, import_react.render)(
|
|
330
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { defaultValue: "12345", onSelectionChange })
|
|
331
|
-
), input = findInput(container);
|
|
332
|
-
input.selectionStart = 0, input.selectionEnd = 3, input.dispatchEvent(new window.Event("select", {}));
|
|
333
|
-
function onSelectionChange(e) {
|
|
334
|
-
expect(e.nativeEvent.selection.end).toEqual(3), expect(e.nativeEvent.selection.start).toEqual(0);
|
|
335
|
-
}
|
|
336
|
-
}), test.skip("is called on change", () => {
|
|
337
|
-
const onSelectionChange = jest.fn(), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { onSelectionChange }));
|
|
338
|
-
findInput(container).dispatchEvent(new window.Event("input", { bubbles: !0 })), expect(onSelectionChange).toHaveBeenCalledTimes(1);
|
|
339
|
-
});
|
|
340
|
-
}), describe('prop "onSubmitEditing"', () => {
|
|
341
|
-
test("single-line input", (done) => {
|
|
342
|
-
const { container } = (0, import_react.render)(
|
|
343
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { defaultValue: "12345", onSubmitEditing })
|
|
344
|
-
);
|
|
345
|
-
findInput(container).dispatchEvent(keydown({ key: "Enter" }));
|
|
346
|
-
function onSubmitEditing(e) {
|
|
347
|
-
expect(e.nativeEvent.target).toBeDefined(), expect(e.nativeEvent.text).toBe("12345"), done();
|
|
348
|
-
}
|
|
349
|
-
}), test("single-line input while composing", () => {
|
|
350
|
-
const onSubmitEditing = jest.fn(), { container } = (0, import_react.render)(
|
|
351
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { defaultValue: "12345", onSubmitEditing })
|
|
352
|
-
), input = findInput(container);
|
|
353
|
-
input.dispatchEvent(keydown({ key: "Enter", isComposing: !0, keyCode: 13 })), input.dispatchEvent(keydown({ key: "Enter", isComposing: !1, keyCode: 229 })), expect(onSubmitEditing).not.toHaveBeenCalled();
|
|
354
|
-
}), test("multi-line input", () => {
|
|
355
|
-
const onSubmitEditing = jest.fn(), { container } = (0, import_react.render)(
|
|
356
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { defaultValue: "12345", multiline: !0, onSubmitEditing })
|
|
357
|
-
);
|
|
358
|
-
findTextArea(container).dispatchEvent(keydown({ key: "Enter" })), expect(onSubmitEditing).not.toHaveBeenCalled();
|
|
359
|
-
}), test('multi-line input with "blurOnSubmit" triggers "onSubmitEditing"', () => {
|
|
360
|
-
const onSubmitEditing = jest.fn(), preventDefault = jest.fn(), { container } = (0, import_react.render)(
|
|
361
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
362
|
-
import__.default,
|
|
363
|
-
{
|
|
364
|
-
blurOnSubmit: !0,
|
|
365
|
-
defaultValue: "12345",
|
|
366
|
-
multiline: !0,
|
|
367
|
-
onSubmitEditing
|
|
368
|
-
}
|
|
369
|
-
)
|
|
370
|
-
), textarea = findTextArea(container);
|
|
371
|
-
textarea.dispatchEvent(keydown({ key: "Enter", preventDefault, shiftKey: !0 })), expect(onSubmitEditing).not.toHaveBeenCalledWith(
|
|
372
|
-
expect.objectContaining({ shiftKey: !0 })
|
|
373
|
-
), expect(preventDefault).not.toHaveBeenCalled(), textarea.dispatchEvent(keydown({ key: "Enter", preventDefault })), expect(onSubmitEditing).toHaveBeenCalledTimes(1), expect(preventDefault).toHaveBeenCalledTimes(1);
|
|
374
|
-
});
|
|
375
|
-
}), test('prop "returnKeyType"', () => {
|
|
376
|
-
const returnKeyType = "previous", { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { returnKeyType })), input = findInput(container);
|
|
377
|
-
expect(input.getAttribute("enterkeyhint")).toEqual(returnKeyType);
|
|
378
|
-
}), test('prop "secureTextEntry"', () => {
|
|
379
|
-
let { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { secureTextEntry: !0 }));
|
|
380
|
-
const input = findInput(container);
|
|
381
|
-
expect(input.getAttribute("type")).toEqual("password"), { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { multiline: !0, secureTextEntry: !0 }));
|
|
382
|
-
const textarea = findTextArea(container);
|
|
383
|
-
expect(textarea.getAttribute("type")).toEqual(null);
|
|
384
|
-
}), describe('prop "selectTextOnFocus"', () => {
|
|
385
|
-
testIfDocumentIsFocused('value "false"', () => {
|
|
386
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { defaultValue: "text" })), input = findInput(container);
|
|
387
|
-
input.focus(), expect(input.selectionEnd).toEqual(4), expect(input.selectionStart).toEqual(4);
|
|
388
|
-
});
|
|
389
|
-
}), describe('prop "selection"', () => {
|
|
390
|
-
test("set cursor location", () => {
|
|
391
|
-
const cursorLocation = { start: 3, end: 3 }, { container: defaultContainer } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { defaultValue: "12345" })), inputDefaultSelection = findInput(defaultContainer);
|
|
392
|
-
expect(inputDefaultSelection.selectionStart).toEqual(5), expect(inputDefaultSelection.selectionEnd).toEqual(5);
|
|
393
|
-
const { container: customContainer } = (0, import_react.render)(
|
|
394
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { defaultValue: "12345", selection: cursorLocation })
|
|
395
|
-
), inputCustomSelection = findInput(customContainer);
|
|
396
|
-
expect(inputCustomSelection.selectionStart).toEqual(cursorLocation.start), expect(inputCustomSelection.selectionEnd).toEqual(cursorLocation.end);
|
|
397
|
-
});
|
|
398
|
-
}), describe('prop "spellCheck"', () => {
|
|
399
|
-
test("default value", () => {
|
|
400
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {})), input = findInput(container);
|
|
401
|
-
expect(input.getAttribute("spellCheck")).toEqual("true");
|
|
402
|
-
}), test('inherit from "autoCorrect"', () => {
|
|
403
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { autoCorrect: !1 })), input = findInput(container);
|
|
404
|
-
expect(input.getAttribute("spellCheck")).toEqual("false");
|
|
405
|
-
}), test('value "false"', () => {
|
|
406
|
-
const { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { spellCheck: !1 })), input = findInput(container);
|
|
407
|
-
expect(input.getAttribute("spellCheck")).toEqual("false");
|
|
408
|
-
});
|
|
409
|
-
}), test('prop "value"', () => {
|
|
410
|
-
const value = "value", { container } = (0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { value })), input = findInput(container);
|
|
411
|
-
expect(input.value).toEqual(value);
|
|
412
|
-
}), describe("imperative methods", () => {
|
|
413
|
-
test("node.clear()", () => {
|
|
414
|
-
const ref = import_react2.default.createRef();
|
|
415
|
-
(0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { ref })), expect(typeof ref.current.clear).toBe("function");
|
|
416
|
-
}), test("node.isFocused()", () => {
|
|
417
|
-
const ref = import_react2.default.createRef();
|
|
418
|
-
(0, import_react.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, { ref })), expect(typeof ref.current.isFocused).toBe("function");
|
|
419
|
-
});
|
|
420
|
-
});
|
|
421
|
-
});
|
|
422
|
-
//# sourceMappingURL=index-test.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/TextInput/__tests__/index-test.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAOA,mBAAuB,mCACvB,mCAAkC,sCAClCA,gBAAkB,2BAClB,oBAAoB,iCAEpB,WAAsB,wBAiEa;AA/DnC,SAAS,UAAU,WAAW;AAC5B,SAAO,UAAU,cAAc,OAAO;AACxC;AAEA,SAAS,aAAa,WAAW;AAC/B,SAAO,UAAU,cAAc,UAAU;AAC3C;AAEA,MAAM,0BAA0B,CAAC,SAAS,OAAO;AAC/C,EAAI,SAAS,YAAY,SAAS,SAAS,IACzC,KAAK,SAAS,EAAE,IAEhB,KAAK,KA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AQ,SACR,EAAE,UAAU,QAAI,qBAAO,4CAAC,SAAAA,SAAA,EAAU,OAAc,CAAE,GAClD,QAAQ,UAAU,SAAS;AACjC,WAAO,MAAM,KAAK,EAAE,QAAQ,KAAK;AAAA,EACnC,CAAC,GAED,SAAS,sBAAsB,MAAM;AACnC,SAAK,gBAAgB,MAAM;AACzB,YAAM,MAAM,cAAAC,QAAM,UAAU;AAC5B,+BAAO,4CAAC,SAAAD,SAAA,EAAU,KAAU,CAAE,GAC9B,OAAO,OAAO,IAAI,QAAQ,KAAK,EAAE,KAAK,UAAU;AAAA,IAClD,CAAC,GAED,KAAK,oBAAoB,MAAM;AAC7B,YAAM,MAAM,cAAAC,QAAM,UAAU;AAC5B,+BAAO,4CAAC,SAAAD,SAAA,EAAU,KAAU,CAAE,GAC9B,OAAO,OAAO,IAAI,QAAQ,SAAS,EAAE,KAAK,UAAU;AAAA,IACtD,CAAC;AAAA,EACH,CAAC;AACH,CAAC;",
|
|
5
|
-
"names": ["import_react", "TextInput", "React"]
|
|
6
|
-
}
|
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
import { render } from "@testing-library/react";
|
|
2
|
-
import { createEventTarget } from "dom-event-testing-library";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { act } from "react-dom/test-utils";
|
|
5
|
-
import TextInput from "..";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
function findInput(container) {
|
|
8
|
-
return container.querySelector("input");
|
|
9
|
-
}
|
|
10
|
-
function findTextArea(container) {
|
|
11
|
-
return container.querySelector("textarea");
|
|
12
|
-
}
|
|
13
|
-
const testIfDocumentIsFocused = (message, fn) => {
|
|
14
|
-
document.hasFocus && document.hasFocus() ? test(message, fn) : test.skip(`${message} \u2013 document is not focused`, () => {
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
function createEvent(type, data = {}) {
|
|
18
|
-
const event = document.createEvent("CustomEvent");
|
|
19
|
-
return event.initCustomEvent(type, !0, !0), data != null && Object.keys(data).forEach((key) => {
|
|
20
|
-
const value = data[key];
|
|
21
|
-
key === "timeStamp" && !value || Object.defineProperty(event, key, { value });
|
|
22
|
-
}), event;
|
|
23
|
-
}
|
|
24
|
-
function createKeyboardEvent(type, {
|
|
25
|
-
altKey = !1,
|
|
26
|
-
ctrlKey = !1,
|
|
27
|
-
isComposing = !1,
|
|
28
|
-
key = "",
|
|
29
|
-
keyCode = 0,
|
|
30
|
-
metaKey = !1,
|
|
31
|
-
preventDefault = () => {
|
|
32
|
-
},
|
|
33
|
-
shiftKey = !1
|
|
34
|
-
} = {}) {
|
|
35
|
-
return createEvent(type, {
|
|
36
|
-
altKey,
|
|
37
|
-
ctrlKey,
|
|
38
|
-
isComposing,
|
|
39
|
-
key,
|
|
40
|
-
keyCode,
|
|
41
|
-
metaKey,
|
|
42
|
-
preventDefault,
|
|
43
|
-
shiftKey
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function keydown(payload) {
|
|
47
|
-
return createKeyboardEvent("keydown", payload);
|
|
48
|
-
}
|
|
49
|
-
describe("components/TextInput", () => {
|
|
50
|
-
describe('prop "autoComplete"', () => {
|
|
51
|
-
test('value "on"', () => {
|
|
52
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, {})), input = findInput(container);
|
|
53
|
-
expect(input.getAttribute("autoComplete")).toEqual("on");
|
|
54
|
-
}), test('value "off"', () => {
|
|
55
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { autoComplete: "off" })), input = findInput(container);
|
|
56
|
-
expect(input.getAttribute("autoComplete")).toEqual("off");
|
|
57
|
-
}), test("autoCompleteType fallback", () => {
|
|
58
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { autoCompleteType: "off" })), input = findInput(container);
|
|
59
|
-
expect(input.getAttribute("autoComplete")).toEqual("off");
|
|
60
|
-
});
|
|
61
|
-
}), describe('prop "autoFocus"', () => {
|
|
62
|
-
test('value "false"', () => {
|
|
63
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, {})), input = findInput(container);
|
|
64
|
-
expect(document.activeElement).not.toBe(input);
|
|
65
|
-
}), test('value "true"', () => {
|
|
66
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { autoFocus: !0 })), input = findInput(container);
|
|
67
|
-
expect(document.activeElement).toBe(input);
|
|
68
|
-
});
|
|
69
|
-
}), describe('prop "clearTextOnFocus"', () => {
|
|
70
|
-
const defaultValue = "defaultValue";
|
|
71
|
-
testIfDocumentIsFocused('value "false"', () => {
|
|
72
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { defaultValue })), input = findInput(container);
|
|
73
|
-
input.focus(), expect(input.node.value).toEqual(defaultValue);
|
|
74
|
-
}), testIfDocumentIsFocused('value "true"', () => {
|
|
75
|
-
const { container } = render(
|
|
76
|
-
/* @__PURE__ */ jsx(TextInput, { clearTextOnFocus: !0, defaultValue })
|
|
77
|
-
), input = findInput(container);
|
|
78
|
-
input.focus(), expect(input.node.value).toEqual("");
|
|
79
|
-
});
|
|
80
|
-
}), test('prop "defaultValue"', () => {
|
|
81
|
-
const defaultValue = "defaultValue", { container } = render(/* @__PURE__ */ jsx(TextInput, { defaultValue })), input = findInput(container);
|
|
82
|
-
expect(input.value).toEqual(defaultValue);
|
|
83
|
-
}), describe('prop "disabled"', () => {
|
|
84
|
-
test('value "false"', () => {
|
|
85
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, {})), input = findInput(container);
|
|
86
|
-
expect(input.disabled).toEqual(!1);
|
|
87
|
-
}), test('value "true"', () => {
|
|
88
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { disabled: !0 })), input = findInput(container);
|
|
89
|
-
expect(input.disabled).toEqual(!0);
|
|
90
|
-
});
|
|
91
|
-
}), describe('prop "editable"', () => {
|
|
92
|
-
test('value "true"', () => {
|
|
93
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, {})), input = findInput(container);
|
|
94
|
-
expect(input.readOnly).toEqual(!1);
|
|
95
|
-
}), test('value "false"', () => {
|
|
96
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { editable: !1 })), input = findInput(container);
|
|
97
|
-
expect(input.readOnly).toEqual(!0);
|
|
98
|
-
});
|
|
99
|
-
}), describe('prop "keyboardType"', () => {
|
|
100
|
-
test("default value", () => {
|
|
101
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { keyboardType: "default" })), input = findInput(container);
|
|
102
|
-
expect(input.type).toEqual("text");
|
|
103
|
-
}), test('value "email-address"', () => {
|
|
104
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { keyboardType: "email-address" })), input = findInput(container);
|
|
105
|
-
expect(input.type).toEqual("email");
|
|
106
|
-
}), test('value "decimal-pad"', () => {
|
|
107
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { keyboardType: "decimal-pad" })), input = findInput(container);
|
|
108
|
-
expect(input.inputMode).toEqual("decimal");
|
|
109
|
-
}), test('value "number-pad"', () => {
|
|
110
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { keyboardType: "number-pad" })), input = findInput(container);
|
|
111
|
-
expect(input.inputMode).toEqual("numeric");
|
|
112
|
-
}), test('value "numeric"', () => {
|
|
113
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { keyboardType: "numeric" })), input = findInput(container);
|
|
114
|
-
expect(input.inputMode).toEqual("numeric");
|
|
115
|
-
}), test('value "phone-pad"', () => {
|
|
116
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { keyboardType: "phone-pad" })), input = findInput(container);
|
|
117
|
-
expect(input.type).toEqual("tel");
|
|
118
|
-
}), test('value "url"', () => {
|
|
119
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { keyboardType: "url" })), input = findInput(container);
|
|
120
|
-
expect(input.type).toEqual("url");
|
|
121
|
-
});
|
|
122
|
-
}), test('prop "maxLength"', () => {
|
|
123
|
-
let { container } = render(/* @__PURE__ */ jsx(TextInput, {})), input = findInput(container);
|
|
124
|
-
expect(input.getAttribute("maxLength")).toEqual(null), { container } = render(/* @__PURE__ */ jsx(TextInput, { maxLength: 10 })), input = findInput(container), expect(input.getAttribute("maxLength")).toEqual("10");
|
|
125
|
-
}), describe('prop "multiline"', () => {
|
|
126
|
-
test('value "false"', () => {
|
|
127
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, {})), input = findInput(container);
|
|
128
|
-
expect(input).toBeDefined();
|
|
129
|
-
}), test('value "true"', () => {
|
|
130
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { multiline: !0 })), textarea = findTextArea(container);
|
|
131
|
-
expect(textarea).toBeDefined();
|
|
132
|
-
});
|
|
133
|
-
}), describe('prop "numberOfLines"', () => {
|
|
134
|
-
test('without "multiline"', () => {
|
|
135
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { numberOfLines: 2 })), input = findInput(container), textarea = findTextArea(container);
|
|
136
|
-
expect(input).toBeDefined(), expect(textarea).toBeNull();
|
|
137
|
-
}), test('with "multiline"', () => {
|
|
138
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { multiline: !0, numberOfLines: 3 })), textarea = findTextArea(container);
|
|
139
|
-
expect(textarea.getAttribute("rows")).toEqual("3");
|
|
140
|
-
});
|
|
141
|
-
}), test('prop "onBlur"', () => {
|
|
142
|
-
const onBlur = jest.fn(), ref = React.createRef();
|
|
143
|
-
act(() => {
|
|
144
|
-
render(/* @__PURE__ */ jsx(TextInput, { onBlur, ref }));
|
|
145
|
-
});
|
|
146
|
-
const target = createEventTarget(ref.current), body = createEventTarget(document.body);
|
|
147
|
-
act(() => {
|
|
148
|
-
target.focus(), body.focus({ relatedTarget: target.node });
|
|
149
|
-
}), expect(onBlur).toHaveBeenCalledTimes(1), expect(TextInput.State.currentlyFocusedField()).toBe(null);
|
|
150
|
-
}), test.skip('prop "onChange"', () => {
|
|
151
|
-
const onChange = jest.fn(), { container } = render(/* @__PURE__ */ jsx(TextInput, { onChange }));
|
|
152
|
-
findInput(container).dispatchEvent(new window.Event("change", { bubbles: !0 })), expect(onChange).toHaveBeenCalledTimes(1);
|
|
153
|
-
}), test.skip('prop "onChangeText"', () => {
|
|
154
|
-
const onChangeText = jest.fn(), { container } = render(/* @__PURE__ */ jsx(TextInput, { onChangeText })), input = findInput(container);
|
|
155
|
-
input.dispatchEvent(keydown({ key: "a" })), input.dispatchEvent(new window.Event("change", { bubbles: !0 })), expect(onChangeText).toHaveBeenCalledTimes(1), expect(onChangeText).toBeCalledWith("a");
|
|
156
|
-
}), test('prop "onFocus"', () => {
|
|
157
|
-
const onFocus = jest.fn(), ref = React.createRef();
|
|
158
|
-
act(() => {
|
|
159
|
-
render(/* @__PURE__ */ jsx(TextInput, { onFocus, ref }));
|
|
160
|
-
});
|
|
161
|
-
const target = createEventTarget(ref.current);
|
|
162
|
-
act(() => {
|
|
163
|
-
target.focus();
|
|
164
|
-
}), expect(onFocus).toHaveBeenCalledTimes(1), target.node.focus(), expect(TextInput.State.currentlyFocusedField()).toBe(target.node);
|
|
165
|
-
}), describe('prop "onKeyPress"', () => {
|
|
166
|
-
test("arrow key", () => {
|
|
167
|
-
const onKeyPress = jest.fn((e) => {
|
|
168
|
-
e.persist();
|
|
169
|
-
}), { container } = render(/* @__PURE__ */ jsx(TextInput, { onKeyPress }));
|
|
170
|
-
findInput(container).dispatchEvent(keydown({ key: "ArrowLeft" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
171
|
-
expect.objectContaining({
|
|
172
|
-
nativeEvent: expect.objectContaining({
|
|
173
|
-
altKey: !1,
|
|
174
|
-
ctrlKey: !1,
|
|
175
|
-
key: "ArrowLeft",
|
|
176
|
-
metaKey: !1,
|
|
177
|
-
shiftKey: !1,
|
|
178
|
-
target: expect.anything()
|
|
179
|
-
})
|
|
180
|
-
})
|
|
181
|
-
);
|
|
182
|
-
}), test("backspace key", () => {
|
|
183
|
-
const onKeyPress = jest.fn((e) => {
|
|
184
|
-
e.persist();
|
|
185
|
-
}), { container } = render(/* @__PURE__ */ jsx(TextInput, { onKeyPress }));
|
|
186
|
-
findInput(container).dispatchEvent(keydown({ key: "Backspace" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
187
|
-
expect.objectContaining({
|
|
188
|
-
nativeEvent: expect.objectContaining({
|
|
189
|
-
altKey: !1,
|
|
190
|
-
ctrlKey: !1,
|
|
191
|
-
key: "Backspace",
|
|
192
|
-
metaKey: !1,
|
|
193
|
-
shiftKey: !1,
|
|
194
|
-
target: expect.anything()
|
|
195
|
-
})
|
|
196
|
-
})
|
|
197
|
-
);
|
|
198
|
-
}), test("enter key", () => {
|
|
199
|
-
const onKeyPress = jest.fn((e) => {
|
|
200
|
-
e.persist();
|
|
201
|
-
}), { container } = render(/* @__PURE__ */ jsx(TextInput, { onKeyPress }));
|
|
202
|
-
findInput(container).dispatchEvent(keydown({ key: "Enter" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
203
|
-
expect.objectContaining({
|
|
204
|
-
nativeEvent: expect.objectContaining({
|
|
205
|
-
altKey: !1,
|
|
206
|
-
ctrlKey: !1,
|
|
207
|
-
key: "Enter",
|
|
208
|
-
metaKey: !1,
|
|
209
|
-
shiftKey: !1,
|
|
210
|
-
target: expect.anything()
|
|
211
|
-
})
|
|
212
|
-
})
|
|
213
|
-
);
|
|
214
|
-
}), test("escape key", () => {
|
|
215
|
-
const onKeyPress = jest.fn((e) => {
|
|
216
|
-
e.persist();
|
|
217
|
-
}), { container } = render(/* @__PURE__ */ jsx(TextInput, { onKeyPress }));
|
|
218
|
-
findInput(container).dispatchEvent(keydown({ key: "Escape" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
219
|
-
expect.objectContaining({
|
|
220
|
-
nativeEvent: expect.objectContaining({
|
|
221
|
-
altKey: !1,
|
|
222
|
-
ctrlKey: !1,
|
|
223
|
-
key: "Escape",
|
|
224
|
-
metaKey: !1,
|
|
225
|
-
shiftKey: !1,
|
|
226
|
-
target: expect.anything()
|
|
227
|
-
})
|
|
228
|
-
})
|
|
229
|
-
);
|
|
230
|
-
}), test("space key", () => {
|
|
231
|
-
const onKeyPress = jest.fn((e) => {
|
|
232
|
-
e.persist();
|
|
233
|
-
}), { container } = render(/* @__PURE__ */ jsx(TextInput, { onKeyPress }));
|
|
234
|
-
findInput(container).dispatchEvent(keydown({ key: " " })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
235
|
-
expect.objectContaining({
|
|
236
|
-
nativeEvent: expect.objectContaining({
|
|
237
|
-
altKey: !1,
|
|
238
|
-
ctrlKey: !1,
|
|
239
|
-
key: " ",
|
|
240
|
-
metaKey: !1,
|
|
241
|
-
shiftKey: !1,
|
|
242
|
-
target: expect.anything()
|
|
243
|
-
})
|
|
244
|
-
})
|
|
245
|
-
);
|
|
246
|
-
}), test("tab key", () => {
|
|
247
|
-
const onKeyPress = jest.fn((e) => {
|
|
248
|
-
e.persist();
|
|
249
|
-
}), { container } = render(/* @__PURE__ */ jsx(TextInput, { onKeyPress }));
|
|
250
|
-
findInput(container).dispatchEvent(keydown({ key: "Tab" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
251
|
-
expect.objectContaining({
|
|
252
|
-
nativeEvent: expect.objectContaining({
|
|
253
|
-
altKey: !1,
|
|
254
|
-
ctrlKey: !1,
|
|
255
|
-
key: "Tab",
|
|
256
|
-
metaKey: !1,
|
|
257
|
-
shiftKey: !1,
|
|
258
|
-
target: expect.anything()
|
|
259
|
-
})
|
|
260
|
-
})
|
|
261
|
-
);
|
|
262
|
-
}), test("text key", () => {
|
|
263
|
-
const onKeyPress = jest.fn((e) => {
|
|
264
|
-
e.persist();
|
|
265
|
-
}), { container } = render(/* @__PURE__ */ jsx(TextInput, { onKeyPress }));
|
|
266
|
-
findInput(container).dispatchEvent(keydown({ key: "a" })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
267
|
-
expect.objectContaining({
|
|
268
|
-
nativeEvent: expect.objectContaining({
|
|
269
|
-
altKey: !1,
|
|
270
|
-
ctrlKey: !1,
|
|
271
|
-
key: "a",
|
|
272
|
-
metaKey: !1,
|
|
273
|
-
shiftKey: !1,
|
|
274
|
-
target: expect.anything()
|
|
275
|
-
})
|
|
276
|
-
})
|
|
277
|
-
);
|
|
278
|
-
}), test("modifier keys are included", () => {
|
|
279
|
-
const onKeyPress = jest.fn((e) => {
|
|
280
|
-
e.persist();
|
|
281
|
-
}), { container } = render(/* @__PURE__ */ jsx(TextInput, { onKeyPress }));
|
|
282
|
-
findInput(container).dispatchEvent(
|
|
283
|
-
keydown({
|
|
284
|
-
altKey: !0,
|
|
285
|
-
ctrlKey: !0,
|
|
286
|
-
metaKey: !0,
|
|
287
|
-
shiftKey: !0,
|
|
288
|
-
key: " "
|
|
289
|
-
})
|
|
290
|
-
), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(
|
|
291
|
-
expect.objectContaining({
|
|
292
|
-
nativeEvent: expect.objectContaining({
|
|
293
|
-
altKey: !0,
|
|
294
|
-
ctrlKey: !0,
|
|
295
|
-
key: " ",
|
|
296
|
-
metaKey: !0,
|
|
297
|
-
shiftKey: !0,
|
|
298
|
-
target: expect.anything()
|
|
299
|
-
})
|
|
300
|
-
})
|
|
301
|
-
);
|
|
302
|
-
}), test('meta key + Enter calls "onKeyPress"', () => {
|
|
303
|
-
const onKeyPress = jest.fn((e) => {
|
|
304
|
-
e.persist();
|
|
305
|
-
}), { container } = render(/* @__PURE__ */ jsx(TextInput, { onKeyPress }));
|
|
306
|
-
findInput(container).dispatchEvent(
|
|
307
|
-
keydown({
|
|
308
|
-
metaKey: !0,
|
|
309
|
-
key: "Enter"
|
|
310
|
-
})
|
|
311
|
-
), expect(onKeyPress).toHaveBeenCalledTimes(1);
|
|
312
|
-
});
|
|
313
|
-
}), describe('prop "onSelectionChange"', () => {
|
|
314
|
-
test("is called on select", () => {
|
|
315
|
-
const { container } = render(
|
|
316
|
-
/* @__PURE__ */ jsx(TextInput, { defaultValue: "12345", onSelectionChange })
|
|
317
|
-
), input = findInput(container);
|
|
318
|
-
input.selectionStart = 0, input.selectionEnd = 3, input.dispatchEvent(new window.Event("select", {}));
|
|
319
|
-
function onSelectionChange(e) {
|
|
320
|
-
expect(e.nativeEvent.selection.end).toEqual(3), expect(e.nativeEvent.selection.start).toEqual(0);
|
|
321
|
-
}
|
|
322
|
-
}), test.skip("is called on change", () => {
|
|
323
|
-
const onSelectionChange = jest.fn(), { container } = render(/* @__PURE__ */ jsx(TextInput, { onSelectionChange }));
|
|
324
|
-
findInput(container).dispatchEvent(new window.Event("input", { bubbles: !0 })), expect(onSelectionChange).toHaveBeenCalledTimes(1);
|
|
325
|
-
});
|
|
326
|
-
}), describe('prop "onSubmitEditing"', () => {
|
|
327
|
-
test("single-line input", (done) => {
|
|
328
|
-
const { container } = render(
|
|
329
|
-
/* @__PURE__ */ jsx(TextInput, { defaultValue: "12345", onSubmitEditing })
|
|
330
|
-
);
|
|
331
|
-
findInput(container).dispatchEvent(keydown({ key: "Enter" }));
|
|
332
|
-
function onSubmitEditing(e) {
|
|
333
|
-
expect(e.nativeEvent.target).toBeDefined(), expect(e.nativeEvent.text).toBe("12345"), done();
|
|
334
|
-
}
|
|
335
|
-
}), test("single-line input while composing", () => {
|
|
336
|
-
const onSubmitEditing = jest.fn(), { container } = render(
|
|
337
|
-
/* @__PURE__ */ jsx(TextInput, { defaultValue: "12345", onSubmitEditing })
|
|
338
|
-
), input = findInput(container);
|
|
339
|
-
input.dispatchEvent(keydown({ key: "Enter", isComposing: !0, keyCode: 13 })), input.dispatchEvent(keydown({ key: "Enter", isComposing: !1, keyCode: 229 })), expect(onSubmitEditing).not.toHaveBeenCalled();
|
|
340
|
-
}), test("multi-line input", () => {
|
|
341
|
-
const onSubmitEditing = jest.fn(), { container } = render(
|
|
342
|
-
/* @__PURE__ */ jsx(TextInput, { defaultValue: "12345", multiline: !0, onSubmitEditing })
|
|
343
|
-
);
|
|
344
|
-
findTextArea(container).dispatchEvent(keydown({ key: "Enter" })), expect(onSubmitEditing).not.toHaveBeenCalled();
|
|
345
|
-
}), test('multi-line input with "blurOnSubmit" triggers "onSubmitEditing"', () => {
|
|
346
|
-
const onSubmitEditing = jest.fn(), preventDefault = jest.fn(), { container } = render(
|
|
347
|
-
/* @__PURE__ */ jsx(
|
|
348
|
-
TextInput,
|
|
349
|
-
{
|
|
350
|
-
blurOnSubmit: !0,
|
|
351
|
-
defaultValue: "12345",
|
|
352
|
-
multiline: !0,
|
|
353
|
-
onSubmitEditing
|
|
354
|
-
}
|
|
355
|
-
)
|
|
356
|
-
), textarea = findTextArea(container);
|
|
357
|
-
textarea.dispatchEvent(keydown({ key: "Enter", preventDefault, shiftKey: !0 })), expect(onSubmitEditing).not.toHaveBeenCalledWith(
|
|
358
|
-
expect.objectContaining({ shiftKey: !0 })
|
|
359
|
-
), expect(preventDefault).not.toHaveBeenCalled(), textarea.dispatchEvent(keydown({ key: "Enter", preventDefault })), expect(onSubmitEditing).toHaveBeenCalledTimes(1), expect(preventDefault).toHaveBeenCalledTimes(1);
|
|
360
|
-
});
|
|
361
|
-
}), test('prop "returnKeyType"', () => {
|
|
362
|
-
const returnKeyType = "previous", { container } = render(/* @__PURE__ */ jsx(TextInput, { returnKeyType })), input = findInput(container);
|
|
363
|
-
expect(input.getAttribute("enterkeyhint")).toEqual(returnKeyType);
|
|
364
|
-
}), test('prop "secureTextEntry"', () => {
|
|
365
|
-
let { container } = render(/* @__PURE__ */ jsx(TextInput, { secureTextEntry: !0 }));
|
|
366
|
-
const input = findInput(container);
|
|
367
|
-
expect(input.getAttribute("type")).toEqual("password"), { container } = render(/* @__PURE__ */ jsx(TextInput, { multiline: !0, secureTextEntry: !0 }));
|
|
368
|
-
const textarea = findTextArea(container);
|
|
369
|
-
expect(textarea.getAttribute("type")).toEqual(null);
|
|
370
|
-
}), describe('prop "selectTextOnFocus"', () => {
|
|
371
|
-
testIfDocumentIsFocused('value "false"', () => {
|
|
372
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { defaultValue: "text" })), input = findInput(container);
|
|
373
|
-
input.focus(), expect(input.selectionEnd).toEqual(4), expect(input.selectionStart).toEqual(4);
|
|
374
|
-
});
|
|
375
|
-
}), describe('prop "selection"', () => {
|
|
376
|
-
test("set cursor location", () => {
|
|
377
|
-
const cursorLocation = { start: 3, end: 3 }, { container: defaultContainer } = render(/* @__PURE__ */ jsx(TextInput, { defaultValue: "12345" })), inputDefaultSelection = findInput(defaultContainer);
|
|
378
|
-
expect(inputDefaultSelection.selectionStart).toEqual(5), expect(inputDefaultSelection.selectionEnd).toEqual(5);
|
|
379
|
-
const { container: customContainer } = render(
|
|
380
|
-
/* @__PURE__ */ jsx(TextInput, { defaultValue: "12345", selection: cursorLocation })
|
|
381
|
-
), inputCustomSelection = findInput(customContainer);
|
|
382
|
-
expect(inputCustomSelection.selectionStart).toEqual(cursorLocation.start), expect(inputCustomSelection.selectionEnd).toEqual(cursorLocation.end);
|
|
383
|
-
});
|
|
384
|
-
}), describe('prop "spellCheck"', () => {
|
|
385
|
-
test("default value", () => {
|
|
386
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, {})), input = findInput(container);
|
|
387
|
-
expect(input.getAttribute("spellCheck")).toEqual("true");
|
|
388
|
-
}), test('inherit from "autoCorrect"', () => {
|
|
389
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { autoCorrect: !1 })), input = findInput(container);
|
|
390
|
-
expect(input.getAttribute("spellCheck")).toEqual("false");
|
|
391
|
-
}), test('value "false"', () => {
|
|
392
|
-
const { container } = render(/* @__PURE__ */ jsx(TextInput, { spellCheck: !1 })), input = findInput(container);
|
|
393
|
-
expect(input.getAttribute("spellCheck")).toEqual("false");
|
|
394
|
-
});
|
|
395
|
-
}), test('prop "value"', () => {
|
|
396
|
-
const value = "value", { container } = render(/* @__PURE__ */ jsx(TextInput, { value })), input = findInput(container);
|
|
397
|
-
expect(input.value).toEqual(value);
|
|
398
|
-
}), describe("imperative methods", () => {
|
|
399
|
-
test("node.clear()", () => {
|
|
400
|
-
const ref = React.createRef();
|
|
401
|
-
render(/* @__PURE__ */ jsx(TextInput, { ref })), expect(typeof ref.current.clear).toBe("function");
|
|
402
|
-
}), test("node.isFocused()", () => {
|
|
403
|
-
const ref = React.createRef();
|
|
404
|
-
render(/* @__PURE__ */ jsx(TextInput, { ref })), expect(typeof ref.current.isFocused).toBe("function");
|
|
405
|
-
});
|
|
406
|
-
});
|
|
407
|
-
});
|
|
408
|
-
//# sourceMappingURL=index-test.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/TextInput/__tests__/index-test.tsx"],
|
|
4
|
-
"mappings": "AAOA,SAAS,cAAc;AACvB,SAAS,yBAAyB;AAClC,OAAO,WAAW;AAClB,SAAS,WAAW;AAEpB,OAAO,eAAe;AAiEa;AA/DnC,SAAS,UAAU,WAAW;AAC5B,SAAO,UAAU,cAAc,OAAO;AACxC;AAEA,SAAS,aAAa,WAAW;AAC/B,SAAO,UAAU,cAAc,UAAU;AAC3C;AAEA,MAAM,0BAA0B,CAAC,SAAS,OAAO;AAC/C,EAAI,SAAS,YAAY,SAAS,SAAS,IACzC,KAAK,SAAS,EAAE,IAEhB,KAAK,KAAK,GAAG,OAAO,mCAA8B,MAAM;AAAA,EAAC,CAAC;AAE9D;AAEA,SAAS,YAAY,MAAM,OAAO,CAAC,GAAG;AACpC,QAAM,QAAQ,SAAS,YAAY,aAAa;AAChD,eAAM,gBAAgB,MAAM,IAAM,EAAI,GAClC,QAAQ,QACV,OAAO,KAAK,IAAI,EAAE,QAAQ,CAAC,QAAQ;AACjC,UAAM,QAAQ,KAAK,GAAG;AACtB,IAAI,QAAQ,eAAe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