Skip to content

Commit c772c16

Browse files
committed
test(snapshot): cover nested cumulative clipping
1 parent 7e2d344 commit c772c16

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

‎contracts/fixtures/snapshot-presentation-conformance.json‎

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,20 @@
2727
},
2828
{
2929
"index": 2,
30-
"type": "Button",
31-
"label": "Partially visible",
32-
"rect": { "x": 150, "y": 80, "width": 100, "height": 40 },
30+
"type": "ScrollView",
31+
"label": "Inner",
32+
"rect": { "x": 80, "y": 60, "width": 100, "height": 80 },
3333
"depth": 2,
3434
"parentIndex": 1,
35+
"hittable": false
36+
},
37+
{
38+
"index": 3,
39+
"type": "Button",
40+
"label": "Partially visible",
41+
"rect": { "x": 150, "y": 110, "width": 100, "height": 60 },
42+
"depth": 3,
43+
"parentIndex": 2,
3544
"hittable": true
3645
}
3746
],
@@ -51,10 +60,17 @@
5160
"hittable": false
5261
},
5362
{
54-
"label": "Partially visible",
55-
"rect": { "x": 150, "y": 80, "width": 46, "height": 40 },
63+
"label": "Inner",
64+
"rect": { "x": 80, "y": 60, "width": 100, "height": 80 },
5665
"depth": 2,
5766
"parentIndex": 1,
67+
"hittable": false
68+
},
69+
{
70+
"label": "Partially visible",
71+
"rect": { "x": 150, "y": 110, "width": 30, "height": 30 },
72+
"depth": 3,
73+
"parentIndex": 2,
5874
"hittable": true
5975
}
6076
]

‎src/platforms/android/__tests__/snapshot-presentation-conformance.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function conformanceXml(fixture: ConformanceFixture, nodes: ConformanceNode[]):
7373
return lines.join('\n');
7474
}
7575

76-
test('Android presentation matches the shared RawAXNode to Presented fixture', () => {
76+
test('Android XML parsing and presentation match the shared acquisition-to-presentation fixture', () => {
7777
const fixture = JSON.parse(fs.readFileSync(TABLE_PATH, 'utf8')) as ConformanceFixture;
7878
assert.equal(fixture.version, 1);
7979
assert.ok(fixture.cases.length > 0);

0 commit comments

Comments
 (0)