Skip to content

Commit ef1dbaa

Browse files
committed
fix: normalize fixture canary visibility
1 parent fe123c0 commit ef1dbaa

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

‎test/integration/android-emulator-e2e/live-automation-scenario.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ export async function assertAutomationSystem(context: LiveContext): Promise<void
164164
verifyCommand(context, C.alert, 'alert wait/get/dismiss/accept produce fixture-visible results');
165165

166166
await assertHomeAndRecentsRestoration(context);
167+
await runStep(context, 'reveal Android alert canary for diff baseline', ['scroll', 'down', '1']);
167168
await runStep(context, 'establish automation diff baseline', ['snapshot', '-i']);
168169
await runStep(context, 'return from automation route with Back', ['back']);
169170
const diff = await runStep(context, 'observe automation-to-settings diff', [

‎test/integration/ios-simulator-e2e/live-automation-scenario.ts‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,25 @@ export async function assertAutomationInput(context: LiveContext): Promise<void>
114114
verifyCommand(context, C.find, 'find reports the automation heading');
115115

116116
await assertElementTextAfterScrolling(context, 'id="automation-press"', 'Press canary');
117-
for (const identifier of ['automation-press', 'automation-longpress']) {
118-
const inputVisible = await runStep(context, `assert ${identifier} is visible`, [
119-
'is',
120-
'visible',
121-
`id="${identifier}"`,
122-
]);
123-
assert.equal(inputVisible.json?.data?.pass, true, JSON.stringify(inputVisible.json));
124-
}
117+
const pressVisible = await runStep(context, 'assert automation-press is visible', [
118+
'is',
119+
'visible',
120+
'id="automation-press"',
121+
]);
122+
assert.equal(pressVisible.json?.data?.pass, true, JSON.stringify(pressVisible.json));
125123

126124
await runStep(context, 'press semantic canary', ['press', 'id="automation-press"']);
127125
await assertWaitText(context, 'Last input: press');
128126
verifyCommand(context, C.press, 'semantic press changes the durable fixture canary');
129127

128+
await assertElementTextAfterScrolling(context, 'id="automation-longpress"', 'Long press canary');
129+
const longPressVisible = await runStep(context, 'assert automation-longpress is visible', [
130+
'is',
131+
'visible',
132+
'id="automation-longpress"',
133+
]);
134+
assert.equal(longPressVisible.json?.data?.pass, true, JSON.stringify(longPressVisible.json));
135+
130136
await runStep(context, 'long press semantic canary', [
131137
'longpress',
132138
'id="automation-longpress"',

0 commit comments

Comments
 (0)