feat(问翻小宝): 增强帮助搜索与会话历史

关键改动:

- 增加问翻小宝会话历史记录规则与测试

- 优化帮助搜索、兜底建议和页面交互结构

- 更新帮助截图资产和截图采集脚本

Co-Authored-By: Codex GPT-5 <codex@openai.com>
This commit is contained in:
Script Generator
2026-07-01 09:20:10 +08:00
parent 8683b341e2
commit e5ce2d221e
20 changed files with 714 additions and 81 deletions

View File

@@ -27,12 +27,42 @@ test('wenfan xiaobao page provides records, chat, and voice input surfaces', ()
assert.match(page, /Mic/);
assert.match(page, /searchHelpArticles/);
assert.match(page, /HelpAnswer/);
assert.match(page, /shouldShowGenericHelpSuggestions/);
assert.match(page, /showGenericSuggestions/);
assert.match(page, /showStarterQuestions/);
assert.match(page, /showGenericSuggestions && message\.suggestions\.length > 0/);
assert.match(page, /createWenfanConversationRecord/);
assert.match(page, /updateWenfanConversationRecord/);
assert.match(page, /deleteWenfanConversationRecord/);
assert.match(page, /删除历史记录/);
assert.doesNotMatch(page, /setHistory\(\(current\) => \[question/);
assert.match(page, /入口路径/);
assert.match(page, /必填字段/);
assert.match(page, /状态流转/);
assert.match(page, /注意事项/);
assert.match(page, /previewImage/);
assert.match(page, /aria-modal="true"/);
assert.match(page, /点击放大/);
assert.match(page, /lg:grid-cols-\[300px_minmax\(0,1fr\)\]/);
assert.match(page, /rounded-\[28px\]/);
assert.doesNotMatch(page, /: 'border-\[var\(--line\)\] bg-\[var\(--bg\)\]/);
assert.match(page, /: 'bg-white hover:bg-\[var\(--bg-subtle\)\]'/);
});
test('wenfan help screenshot script targets version detail tabs and failed test case bug entry', () => {
const script = readFileSync(join(process.cwd(), 'scripts/capture-wenfan-help-screenshots.mjs'), 'utf8');
assert.match(script, /resolveScreenshotContext/);
assert.match(script, /loadDataKey\('test-cases'\)/);
assert.match(script, /loadDataKey\('version-plans'\)/);
assert.match(script, /findFailedTestCase/);
assert.match(script, /findAiReadyProductPlan/);
assert.match(script, /openProductPlanAiEntry/);
assert.match(script, /tabLabel: '关联需求'/);
assert.match(script, /tabLabel: '产品方案'/);
assert.match(script, /tabLabel: '开发任务'/);
assert.match(script, /tabLabel: '测试用例'/);
assert.match(script, /openFailedTestCaseBugEntry/);
assert.match(script, /提 BUG/);
assert.doesNotMatch(script, /\{ file: 'bug-workflow\.png', route: '\/versions' \}/);
});