VMind icon indicating copy to clipboard operation
VMind copied to clipboard

test: add test case of getChartSpecWithContext when chartType is Venn

Open zjyhhhher opened this issue 7 months ago • 1 comments

🤔 这个分支是...

  • [ ] 新功能
  • [ ] Bug fix
  • [ ] Ts 类型更新
  • [ ] 打包优化
  • [ ] 性能优化
  • [ ] 功能增强
  • [ ] 重构
  • [ ] 依赖版本更新
  • [ ] 代码优化
  • [x] 测试 case 更新
  • [ ] 分支合并
  • [ ] 发布
  • [ ] 网站/文档更新
  • [ ] demo 更新
  • [ ] Workflow
  • [ ] 其他 (具体是什么,请补充?)

🔗 相关 issue 链接

https://github.com/VisActor/VMind/issues/235

🔗 相关的 PR 链接

🐞 Bugserver 用例 id

💡 问题的背景&解决方案

背景

该pr为测试test case生成,主要用于验证当图表类型为Venn Chart时,getChartSpecWithContext函数的正确性,包括检查其生成的spec中的图表类型、数据以及颜色等额外配置。

解决方案

通过单元测试验证Venn图的自动生成逻辑,确保以下核心功能:

  1. 图表类型:确定getChartSpecWithContext函数最后生成的spec.type为venn

  2. ​​数据转换​​:是否可以将将原始表格数据(dataTable)转换为Venn图Spec要求的嵌套结构。

  3. ​​配置完整性​​:

  • colors映射​​:检查颜色数组(color)是否正确传递到图表配置中,确保可视化一致性。 ​​- 数据:验证生成的数据(spec.data)是否与预期模板完全匹配,确保所有集合和交集的值正确映射。

📝 Changelog

Language Changelog
🇺🇸 English Added comprehensive unit tests for Venn Chart specifications
🇨🇳 Chinese 新增韦恩图的单元测试

☑️ 自测

⚠️ 在提交 PR 之前,请检查一下内容. ⚠️

  • [x] 文档提供了,或者更新,或者不需要
  • [x] Demo 提供了,或者更新,或者不需要
  • [x] Ts 类型定义提供了,或者更新,或者不需要
  • [x] Changelog 提供了,或者不需要

🚀 Summary

copilot:summary

🔍 Walkthrough

copilot:walkthrough

zjyhhhher avatar May 27 '25 08:05 zjyhhhher