Skip to content

Commit 3cdd72c

Browse files
committed
Update snapshots and fix lint error
1 parent 2c9c946 commit 3cdd72c

4 files changed

Lines changed: 145 additions & 25 deletions

File tree

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* @format
66
*/
77

8-
import { dumpVisualTree } from '@react-native-windows/automation-commands';
98
import { goToApiExample } from './RNTesterNavigation';
109
import { verifyNoErrorLogs } from './Helpers';
1110
import { app } from '@react-native-windows/automation';

packages/e2e-test-app-fabric/test/__snapshots__/HomeUIADump.test.ts.snap

Lines changed: 87 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4709,6 +4709,87 @@ exports[`Home UIA Tree Dump Pointer Button 1`] = `
47094709
}
47104710
`;
47114711

4712+
exports[`Home UIA Tree Dump Pointer Clicks 1`] = `
4713+
{
4714+
"Automation Tree": {
4715+
"AutomationId": "Pointer Clicks",
4716+
"ControlType": 50026,
4717+
"IsKeyboardFocusable": true,
4718+
"LocalizedControlType": "group",
4719+
"Name": "Pointer Clicks Tests that onClick and onAuxClick work.",
4720+
"__Children": [
4721+
{
4722+
"AutomationId": "",
4723+
"ControlType": 50020,
4724+
"LocalizedControlType": "text",
4725+
"Name": "Pointer Clicks",
4726+
"TextRangePattern.GetText": "Pointer Clicks",
4727+
},
4728+
{
4729+
"AutomationId": "",
4730+
"ControlType": 50020,
4731+
"LocalizedControlType": "text",
4732+
"Name": "Tests that onClick and onAuxClick work.",
4733+
"TextRangePattern.GetText": "Tests that onClick and onAuxClick work.",
4734+
},
4735+
],
4736+
},
4737+
"Component Tree": {
4738+
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
4739+
"_Props": {
4740+
"AccessibilityLabel": "Pointer Clicks Tests that onClick and onAuxClick work.",
4741+
"TestId": "Pointer Clicks",
4742+
},
4743+
"__Children": [
4744+
{
4745+
"Type": "Microsoft.ReactNative.Composition.ParagraphComponentView",
4746+
"_Props": {},
4747+
},
4748+
{
4749+
"Type": "Microsoft.ReactNative.Composition.ParagraphComponentView",
4750+
"_Props": {},
4751+
},
4752+
],
4753+
},
4754+
"Visual Tree": {
4755+
"Brush": {
4756+
"Brush Type": "ColorBrush",
4757+
"Color": "rgba(255, 255, 255, 255)",
4758+
},
4759+
"Comment": "Pointer Clicks",
4760+
"Offset": "0, 0, 0",
4761+
"Size": "966, 78",
4762+
"Visual Type": "SpriteVisual",
4763+
"__Children": [
4764+
{
4765+
"Offset": "16, 16, 0",
4766+
"Size": "106, 25",
4767+
"Visual Type": "SpriteVisual",
4768+
"__Children": [
4769+
{
4770+
"Offset": "0, 0, 0",
4771+
"Size": "106, 25",
4772+
"Visual Type": "SpriteVisual",
4773+
},
4774+
],
4775+
},
4776+
{
4777+
"Offset": "16, 45, 0",
4778+
"Size": "934, 17",
4779+
"Visual Type": "SpriteVisual",
4780+
"__Children": [
4781+
{
4782+
"Offset": "0, 0, 0",
4783+
"Size": "934, 17",
4784+
"Visual Type": "SpriteVisual",
4785+
},
4786+
],
4787+
},
4788+
],
4789+
},
4790+
}
4791+
`;
4792+
47124793
exports[`Home UIA Tree Dump Pointer Events 1`] = `
47134794
{
47144795
"Automation Tree": {
@@ -4758,7 +4839,7 @@ exports[`Home UIA Tree Dump Pointer Events 1`] = `
47584839
},
47594840
"Comment": "Pointer Events",
47604841
"Offset": "0, 0, 0",
4761-
"Size": "966, 78",
4842+
"Size": "966, 77",
47624843
"Visual Type": "SpriteVisual",
47634844
"__Children": [
47644845
{
@@ -5001,7 +5082,7 @@ exports[`Home UIA Tree Dump RTLExample 1`] = `
50015082
},
50025083
"Comment": "RTLExample",
50035084
"Offset": "0, 0, 0",
5004-
"Size": "966, 77",
5085+
"Size": "966, 78",
50055086
"Visual Type": "SpriteVisual",
50065087
"__Children": [
50075088
{
@@ -6412,12 +6493,12 @@ exports[`Home UIA Tree Dump TurboModule 1`] = `
64126493
"__Children": [
64136494
{
64146495
"Offset": "16, 16, 0",
6415-
"Size": "109, 25",
6496+
"Size": "109, 24",
64166497
"Visual Type": "SpriteVisual",
64176498
"__Children": [
64186499
{
64196500
"Offset": "0, 0, 0",
6420-
"Size": "109, 25",
6501+
"Size": "109, 24",
64216502
"Visual Type": "SpriteVisual",
64226503
},
64236504
],
@@ -6493,12 +6574,12 @@ exports[`Home UIA Tree Dump URL 1`] = `
64936574
"__Children": [
64946575
{
64956576
"Offset": "16, 16, 0",
6496-
"Size": "32, 24",
6577+
"Size": "32, 25",
64976578
"Visual Type": "SpriteVisual",
64986579
"__Children": [
64996580
{
65006581
"Offset": "0, 0, 0",
6501-
"Size": "32, 24",
6582+
"Size": "32, 25",
65026583
"Visual Type": "SpriteVisual",
65036584
},
65046585
],

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ exports[`Pointer onClick Test onAuxClick reports correct native event properties
66
"pressure": 0,
77
"pointerType": "mouse",
88
"clientX": 110,
9-
"clientY": 166,
9+
"clientY": 165,
1010
"x": 110,
11-
"y": 166,
11+
"y": 165,
1212
"pageX": 110,
13-
"pageY": 166,
13+
"pageY": 165,
1414
"screenX": 100,
15-
"screenY": 100,
15+
"screenY": 99,
1616
"offsetX": 100,
17-
"offsetY": 100,
17+
"offsetY": 99,
1818
"width": 0,
1919
"height": 0,
2020
"tiltX": 0,
@@ -29,7 +29,7 @@ exports[`Pointer onClick Test onAuxClick reports correct native event properties
2929
"metaKey": false,
3030
"isPrimary": true,
3131
"button": 1,
32-
"target": 1276
32+
"target": 1272
3333
}"
3434
`;
3535

@@ -39,15 +39,15 @@ exports[`Pointer onClick Test onAuxClick reports correct native event properties
3939
"pressure": 0,
4040
"pointerType": "mouse",
4141
"clientX": 110,
42-
"clientY": 166,
42+
"clientY": 165,
4343
"x": 110,
44-
"y": 166,
44+
"y": 165,
4545
"pageX": 110,
46-
"pageY": 166,
46+
"pageY": 165,
4747
"screenX": 100,
48-
"screenY": 100,
48+
"screenY": 99,
4949
"offsetX": 100,
50-
"offsetY": 100,
50+
"offsetY": 99,
5151
"width": 0,
5252
"height": 0,
5353
"tiltX": 0,
@@ -62,7 +62,7 @@ exports[`Pointer onClick Test onAuxClick reports correct native event properties
6262
"metaKey": false,
6363
"isPrimary": true,
6464
"button": 2,
65-
"target": 1276
65+
"target": 1272
6666
}"
6767
`;
6868

@@ -72,15 +72,15 @@ exports[`Pointer onClick Test onClick reports correct native event properties on
7272
"pressure": 0,
7373
"pointerType": "mouse",
7474
"clientX": 110,
75-
"clientY": 166,
75+
"clientY": 165,
7676
"x": 110,
77-
"y": 166,
77+
"y": 165,
7878
"pageX": 110,
79-
"pageY": 166,
79+
"pageY": 165,
8080
"screenX": 100,
81-
"screenY": 100,
81+
"screenY": 99,
8282
"offsetX": 100,
83-
"offsetY": 100,
83+
"offsetY": 99,
8484
"width": 0,
8585
"height": 0,
8686
"tiltX": 0,
@@ -95,6 +95,6 @@ exports[`Pointer onClick Test onClick reports correct native event properties on
9595
"metaKey": false,
9696
"isPrimary": true,
9797
"button": 0,
98-
"target": 1276
98+
"target": 1272
9999
}"
100100
`;

packages/e2e-test-app-fabric/test/__snapshots__/snapshotPages.test.js.snap

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36053,6 +36053,46 @@ exports[`snapshotAllPages Pointer Button 2`] = `
3605336053
</View>
3605436054
`;
3605536055

36056+
exports[`snapshotAllPages Pointer Clicks 1`] = `
36057+
<View>
36058+
<View
36059+
accessible={true}
36060+
onAuxClick={[Function]}
36061+
onClick={[Function]}
36062+
style={
36063+
[
36064+
{
36065+
"alignItems": "center",
36066+
"borderRadius": 10,
36067+
"height": 200,
36068+
"justifyContent": "center",
36069+
"margin": 10,
36070+
"width": 200,
36071+
},
36072+
{
36073+
"backgroundColor": "gray",
36074+
},
36075+
]
36076+
}
36077+
testID="pointer-click-target"
36078+
/>
36079+
<Text
36080+
accessible={true}
36081+
style={
36082+
[
36083+
{
36084+
"color": "#000000ff",
36085+
},
36086+
undefined,
36087+
]
36088+
}
36089+
testID="pointer-click-text"
36090+
>
36091+
onClick should cause the box to go red, onAuxClick will cause it go green
36092+
</Text>
36093+
</View>
36094+
`;
36095+
3605636096
exports[`snapshotAllPages Pointer Events 1`] = `
3605736097
<View>
3605836098
<View

0 commit comments

Comments
 (0)