test(verifier): un-skip ax-find round trip with a committed tree fixture

This commit is contained in:
pj committed 2026-06-06 13:02:38 +05:30
1 parent 58afecd7b7
commit d5314531fd
2 files changed
+19 -4

No files matched your search

+4 -4
View File
@@ -60,12 +60,12 @@ func TestStateAxObjectSelectorTestTagAlias(t *testing.T) {
}
// TestStateAxFindWorks verifies that a Parse+PushSnapshot+extract round trip
// actually lets the spec resolve selectors through state.ax.find.
// Reads /tmp/live-dump.json (sidecar TreeNode JSON format); skipped if absent.
// actually lets the spec resolve selectors through state.ax.find. Reads a
// committed sidecar TreeNode JSON fixture so the round trip always runs.
func TestStateAxFindWorks(t *testing.T) {
jsonText, err := os.ReadFile("/tmp/live-dump.json")
jsonText, err := os.ReadFile("testdata/ax_find_tree.json")
if err != nil {
t.Skip("live-dump.json not present")
t.Skip("ax_find_tree.json fixture unreadable")
}
tree, err := hierarchy.Parse(string(jsonText))
if err != nil {
+15
View File
@@ -0,0 +1,15 @@
{
"attributes": {"resource-id": "com.example:id/root", "bounds": "[0,0,1080,2340]"},
"children": [
{
"attributes": {"resource-id": "com.example:id/header", "bounds": "[0,0,1080,200]"},
"children": []
},
{
"attributes": {"resource-id": "com.example:id/select_language", "text": "Select language", "bounds": "[40,400,1040,520]"},
"clickable": true,
"enabled": true,
"children": []
}
]
}