chromedevtools--chrome-devtools-mcp
aa9a176956
Drive-by: refactor and improve eval scripts.
32 行
795 B
TypeScript
32 行
795 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2026 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import assert from 'node:assert';
|
|
|
|
import type {TestScenario} from '../eval_gemini.ts';
|
|
|
|
export const scenario: TestScenario = {
|
|
prompt:
|
|
'Go to <TEST_URL>, fill the input with "hello world" and click the button.',
|
|
maxTurns: 4,
|
|
htmlRoute: {
|
|
path: '/input_test.html',
|
|
htmlContent: `
|
|
<input type="text" id="test-input" />
|
|
<button id="test-button">Submit</button>
|
|
`,
|
|
},
|
|
expectations: calls => {
|
|
assert.strictEqual(calls.length, 4);
|
|
assert.ok(
|
|
calls[0].name === 'navigate_page' || calls[0].name === 'new_page',
|
|
);
|
|
assert.ok(calls[1].name === 'take_snapshot');
|
|
assert.ok(calls[2].name === 'fill');
|
|
assert.ok(calls[3].name === 'click');
|
|
},
|
|
};
|