Skip to content

Commit 624b384

Browse files
committed
fix
1 parent b4476e6 commit 624b384

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

packages/e2e-test-app-fabric/test/PointerClickEventsTest.test.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ afterEach(async () => {
2020
await verifyNoErrorLogs();
2121
});
2222

23-
2423
describe('Pointer onClick Test', () => {
2524
test('onClick reports correct native event properties on left click', async () => {
2625
const component = await app.findElementByTestID('pointer-click-target');
@@ -33,7 +32,9 @@ describe('Pointer onClick Test', () => {
3332
await app.waitUntil(
3433
async () => {
3534
const currentText = await stateText.getText();
36-
return currentText.includes('"button": 0') && currentText.includes('onClick');
35+
return (
36+
currentText.includes('"button": 0') && currentText.includes('onClick')
37+
);
3738
},
3839
{
3940
timeout: 5000,
@@ -46,7 +47,7 @@ describe('Pointer onClick Test', () => {
4647
const nativeEvent = JSON.parse(text.split('onClick.nativeEvent: ')[1]);
4748
expect(typeof nativeEvent.target).toBe('number');
4849
nativeEvent.target = '<target>';
49-
expect(text).toMatchSnapshot();
50+
expect(nativeEvent).toMatchSnapshot();
5051
});
5152
test('onAuxClick reports correct native event properties on middle click', async () => {
5253
const component = await app.findElementByTestID('pointer-click-target');
@@ -59,7 +60,10 @@ describe('Pointer onClick Test', () => {
5960
await app.waitUntil(
6061
async () => {
6162
const currentText = await stateText.getText();
62-
return currentText.includes('"button": 1') && currentText.includes('onAuxClick');
63+
return (
64+
currentText.includes('"button": 1') &&
65+
currentText.includes('onAuxClick')
66+
);
6367
},
6468
{
6569
timeout: 5000,
@@ -72,7 +76,7 @@ describe('Pointer onClick Test', () => {
7276
const nativeEvent = JSON.parse(text.split('onAuxClick.nativeEvent: ')[1]);
7377
expect(typeof nativeEvent.target).toBe('number');
7478
nativeEvent.target = '<target>';
75-
expect(text).toMatchSnapshot();
79+
expect(nativeEvent).toMatchSnapshot();
7680
});
7781
test('onAuxClick reports correct native event properties on right click', async () => {
7882
const component = await app.findElementByTestID('pointer-click-target');
@@ -85,7 +89,10 @@ describe('Pointer onClick Test', () => {
8589
await app.waitUntil(
8690
async () => {
8791
const currentText = await stateText.getText();
88-
return currentText.includes('"button": 2') && currentText.includes('onAuxClick');
92+
return (
93+
currentText.includes('"button": 2') &&
94+
currentText.includes('onAuxClick')
95+
);
8996
},
9097
{
9198
timeout: 5000,
@@ -98,7 +105,6 @@ describe('Pointer onClick Test', () => {
98105
const nativeEvent = JSON.parse(text.split('onAuxClick.nativeEvent: ')[1]);
99106
expect(typeof nativeEvent.target).toBe('number');
100107
nativeEvent.target = '<target>';
101-
expect(text).toMatchSnapshot();
108+
expect(nativeEvent).toMatchSnapshot();
102109
});
103-
104110
});

0 commit comments

Comments
 (0)