Skip to content

Commit ec32e6d

Browse files
committed
snapshots + lint
1 parent 2436058 commit ec32e6d

7 files changed

Lines changed: 602 additions & 159 deletions

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

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
* @format
66
*/
77

8-
import { app } from '@react-native-windows/automation';
9-
import { dumpVisualTree } from '@react-native-windows/automation-commands';
10-
import { goToComponentExample } from './RNTesterNavigation';
11-
import { verifyNoErrorLogs } from './Helpers';
8+
import {app} from '@react-native-windows/automation';
9+
import {dumpVisualTree} from '@react-native-windows/automation-commands';
10+
import {goToComponentExample} from './RNTesterNavigation';
11+
import {verifyNoErrorLogs} from './Helpers';
1212

1313
beforeAll(async () => {
1414
// If window is partially offscreen, tests will fail to click on certain elements
@@ -23,11 +23,10 @@ afterEach(async () => {
2323

2424
async function verifyElementAccessibiltyValue(element: string, value: string) {
2525
const dump = await dumpVisualTree(element);
26-
expect(dump!["Automation Tree"]["ValuePattern.Value"]).toBe(value);
26+
expect(dump!['Automation Tree']['ValuePattern.Value']).toBe(value);
2727
}
2828

2929
describe('Hit Testing', () => {
30-
3130
test('Hit testing child outside the bounds of parents', async () => {
3231
const target = await app.findElementByTestID('visible-overflow-element');
3332

@@ -36,13 +35,13 @@ describe('Hit Testing', () => {
3635

3736
// The webdriverio package computes the offsets from the center point of the target.
3837
// This is within the bounds of the child and the parent, so should hitTest even with overflow:visible
39-
await target.click({ x: -50, y: -50, });
38+
await target.click({x: -50, y: -50});
4039

4140
await verifyElementAccessibiltyValue('visible-overflow-element', 'green');
4241

4342
// The webdriverio package computes the offsets from the center point of the target.
4443
// This is within the bounds of the child, but outside the parents bounds
45-
await target.click({ x: 0, y: 0, });
44+
await target.click({x: 0, y: 0});
4645

4746
// View should still be red, since the click should hit the pressable
4847
await verifyElementAccessibiltyValue('visible-overflow-element', 'red');
@@ -55,15 +54,14 @@ describe('Hit Testing', () => {
5554
await verifyElementAccessibiltyValue('hidden-overflow-element', 'red');
5655

5756
// This is within the bounds of the child and the parent, so should hitTest even with overflow:hidden
58-
await target.click({ x: -50, y: -50, });
57+
await target.click({x: -50, y: -50});
5958

6059
await verifyElementAccessibiltyValue('hidden-overflow-element', 'green');
6160

6261
// This is within the bounds of the child, but shouldn't hit test, since the parent is overflow:hidden
63-
await target.click({ x: 0, y: 0, });
62+
await target.click({x: 0, y: 0});
6463

6564
// View should still be green, since the click shouldn't hit the pressable
6665
await verifyElementAccessibiltyValue('hidden-overflow-element', 'green');
6766
});
68-
6967
});

0 commit comments

Comments
 (0)