Skip to content

Commit 22077c3

Browse files
authored
Add Visual Tree Dump Testing to E2E Test App on Fabric (#12322)
* Add Entry for Visual Tree * Update Snapshots * Adjust Code * Save State: Grab Root Visual Properties * Add Comments to Tree, Comments are TestId * Save State: Working Visual Tree Dump Tests * Fix Code * Remove Unneeded * Format * Change files * Cleanup * Remove Unneeded * Save State * Fix for WinAppSDK Changes * Remove Unneeded * Format * Remove Size * Edit Snapshots * Test Fixed Size * Fix Dumps
1 parent 7d579a3 commit 22077c3

29 files changed

+32437
-4928
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": "Save State: Working Visual Tree Dump Tests",
4+
"packageName": "react-native-windows",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
1313
beforeAll(async () => {
1414
// If window is partially offscreen, tests will fail to click on certain elements
1515
await app.setWindowPosition(0, 0);
16+
await app.setWindowSize(1000, 1250);
1617
await goToComponentExample('Button');
1718
});
1819

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ afterEach(async () => {
3636
beforeAll(async () => {
3737
// If window is partially offscreen, tests will fail to click on certain elements
3838
await app.setWindowPosition(0, 0);
39+
await app.setWindowSize(1000, 1250);
3940
});
4041

4142
describe('Home UIA Tree Dump', () => {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
1313
beforeAll(async () => {
1414
// If window is partially offscreen, tests will fail to click on certain elements
1515
await app.setWindowPosition(0, 0);
16+
await app.setWindowSize(1000, 1250);
1617
await goToComponentExample('Pressable');
1718
});
1819

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
1313
beforeAll(async () => {
1414
// If window is partially offscreen, tests will fail to click on certain elements
1515
await app.setWindowPosition(0, 0);
16+
await app.setWindowSize(1000, 1250);
1617
await goToComponentExample('ScrollView');
1718
});
1819

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
1313
beforeAll(async () => {
1414
// If window is partially offscreen, tests will fail to click on certain elements
1515
await app.setWindowPosition(0, 0);
16+
await app.setWindowSize(1000, 1250);
1617
await goToComponentExample('Text');
1718
});
1819

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
1313
beforeAll(async () => {
1414
// If window is partially offscreen, tests will fail to click on certain elements
1515
await app.setWindowPosition(0, 0);
16+
await app.setWindowSize(1000, 1250);
1617
await goToComponentExample('TextInput');
1718
});
1819

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
1313
beforeAll(async () => {
1414
// If window is partially offscreen, tests will fail to click on certain elements
1515
await app.setWindowPosition(0, 0);
16+
await app.setWindowSize(1000, 1250);
1617
await goToComponentExample('Touchable* and onPress');
1718
});
1819

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {verifyNoErrorLogs} from './Helpers';
1313
beforeAll(async () => {
1414
// If window is partially offscreen, tests will fail to click on certain elements
1515
await app.setWindowPosition(0, 0);
16+
await app.setWindowSize(1000, 1250);
1617
await goToComponentExample('View');
1718
});
1819

0 commit comments

Comments
 (0)