blob: 6afa1551e1ac560c88a1b8d3f03020fcc5ee49ac [file]
// Copyright 2026 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {assert} from 'chai';
import {
setupAndRunEvalApp,
stopEvalApp,
} from '../helpers/ai_eval-helpers.js';
import {describe, it, setup} from '../mocha-interface.js';
describe('Network AI Eval: network-500-server-error', function() {
this.timeout(180_000);
setup({
dockingMode: 'undocked',
enabledFeatures: ['DevToolsAiV2Architecture'],
devToolsSettings: {
'ai-assistance-enabled': true,
'ai-assistance-v2-opt-in-change-dialog-seen': true,
},
evalConfig: {
type: 'network',
label: 'network-500-server-error',
taskId: 'network-500-server-error',
},
});
it('launches app, navigates to initial URL, and executes prompt', async ({inspectedPage, evalTask}) => {
const app = await setupAndRunEvalApp('', 'network-500-server-error');
try {
assert.isDefined(app.config.initialUrl, 'Expected initial_url to be defined in task.textproto');
await inspectedPage.page.goto(app.config.initialUrl, {waitUntil: 'networkidle0'});
await evalTask.executePrompt({
prompts: ['Why is the ad not loading?'],
});
} finally {
await stopEvalApp(app);
}
});
});