Skip to content

Commit c617506

Browse files
committed
chore: oxfmt the selector-evidence test files
1 parent d181c1a commit c617506

2 files changed

Lines changed: 50 additions & 16 deletions

File tree

‎src/replay/__tests__/target-identity-classification.test.ts‎

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,72 @@ import { classifyTargetBindingMatch } from '../target-identity.ts';
77

88
test('classifyTargetBindingMatch path 2: matchCount 0 is unverifiable (selector-miss)', () => {
99
const result = classifyTargetBindingMatch({
10-
winnerRef: 'e1', matchedRefs: [], identitySetRefs: [], siblingMatchRefs: [],
11-
regionMemberRefs: undefined, viewportCandidateRef: undefined,
10+
winnerRef: 'e1',
11+
matchedRefs: [],
12+
identitySetRefs: [],
13+
siblingMatchRefs: [],
14+
regionMemberRefs: undefined,
15+
viewportCandidateRef: undefined,
1216
});
1317
assert.deepEqual(result, { path: 2, outcome: 'unverifiable', reason: 'selector-miss' });
1418
});
1519

1620
test('classifyTargetBindingMatch path 3: empty identity set is unverifiable', () => {
1721
const result = classifyTargetBindingMatch({
18-
winnerRef: 'e1', matchedRefs: ['e1'], identitySetRefs: [], siblingMatchRefs: [],
19-
regionMemberRefs: undefined, viewportCandidateRef: undefined,
22+
winnerRef: 'e1',
23+
matchedRefs: ['e1'],
24+
identitySetRefs: [],
25+
siblingMatchRefs: [],
26+
regionMemberRefs: undefined,
27+
viewportCandidateRef: undefined,
2028
});
2129
assert.deepEqual(result, { path: 3, outcome: 'unverifiable', reason: 'identity-set-empty' });
2230
});
2331

2432
test('classifyTargetBindingMatch path 4: unique identity-set member equal to winner is verified', () => {
2533
const result = classifyTargetBindingMatch({
26-
winnerRef: 'e1', matchedRefs: ['e1'], identitySetRefs: ['e1'], siblingMatchRefs: ['e1'],
27-
regionMemberRefs: undefined, viewportCandidateRef: undefined,
34+
winnerRef: 'e1',
35+
matchedRefs: ['e1'],
36+
identitySetRefs: ['e1'],
37+
siblingMatchRefs: ['e1'],
38+
regionMemberRefs: undefined,
39+
viewportCandidateRef: undefined,
2840
});
2941
assert.deepEqual(result, { path: 4, outcome: 'verified' });
3042
});
3143

3244
test('classifyTargetBindingMatch path 5: unique identity-set member that is not the winner is unverifiable', () => {
3345
const result = classifyTargetBindingMatch({
34-
winnerRef: 'e1', matchedRefs: ['e1'], identitySetRefs: ['e9'], siblingMatchRefs: [],
35-
regionMemberRefs: undefined, viewportCandidateRef: undefined,
46+
winnerRef: 'e1',
47+
matchedRefs: ['e1'],
48+
identitySetRefs: ['e9'],
49+
siblingMatchRefs: [],
50+
regionMemberRefs: undefined,
51+
viewportCandidateRef: undefined,
3652
});
3753
assert.deepEqual(result, { path: 5, outcome: 'unverifiable', reason: 'unique-but-wrong' });
3854
});
3955

4056
test('classifyTargetBindingMatch path 6: duplicate identity resolved by a unique sibling match', () => {
4157
const result = classifyTargetBindingMatch({
42-
winnerRef: 'e1', matchedRefs: ['e1', 'e2'], identitySetRefs: ['e1', 'e2'],
43-
siblingMatchRefs: ['e1'], regionMemberRefs: undefined, viewportCandidateRef: undefined,
58+
winnerRef: 'e1',
59+
matchedRefs: ['e1', 'e2'],
60+
identitySetRefs: ['e1', 'e2'],
61+
siblingMatchRefs: ['e1'],
62+
regionMemberRefs: undefined,
63+
viewportCandidateRef: undefined,
4464
});
4565
assert.deepEqual(result, { path: 6, outcome: 'verified' });
4666
});
4767

4868
test('classifyTargetBindingMatch path 6: viewport order resolves repeated sibling ordinals', () => {
4969
const result = classifyTargetBindingMatch({
50-
winnerRef: 'e1', matchedRefs: ['e1', 'e2'], identitySetRefs: ['e1', 'e2'],
51-
siblingMatchRefs: ['e1', 'e2'], regionMemberRefs: ['e2', 'e1'], viewportCandidateRef: 'e1',
70+
winnerRef: 'e1',
71+
matchedRefs: ['e1', 'e2'],
72+
identitySetRefs: ['e1', 'e2'],
73+
siblingMatchRefs: ['e1', 'e2'],
74+
regionMemberRefs: ['e2', 'e1'],
75+
viewportCandidateRef: 'e1',
5276
});
5377
assert.deepEqual(result, { path: 6, outcome: 'verified' });
5478
});
@@ -59,8 +83,12 @@ test('classifyTargetBindingMatch path 6: unavailable or out-of-range viewport ev
5983
[['e1', 'e2'], undefined],
6084
] as const) {
6185
const result = classifyTargetBindingMatch({
62-
winnerRef: 'e1', matchedRefs: ['e1', 'e2'], identitySetRefs: ['e1', 'e2'],
63-
siblingMatchRefs: ['e1', 'e2'], regionMemberRefs, viewportCandidateRef,
86+
winnerRef: 'e1',
87+
matchedRefs: ['e1', 'e2'],
88+
identitySetRefs: ['e1', 'e2'],
89+
siblingMatchRefs: ['e1', 'e2'],
90+
regionMemberRefs,
91+
viewportCandidateRef,
6492
});
6593
assert.deepEqual(result, { path: 6, outcome: 'unverifiable', reason: 'no-signal-isolation' });
6694
}
@@ -72,7 +100,10 @@ test('classifyTargetBindingMatch path 6: a signal isolating a different node tha
72100
{ siblingMatchRefs: ['e2'], regionMemberRefs: ['e1', 'e2'], viewportCandidateRef: 'e1' },
73101
]) {
74102
const result = classifyTargetBindingMatch({
75-
winnerRef: 'e1', matchedRefs: ['e1', 'e2'], identitySetRefs: ['e1', 'e2'], ...params,
103+
winnerRef: 'e1',
104+
matchedRefs: ['e1', 'e2'],
105+
identitySetRefs: ['e1', 'e2'],
106+
...params,
76107
});
77108
assert.deepEqual(result, { path: 6, outcome: 'unverifiable', reason: 'signal-isolated-wrong' });
78109
}

‎test/integration/interaction-contract/direct-ios-selector.contract.test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ test('recorded simple iOS selector click and fill use runtime resolution and per
9797
const actions = daemon
9898
.session()
9999
?.actions.filter((action) => action.command === 'click' || action.command === 'fill');
100-
assert.deepEqual(actions?.map((action) => action.command), ['click', 'fill']);
100+
assert.deepEqual(
101+
actions?.map((action) => action.command),
102+
['click', 'fill'],
103+
);
101104
const targetIdentities = actions?.map((action) => {
102105
const evidence = action.targetEvidence as Record<string, unknown> | undefined;
103106
return {

0 commit comments

Comments
 (0)