merge(app): land probe-runs-metrics (run 172)

This commit is contained in:
2026-10-23 01:15:08 +01:00
-22
View File
@@ -195,15 +195,6 @@ try {
deltaY,
}, session);
const scrollUntil = async (text) => {
for (let attempt = 0; attempt < 20; attempt++) {
if ((await semanticText()).includes(text)) return;
await wheel(400);
await delay(180);
}
throw new Error(`Could not scroll to ${JSON.stringify(text)}`);
};
const setSize = async (width, height) => {
await send('Emulation.setDeviceMetricsOverride', {
width,
@@ -325,19 +316,6 @@ try {
captures.push(outputCapture);
await assertOcr(outputCapture, 'answer');
await clickText('Summary');
await scrollUntil('Metrics');
await clickText('Metrics');
await wheel(300);
await delay(300);
const metricsCapture = await capture('i1-runs-phone-detail-metrics');
captures.push(metricsCapture);
// The expanded metrics tile scrolls; the first recorded rows can be above the
// capture, so the probe asserts the rows this viewport shows. The full label
// set is covered by the Summary widget tests.
await assertOcr(metricsCapture, 'Output tokens');
await assertOcr(metricsCapture, 'Reported cost');
// Browser Back/Forward move between the in-app routes, not out of the app.
const path = () => evaluate('location.pathname');
await evaluate('history.back()');