tdesign-vue icon indicating copy to clipboard operation
tdesign-vue copied to clipboard

组件测试覆盖率提升

Open xiaosansiji opened this issue 2 years ago • 9 comments

说明

本仓库中组件代码有很多与 vue next 仓库公用,大部分测试用例代码也能复用,区别在于 vue next 已经改用 Vitest 编写用例,本仓库因为 @vitejs/plugin-vue2 只兼容到 vue 2.7.x 版本,还在使用 Jest 写用例。 因此建议认领的同学同时负责 vue2 与 vue next 两个仓库中对应组件的测试用例编写任务,如果你更熟悉 Jest 可以参照 官方迁移指南 来学习如何使用 Vitest。

  1. 遵循 TDesign 单元测试规范 进行单测开发
  2. 参与贡献请在此 issue 中评论领取的组件,建议也在 vue next 仓库对应 issue 中评论,防止其他同学重复投入
  3. 提交 PR 前请先本地确认该组件行、函数覆盖率达80%+

组件

  • [x] button
  • [x] link
  • [x] space

布局

  • [x] grid
  • [x] layout

导航

  • [x] affix
  • [x] anchor
  • [x] breadcrumb
  • [x] dropdown @james-curtis https://github.com/Tencent/tdesign-vue/pull/1516
  • [x] jumper @HelKyle https://github.com/Tencent/tdesign-vue/pull/1511
  • [x] pagination @HelKyle https://github.com/Tencent/tdesign-vue/pull/1522
  • [x] steps
  • [ ] tabs

输入

  • [ ] cascader
  • [x] checkbox
  • [ ] color-picker
  • [ ] date-picker
  • [ ] form
  • [ ] input
  • [x] input-adornment
  • [x] input-number
  • [x] radio
  • [ ] select
  • [ ] select-input
  • [ ] slider
  • [ ] switch
  • [ ] tag-input
  • [x] textarea
  • [x] transfer
  • [ ] time-picker @uyarn
  • [ ] tree-select
  • [ ] upload

数据展示

  • [x] avatar
  • [x] badge
  • [x] calendar
  • [x] card
  • [x] collapse @isanxia https://github.com/Tencent/tdesign-vue/pull/1536
  • [x] comment
  • [x] list
  • [ ] loading @uyarn
  • [x] progress
  • [x] skeleton
  • [ ] swiper
  • [ ] table
  • [x] tag
  • [ ] tooltip
  • [ ] tree

消息提醒

  • [x] alert
  • [ ] dialog
  • [ ] drawer
  • [ ] message
  • [ ] notification
  • [x] pop-confirm
  • [ ] popup

common

tdesign-common 仓库下还有部分共享的组件代码,主要是 hooks 或 utils 方法,编写用例时也请附带完善这些代码的测试用例

xiaosansiji avatar Aug 30 '22 08:08 xiaosansiji

认领 loading & timepicker

uyarn avatar Aug 31 '22 15:08 uyarn

认领 jumper

HelKyle avatar Sep 13 '22 06:09 HelKyle

认领 notification

jiazengp avatar Sep 15 '22 02:09 jiazengp

认领 dropdown

eric-gitta-moore avatar Sep 15 '22 02:09 eric-gitta-moore

认领 switch, tooltip

看到vue-next仓库有人领取 switch 组件了,不知道是否已经完成了?

sechi747 avatar Sep 15 '22 08:09 sechi747

认领swiper

duenyang avatar Sep 15 '22 09:09 duenyang

看到vue-next仓库有人领取 switch 组件了,不知道是否已经完成了?

没提交 PR,你可以看看一并搞了

xiaosansiji avatar Sep 15 '22 10:09 xiaosansiji

认领 pagination

HelKyle avatar Sep 17 '22 10:09 HelKyle

认领collapse

isanxia avatar Sep 20 '22 09:09 isanxia

认领 Message, Tooltip, Popup

byq1213 avatar Oct 13 '22 06:10 byq1213