merge(app): land probe-runs-metrics (run 172)
This commit is contained in:
@@ -195,15 +195,6 @@ try {
|
|||||||
deltaY,
|
deltaY,
|
||||||
}, session);
|
}, 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) => {
|
const setSize = async (width, height) => {
|
||||||
await send('Emulation.setDeviceMetricsOverride', {
|
await send('Emulation.setDeviceMetricsOverride', {
|
||||||
width,
|
width,
|
||||||
@@ -325,19 +316,6 @@ try {
|
|||||||
captures.push(outputCapture);
|
captures.push(outputCapture);
|
||||||
await assertOcr(outputCapture, 'answer');
|
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.
|
// Browser Back/Forward move between the in-app routes, not out of the app.
|
||||||
const path = () => evaluate('location.pathname');
|
const path = () => evaluate('location.pathname');
|
||||||
await evaluate('history.back()');
|
await evaluate('history.back()');
|
||||||
|
|||||||
Reference in New Issue
Block a user