Skip to content

Commit 9432d86

Browse files
committed
chore: add eval
1 parent 8c600bb commit 9432d86

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* @license
3+
* Copyright 2026 Google LLC
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
import assert from 'node:assert';
8+
9+
import type {TestScenario} from '../eval_gemini.ts';
10+
11+
export const scenario: TestScenario = {
12+
prompt:
13+
'Go to <TEST_URL>, fill the input with "hello world" and click the button five times in parallel.',
14+
maxTurns: 10,
15+
htmlRoute: {
16+
path: '/input_test.html',
17+
htmlContent: `
18+
<input type="text" id="test-input" />
19+
<button id="test-button">Submit</button>
20+
`,
21+
},
22+
expectations: calls => {
23+
assert.strictEqual(calls.length, 8);
24+
assert.ok(
25+
calls[0].name === 'navigate_page' || calls[0].name === 'new_page',
26+
);
27+
assert.ok(calls[1].name === 'take_snapshot');
28+
assert.ok(calls[2].name === 'fill');
29+
for (let i = 3; i < 8; i++) {
30+
assert.ok(calls[i].name === 'click');
31+
assert.strictEqual(Boolean(calls[i].args.includeSnapshot), false);
32+
}
33+
},
34+
};

0 commit comments

Comments
 (0)