diff --git a/internal/verifier/ax_integration_test.go b/internal/verifier/ax_integration_test.go index e634657..97fd596 100644 --- a/internal/verifier/ax_integration_test.go +++ b/internal/verifier/ax_integration_test.go @@ -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 { diff --git a/internal/verifier/testdata/ax_find_tree.json b/internal/verifier/testdata/ax_find_tree.json new file mode 100644 index 0000000..2dd0ef2 --- /dev/null +++ b/internal/verifier/testdata/ax_find_tree.json @@ -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": [] + } + ] +}