Skip to content

Commit

Permalink
Add Visual Tree Dump Testing to E2E Test App on Fabric (#12322)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
chiaramooney authored Nov 14, 2023
1 parent 7d579a3 commit 22077c3
Show file tree
Hide file tree
Showing 29 changed files with 32,437 additions and 4,928 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Save State: Working Visual Tree Dump Tests",
"packageName": "react-native-windows",
"email": "34109996+chiaramooney@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
beforeAll(async () => {
// If window is partially offscreen, tests will fail to click on certain elements
await app.setWindowPosition(0, 0);
await app.setWindowSize(1000, 1250);
await goToComponentExample('Button');
});

Expand Down
1 change: 1 addition & 0 deletions packages/e2e-test-app-fabric/test/HomeUIADump.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ afterEach(async () => {
beforeAll(async () => {
// If window is partially offscreen, tests will fail to click on certain elements
await app.setWindowPosition(0, 0);
await app.setWindowSize(1000, 1250);
});

describe('Home UIA Tree Dump', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
beforeAll(async () => {
// If window is partially offscreen, tests will fail to click on certain elements
await app.setWindowPosition(0, 0);
await app.setWindowSize(1000, 1250);
await goToComponentExample('Pressable');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
beforeAll(async () => {
// If window is partially offscreen, tests will fail to click on certain elements
await app.setWindowPosition(0, 0);
await app.setWindowSize(1000, 1250);
await goToComponentExample('ScrollView');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
beforeAll(async () => {
// If window is partially offscreen, tests will fail to click on certain elements
await app.setWindowPosition(0, 0);
await app.setWindowSize(1000, 1250);
await goToComponentExample('Text');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
beforeAll(async () => {
// If window is partially offscreen, tests will fail to click on certain elements
await app.setWindowPosition(0, 0);
await app.setWindowSize(1000, 1250);
await goToComponentExample('TextInput');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {app} from '@react-native-windows/automation';
beforeAll(async () => {
// If window is partially offscreen, tests will fail to click on certain elements
await app.setWindowPosition(0, 0);
await app.setWindowSize(1000, 1250);
await goToComponentExample('Touchable* and onPress');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {verifyNoErrorLogs} from './Helpers';
beforeAll(async () => {
// If window is partially offscreen, tests will fail to click on certain elements
await app.setWindowPosition(0, 0);
await app.setWindowSize(1000, 1250);
await goToComponentExample('View');
});

Expand Down
Loading

0 comments on commit 22077c3

Please sign in to comment.