Skip to content

Commit 3163a29

Browse files
authored
Realign view.js (#15310)
* Realign View.js with upstream * Change files * fix * fix * update snapshots
1 parent 94a8154 commit 3163a29

File tree

9 files changed

+379
-315
lines changed

9 files changed

+379
-315
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Realign View.js with upstream",
4+
"packageName": "react-native-windows",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ exports[`Accessibility Tests Accessibility data for Label and Level 1`] = `
88
"HeadingLevel": 80052,
99
"Level": 2,
1010
"LocalizedControlType": "text",
11+
"Name": "A hint for the red box.",
1112
},
1213
"Component Tree": {
1314
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
1415
"_Props": {
16+
"AccessibilityLabel": "A hint for the red box.",
1517
"TestId": "accessibility-base-view-2",
1618
},
1719
},
@@ -44,10 +46,12 @@ exports[`Accessibility Tests Accessibility data for Label,Level and Hint 1`] = `
4446
"ItemType": "comment",
4547
"Level": 1,
4648
"LocalizedControlType": "text",
49+
"Name": "A blue box",
4750
},
4851
"Component Tree": {
4952
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
5053
"_Props": {
54+
"AccessibilityLabel": "A blue box",
5155
"TestId": "accessibility-base-view-1",
5256
},
5357
},
@@ -219,6 +223,7 @@ exports[`Accessibility Tests Elements can set accessibilityState:selected to fal
219223
"ControlType": 50000,
220224
"IsKeyboardFocusable": true,
221225
"LocalizedControlType": "button",
226+
"Name": "Selectable item 1",
222227
"__Children": [
223228
{
224229
"AutomationId": "",
@@ -232,6 +237,7 @@ exports[`Accessibility Tests Elements can set accessibilityState:selected to fal
232237
"Component Tree": {
233238
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
234239
"_Props": {
240+
"AccessibilityLabel": "Selectable item 1",
235241
"TestId": "Selectable item 1",
236242
},
237243
"__Children": [
@@ -275,6 +281,7 @@ exports[`Accessibility Tests Elements can set accessibilityState:selected to tru
275281
"ControlType": 50000,
276282
"IsKeyboardFocusable": true,
277283
"LocalizedControlType": "button",
284+
"Name": "Selectable item 1",
278285
"SelectionItemPattern.IsSelected": true,
279286
"__Children": [
280287
{
@@ -289,6 +296,7 @@ exports[`Accessibility Tests Elements can set accessibilityState:selected to tru
289296
"Component Tree": {
290297
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
291298
"_Props": {
299+
"AccessibilityLabel": "Selectable item 1",
292300
"TestId": "Selectable item 1",
293301
},
294302
"__Children": [
@@ -331,6 +339,7 @@ exports[`Accessibility Tests Selectable items must have a Selection Container. E
331339
"AutomationId": "selection-container",
332340
"ControlType": 50026,
333341
"LocalizedControlType": "group",
342+
"Name": "Selection Container",
334343
"SelectionPattern.CanSelectMultiple": true,
335344
"SelectionPattern.IsSelectionRequired": true,
336345
"__Children": [
@@ -345,6 +354,7 @@ exports[`Accessibility Tests Selectable items must have a Selection Container. E
345354
"ControlType": 50000,
346355
"IsKeyboardFocusable": true,
347356
"LocalizedControlType": "button",
357+
"Name": "Selectable item 1",
348358
"__Children": [
349359
{
350360
"AutomationId": "",
@@ -360,6 +370,7 @@ exports[`Accessibility Tests Selectable items must have a Selection Container. E
360370
"ControlType": 50000,
361371
"IsKeyboardFocusable": true,
362372
"LocalizedControlType": "button",
373+
"Name": "Selectable item 2",
363374
"__Children": [
364375
{
365376
"AutomationId": "",
@@ -375,6 +386,7 @@ exports[`Accessibility Tests Selectable items must have a Selection Container. E
375386
"ControlType": 50000,
376387
"IsKeyboardFocusable": true,
377388
"LocalizedControlType": "button",
389+
"Name": "Selectable item 3",
378390
"__Children": [
379391
{
380392
"AutomationId": "",
@@ -392,6 +404,7 @@ exports[`Accessibility Tests Selectable items must have a Selection Container. E
392404
"Component Tree": {
393405
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
394406
"_Props": {
407+
"AccessibilityLabel": "Selection Container",
395408
"TestId": "selection-container",
396409
},
397410
"__Children": [
@@ -408,6 +421,7 @@ exports[`Accessibility Tests Selectable items must have a Selection Container. E
408421
{
409422
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
410423
"_Props": {
424+
"AccessibilityLabel": "Selectable item 1",
411425
"TestId": "Selectable item 1",
412426
},
413427
"__Children": [
@@ -420,6 +434,7 @@ exports[`Accessibility Tests Selectable items must have a Selection Container. E
420434
{
421435
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
422436
"_Props": {
437+
"AccessibilityLabel": "Selectable item 2",
423438
"TestId": "Selectable item 2",
424439
},
425440
"__Children": [
@@ -432,6 +447,7 @@ exports[`Accessibility Tests Selectable items must have a Selection Container. E
432447
{
433448
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
434449
"_Props": {
450+
"AccessibilityLabel": "Selectable item 3",
435451
"TestId": "Selectable item 3",
436452
},
437453
"__Children": [

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ exports[`Button Tests Buttons can be disabled 1`] = `
77
"ControlType": 50000,
88
"IsEnabled": false,
99
"LocalizedControlType": "button",
10+
"Name": "Press to submit your application!",
1011
"__Children": [
1112
{
1213
"AutomationId": "",
@@ -21,6 +22,7 @@ exports[`Button Tests Buttons can be disabled 1`] = `
2122
"Component Tree": {
2223
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
2324
"_Props": {
25+
"AccessibilityLabel": "Press to submit your application!",
2426
"TestId": "disabled_button",
2527
},
2628
"__Children": [
@@ -154,6 +156,7 @@ exports[`Button Tests Buttons can have accessibility labels 1`] = `
154156
"ControlType": 50000,
155157
"IsKeyboardFocusable": true,
156158
"LocalizedControlType": "button",
159+
"Name": "Press to submit your application!",
157160
"__Children": [
158161
{
159162
"AutomationId": "",
@@ -167,6 +170,7 @@ exports[`Button Tests Buttons can have accessibility labels 1`] = `
167170
"Component Tree": {
168171
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
169172
"_Props": {
173+
"AccessibilityLabel": "Press to submit your application!",
170174
"TestId": "accessibilityLabel_button",
171175
},
172176
"__Children": [
@@ -301,6 +305,7 @@ exports[`Button Tests Buttons can have accessibility props 1`] = `
301305
"HelpText": "Submit Button",
302306
"IsKeyboardFocusable": true,
303307
"LocalizedControlType": "button",
308+
"Name": "Press to submit your application!",
304309
"__Children": [
305310
{
306311
"AutomationId": "",
@@ -314,6 +319,7 @@ exports[`Button Tests Buttons can have accessibility props 1`] = `
314319
"Component Tree": {
315320
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
316321
"_Props": {
322+
"AccessibilityLabel": "Press to submit your application!",
317323
"TestId": "accessibility_props",
318324
},
319325
"__Children": [
@@ -429,6 +435,7 @@ exports[`Button Tests Buttons can have accessibility states 1`] = `
429435
"ControlType": 50000,
430436
"IsEnabled": false,
431437
"LocalizedControlType": "button",
438+
"Name": "Press to submit your application!",
432439
"__Children": [
433440
{
434441
"AutomationId": "",
@@ -443,6 +450,7 @@ exports[`Button Tests Buttons can have accessibility states 1`] = `
443450
"Component Tree": {
444451
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
445452
"_Props": {
453+
"AccessibilityLabel": "Press to submit your application!",
446454
"TestId": "accessibilityState_button",
447455
},
448456
"__Children": [
@@ -576,6 +584,7 @@ exports[`Button Tests Buttons can have custom colors 1`] = `
576584
"ControlType": 50000,
577585
"IsKeyboardFocusable": true,
578586
"LocalizedControlType": "button",
587+
"Name": "Press to cancel your application!",
579588
"__Children": [
580589
{
581590
"AutomationId": "",
@@ -589,6 +598,7 @@ exports[`Button Tests Buttons can have custom colors 1`] = `
589598
"Component Tree": {
590599
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
591600
"_Props": {
601+
"AccessibilityLabel": "Press to cancel your application!",
592602
"TestId": "cancel_button",
593603
},
594604
"__Children": [
@@ -721,6 +731,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 1`]
721731
"Component Tree": {
722732
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
723733
"_Props": {
734+
"AccessibilityLabel": "Press to submit your application!",
724735
"TestId": "accessible_false_button",
725736
},
726737
"__Children": [
@@ -836,6 +847,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`]
836847
"ControlType": 50000,
837848
"IsKeyboardFocusable": true,
838849
"LocalizedControlType": "button",
850+
"Name": "Press to submit your application!",
839851
"__Children": [
840852
{
841853
"AutomationId": "",
@@ -849,6 +861,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`]
849861
"Component Tree": {
850862
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
851863
"_Props": {
864+
"AccessibilityLabel": "Press to submit your application!",
852865
"TestId": "focusable_false_button",
853866
},
854867
"__Children": [
@@ -963,6 +976,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 3`]
963976
"Component Tree": {
964977
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
965978
"_Props": {
979+
"AccessibilityLabel": "Press to submit your application!",
966980
"TestId": "accessible_focusable_false_button",
967981
},
968982
"__Children": [
@@ -1083,6 +1097,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = `
10831097
"ControlType": 50000,
10841098
"IsKeyboardFocusable": true,
10851099
"LocalizedControlType": "button",
1100+
"Name": "Press to cancel your application!",
10861101
"__Children": [
10871102
{
10881103
"AutomationId": "",
@@ -1098,6 +1113,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = `
10981113
"ControlType": 50000,
10991114
"IsKeyboardFocusable": true,
11001115
"LocalizedControlType": "button",
1116+
"Name": "Press to submit your application!",
11011117
"__Children": [
11021118
{
11031119
"AutomationId": "",
@@ -1119,6 +1135,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = `
11191135
{
11201136
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
11211137
"_Props": {
1138+
"AccessibilityLabel": "Press to cancel your application!",
11221139
"TestId": "two_cancel_button",
11231140
},
11241141
"__Children": [
@@ -1135,6 +1152,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = `
11351152
{
11361153
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
11371154
"_Props": {
1155+
"AccessibilityLabel": "Press to submit your application!",
11381156
"TestId": "two_submit_button",
11391157
},
11401158
"__Children": [
@@ -1407,6 +1425,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] =
14071425
"ControlType": 50000,
14081426
"IsKeyboardFocusable": true,
14091427
"LocalizedControlType": "button",
1428+
"Name": "Press to cancel your application!",
14101429
"__Children": [
14111430
{
14121431
"AutomationId": "",
@@ -1422,6 +1441,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] =
14221441
"ControlType": 50000,
14231442
"IsKeyboardFocusable": true,
14241443
"LocalizedControlType": "button",
1444+
"Name": "Press to save your application!",
14251445
"__Children": [
14261446
{
14271447
"AutomationId": "",
@@ -1437,6 +1457,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] =
14371457
"ControlType": 50000,
14381458
"IsKeyboardFocusable": true,
14391459
"LocalizedControlType": "button",
1460+
"Name": "Press to submit your application!",
14401461
"__Children": [
14411462
{
14421463
"AutomationId": "",
@@ -1458,6 +1479,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] =
14581479
{
14591480
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
14601481
"_Props": {
1482+
"AccessibilityLabel": "Press to cancel your application!",
14611483
"TestId": "three_cancel_button",
14621484
},
14631485
"__Children": [
@@ -1474,6 +1496,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] =
14741496
{
14751497
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
14761498
"_Props": {
1499+
"AccessibilityLabel": "Press to save your application!",
14771500
"TestId": "three_save_button",
14781501
},
14791502
"__Children": [
@@ -1490,6 +1513,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] =
14901513
{
14911514
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
14921515
"_Props": {
1516+
"AccessibilityLabel": "Press to submit your application!",
14931517
"TestId": "three_submit_button",
14941518
},
14951519
"__Children": [
@@ -1874,6 +1898,7 @@ exports[`Button Tests Buttons have default styling 1`] = `
18741898
"ControlType": 50000,
18751899
"IsKeyboardFocusable": true,
18761900
"LocalizedControlType": "button",
1901+
"Name": "Press to submit your application!",
18771902
"__Children": [
18781903
{
18791904
"AutomationId": "",
@@ -1887,6 +1912,7 @@ exports[`Button Tests Buttons have default styling 1`] = `
18871912
"Component Tree": {
18881913
"Type": "Microsoft.ReactNative.Composition.ViewComponentView",
18891914
"_Props": {
1915+
"AccessibilityLabel": "Press to submit your application!",
18901916
"TestId": "button_default_styling",
18911917
},
18921918
"__Children": [

0 commit comments

Comments
 (0)