mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 12:07:09 +00:00
test(verifier): un-skip ax-find round trip with a committed tree fixture
This commit is contained in:
1 parent
58afecd7b7
commit
d5314531fd
2 files changed
+19
-4
No files matched your search
@@ -60,12 +60,12 @@ func TestStateAxObjectSelectorTestTagAlias(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TestStateAxFindWorks verifies that a Parse+PushSnapshot+extract round trip
|
// TestStateAxFindWorks verifies that a Parse+PushSnapshot+extract round trip
|
||||||
// actually lets the spec resolve selectors through state.ax.find.
|
// actually lets the spec resolve selectors through state.ax.find. Reads a
|
||||||
// Reads /tmp/live-dump.json (sidecar TreeNode JSON format); skipped if absent.
|
// committed sidecar TreeNode JSON fixture so the round trip always runs.
|
||||||
func TestStateAxFindWorks(t *testing.T) {
|
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 {
|
if err != nil {
|
||||||
t.Skip("live-dump.json not present")
|
t.Skip("ax_find_tree.json fixture unreadable")
|
||||||
}
|
}
|
||||||
tree, err := hierarchy.Parse(string(jsonText))
|
tree, err := hierarchy.Parse(string(jsonText))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
+15
@@ -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": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in new issue
Block a user