qwen-code/integration-tests/terminal-capture/scenarios/message-components.ts
tanzhenxin 01ed2a7b1f test(terminal-capture): add message-components scenario for PR #2120
Add test scenario to verify message component prefixes display correctly:
- Info message prefix (● filled circle)
- Error message prefix (✕)
- User message prefix (>)
- Assistant message prefix (✦)

Also refactors GIF generation to scenario-level for cleaner output.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-05 21:13:13 +08:00

32 lines
1 KiB
TypeScript

import type { ScenarioConfig } from '../scenario-runner.js';
/**
* Tests the message component refactoring for PR #2120.
* Captures info, warning, and error messages to verify proper icon/prefix display.
*
* This scenario tests:
* - Info message prefix (● filled circle)
* - Error message prefix (✕)
* - User message prefix (>)
* - Assistant message prefix (✦)
*/
export default {
name: 'message-components',
spawn: ['node', 'dist/cli.js', '--yolo'],
terminal: { title: 'qwen-code', cwd: '../../..' },
flow: [
// Test info message via /skills command (instant, no streaming)
{ type: '/skills' },
// Test error message via unknown skill (instant, no streaming)
{ type: '/skills nonexistent-skill-xyz' },
// Test user and assistant messages (streams from LLM)
{
type: 'Say "Hello, this is a test of message prefixes!" and nothing else.',
streaming: {
delayMs: 3000,
intervalMs: 1000,
count: 10,
},
},
],
} satisfies ScenarioConfig;