test: 修复单元测试并补充完善 E2E 测试用例
- 修复 5 个单元测试失败:ProviderForm 表单提交超时、ModelForm 初始值检查、 StatsTable Select 交互、ProviderTable 删除确认超时 - 适配 Ant Design 6 的 DOM 结构变化和异步行为 - 补充 E2E 测试从 6 个扩展到 32 个,覆盖供应商 CRUD、模型管理、 表单验证、错误处理、边界情况、用量统计筛选等完整用户流程 - 发现并处理 Ant Design 6 按钮文本渲染带空格的兼容性问题
This commit is contained in:
@@ -117,7 +117,7 @@ describe('ProviderTable', () => {
|
||||
// Assert that onDelete was called with the correct provider ID
|
||||
expect(onDelete).toHaveBeenCalledTimes(1);
|
||||
expect(onDelete).toHaveBeenCalledWith('openai');
|
||||
});
|
||||
}, 10000);
|
||||
|
||||
it('shows loading state', () => {
|
||||
render(<ProviderTable {...defaultProps} loading={true} />);
|
||||
|
||||
Reference in New Issue
Block a user