File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ } ;
You can’t perform that action at this time.
0 commit comments