test: update all the eval scenarios to work with experimentalPageIdRouting flag (#2085)
Refs #2052 This change updates all the eval scenarios so that they work with and without experimentalPageIdRouting flag Co-authored-by: Samiya Caur <samiyac@chromium.org>
这个提交包含在:
@@ -10,7 +10,7 @@ import type {TestScenario} from '../eval_gemini.ts';
|
||||
|
||||
export const scenario: TestScenario = {
|
||||
prompt: 'Navigate to <TEST_URL> and check the console messages.',
|
||||
maxTurns: 2,
|
||||
maxTurns: 3,
|
||||
htmlRoute: {
|
||||
path: '/console_test.html',
|
||||
htmlContent: `
|
||||
@@ -20,16 +20,12 @@ export const scenario: TestScenario = {
|
||||
</script>
|
||||
`,
|
||||
},
|
||||
expectations: calls => {
|
||||
assert.strictEqual(calls.length, 2);
|
||||
assert.ok(
|
||||
calls[0].name === 'navigate_page' || calls[0].name === 'new_page',
|
||||
'First call should be navigation',
|
||||
);
|
||||
assert.strictEqual(
|
||||
calls[1].name,
|
||||
expectations: result => {
|
||||
const pageId = result.consumePageNavigation();
|
||||
assert.strictEqual(result.remainingCalls.length, 1);
|
||||
result.assertNextCall(
|
||||
'list_console_messages',
|
||||
'Second call should be list_console_messages',
|
||||
result.hasPageIdRouting ? {pageId} : undefined,
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
在新工单中引用