Skip to content

Commit

Permalink
test(comp:stepper): add test
Browse files Browse the repository at this point in the history
  • Loading branch information
kovsu committed Jan 12, 2023
1 parent cd662d6 commit d96cd7b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions packages/components/stepper/__tests__/steps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ describe('Stepper', () => {
expect(onUpdateActiveKey).toBeCalledTimes(1)
})

test('dot work', async () => {
const wrapper = StepperMount({ props: { dot: true } })
const items = await wrapper.findAll('.ix-stepper-item')

expect(items[0].classes()).toContain('ix-stepper-item-dot')
expect(items[1].classes()).toContain('ix-stepper-item-dot')
expect(items[2].classes()).toContain('ix-stepper-item-dot')
})

test('labelPlacement work', async () => {
const wrapper = StepperMount({ props: { labelPlacement: 'bottom' } })

Expand Down
2 changes: 1 addition & 1 deletion packages/components/stepper/docs/Api.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| ---| --- | --- | --- | --- | --- |
`v-model:activeKey` | 当前的激活节点的 `key` | `VKey` | - | - | - |
`clickable` | 是否可点击 | `boolean` | `false` | - | - |
`dot` | 是否为点状步骤条 | `boolean \| #dot={key, status}` | `false` | - | - |
`dot` | 是否为点状步骤条 | `boolean` | `false` | - | - |
`labelPlacement` | 指定文本信息放置的位置 | `'end' \| 'bottom'` | `'end'` | -| - |
`percent` | 当前激活节点的进度 | `number` | - | - | 取值是 0-100 |
`size` | 指定节点的大小 | `'md' \| 'sm'` | `'md'` | ✅ | - |
Expand Down

0 comments on commit d96cd7b

Please sign in to comment.