Skip to content

Commit 3eee37f

Browse files
committed
chore: fix Text press event order
1 parent 76f4323 commit 3eee37f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/user-event/press/__tests__/press.real-timers.test.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ describe('userEvent.press with real timers', () => {
198198
);
199199
await userEvent.press(screen.getByText('press me'));
200200

201-
expect(getEventsNames(events)).toEqual(['pressIn', 'press', 'pressOut']);
201+
expect(getEventsNames(events)).toEqual(['pressIn', 'pressOut', 'press']);
202202
});
203203

204204
test('does not trigger on disabled Text', async () => {
@@ -240,7 +240,7 @@ describe('userEvent.press with real timers', () => {
240240
expect(events).toEqual([]);
241241
});
242242

243-
test('works on TetInput', async () => {
243+
test('works on TextInput', async () => {
244244
const { events, logEvent } = createEventLogger();
245245

246246
render(
@@ -255,7 +255,7 @@ describe('userEvent.press with real timers', () => {
255255
expect(getEventsNames(events)).toEqual(['pressIn', 'pressOut']);
256256
});
257257

258-
test('does not call onPressIn and onPressOut on non editable TetInput', async () => {
258+
test('does not call onPressIn and onPressOut on non editable TextInput', async () => {
259259
const { events, logEvent } = createEventLogger();
260260

261261
render(
@@ -270,7 +270,7 @@ describe('userEvent.press with real timers', () => {
270270
expect(events).toEqual([]);
271271
});
272272

273-
test('does not call onPressIn and onPressOut on TetInput with pointer events disabled', async () => {
273+
test('does not call onPressIn and onPressOut on TextInput with pointer events disabled', async () => {
274274
const { events, logEvent } = createEventLogger();
275275

276276
render(

src/user-event/press/__tests__/press.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ describe('userEvent.press with fake timers', () => {
199199
);
200200

201201
await userEvent.press(screen.getByText('press me'));
202-
expect(getEventsNames(events)).toEqual(['pressIn', 'press', 'pressOut']);
202+
expect(getEventsNames(events)).toEqual(['pressIn', 'pressOut', 'press']);
203203
});
204204

205205
test('press works on Button', async () => {

0 commit comments

Comments
 (0)