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+ 'Create a new page <TEST_URL> in an isolated context called contextB. Take a screenshot there.' ,
14+ maxTurns : 3 ,
15+ htmlRoute : {
16+ path : '/test.html' ,
17+ htmlContent : `
18+ <h1>test</h1>
19+ ` ,
20+ } ,
21+ expectations : calls => {
22+ console . log ( JSON . stringify ( calls , null , 2 ) )
23+ assert . strictEqual ( calls . length , 2 ) ;
24+ assert . ok ( calls [ 0 ] . name === 'new_page' , 'First call should be navigation' ) ;
25+ assert . deepStrictEqual ( calls [ 0 ] . args . isolatedContext , "contextB" ) ;
26+ assert . ok ( calls [ 1 ] . name === 'take_screenshot' , 'Second call should be a screenshot' ) ;
27+ } ,
28+ } ;
You can’t perform that action at this time.
0 commit comments