@yh-ui/components 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/form/index.cjs +1 -1
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.mjs +1 -1
- package/dist/icon/index.cjs +1 -1
- package/dist/icon/index.d.ts +1 -1
- package/dist/icon/index.mjs +1 -1
- package/dist/loading/index.cjs +1 -1
- package/dist/loading/index.d.ts +1 -1
- package/dist/loading/index.mjs +1 -1
- package/dist/message/src/method.cjs +1 -1
- package/dist/message/src/method.d.ts +1 -1
- package/dist/message/src/method.mjs +1 -1
- package/dist/message-box/index.cjs +1 -1
- package/dist/message-box/index.d.ts +1 -1
- package/dist/message-box/index.mjs +1 -1
- package/dist/notification/src/method.cjs +1 -1
- package/dist/notification/src/method.d.ts +1 -1
- package/dist/notification/src/method.mjs +1 -1
- package/dist/resolver.cjs +1 -1
- package/dist/resolver.d.ts +7 -5
- package/dist/resolver.mjs +1 -1
- package/dist/style.css +584 -0
- package/package.json +6 -6
- package/dist/affix/__tests__/affix.bottom.test.cjs +0 -101
- package/dist/affix/__tests__/affix.bottom.test.mjs +0 -88
- package/dist/affix/__tests__/affix.ssr.test.cjs +0 -38
- package/dist/affix/__tests__/affix.ssr.test.mjs +0 -51
- package/dist/affix/__tests__/affix.test.cjs +0 -185
- package/dist/affix/__tests__/affix.test.mjs +0 -180
- package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.cjs +0 -55
- package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.mjs +0 -39
- package/dist/ai-action-group/__tests__/ai-action-group.test.cjs +0 -235
- package/dist/ai-action-group/__tests__/ai-action-group.test.mjs +0 -157
- package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.cjs +0 -61
- package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.mjs +0 -65
- package/dist/ai-agent-card/__tests__/ai-agent-card.test.cjs +0 -205
- package/dist/ai-agent-card/__tests__/ai-agent-card.test.mjs +0 -133
- package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.cjs +0 -73
- package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.mjs +0 -68
- package/dist/ai-artifacts/__tests__/ai-artifacts.test.cjs +0 -128
- package/dist/ai-artifacts/__tests__/ai-artifacts.test.mjs +0 -109
- package/dist/ai-attachments/__tests__/ai-attachments.ssr.test.cjs +0 -50
- package/dist/ai-attachments/__tests__/ai-attachments.ssr.test.mjs +0 -33
- package/dist/ai-attachments/__tests__/ai-attachments.test.cjs +0 -113
- package/dist/ai-attachments/__tests__/ai-attachments.test.mjs +0 -81
- package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.cjs +0 -95
- package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.mjs +0 -66
- package/dist/ai-bubble/__tests__/ai-bubble.test.cjs +0 -624
- package/dist/ai-bubble/__tests__/ai-bubble.test.mjs +0 -393
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.ssr.test.cjs +0 -51
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.ssr.test.mjs +0 -51
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.test.cjs +0 -138
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.test.mjs +0 -112
- package/dist/ai-chat/__tests__/ai-chat.ssr.test.cjs +0 -90
- package/dist/ai-chat/__tests__/ai-chat.ssr.test.mjs +0 -77
- package/dist/ai-chat/__tests__/ai-chat.test.cjs +0 -177
- package/dist/ai-chat/__tests__/ai-chat.test.mjs +0 -129
- package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.cjs +0 -75
- package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.mjs +0 -57
- package/dist/ai-code-block/__tests__/ai-code-block.test.cjs +0 -174
- package/dist/ai-code-block/__tests__/ai-code-block.test.mjs +0 -108
- package/dist/ai-code-editor/__tests__/ai-code-editor.ssr.test.cjs +0 -46
- package/dist/ai-code-editor/__tests__/ai-code-editor.ssr.test.mjs +0 -39
- package/dist/ai-code-editor/__tests__/ai-code-editor.test.cjs +0 -90
- package/dist/ai-code-editor/__tests__/ai-code-editor.test.mjs +0 -78
- package/dist/ai-code-runner/__tests__/ai-code-runner.ssr.test.cjs +0 -28
- package/dist/ai-code-runner/__tests__/ai-code-runner.ssr.test.mjs +0 -26
- package/dist/ai-code-runner/__tests__/ai-code-runner.test.cjs +0 -69
- package/dist/ai-code-runner/__tests__/ai-code-runner.test.mjs +0 -66
- package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.cjs +0 -50
- package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.mjs +0 -42
- package/dist/ai-conversations/__tests__/ai-conversations.test.cjs +0 -67
- package/dist/ai-conversations/__tests__/ai-conversations.test.mjs +0 -51
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.cjs +0 -62
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.mjs +0 -50
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.cjs +0 -315
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.mjs +0 -226
- package/dist/ai-file-card/__tests__/ai-file-card.ssr.test.cjs +0 -45
- package/dist/ai-file-card/__tests__/ai-file-card.ssr.test.mjs +0 -29
- package/dist/ai-file-card/__tests__/ai-file-card.test.cjs +0 -160
- package/dist/ai-file-card/__tests__/ai-file-card.test.mjs +0 -109
- package/dist/ai-mention/__tests__/ai-mention.ssr.test.cjs +0 -38
- package/dist/ai-mention/__tests__/ai-mention.ssr.test.mjs +0 -37
- package/dist/ai-mention/__tests__/ai-mention.test.cjs +0 -113
- package/dist/ai-mention/__tests__/ai-mention.test.mjs +0 -84
- package/dist/ai-mermaid/__tests__/ai-mermaid.ssr.test.cjs +0 -43
- package/dist/ai-mermaid/__tests__/ai-mermaid.ssr.test.mjs +0 -33
- package/dist/ai-mermaid/__tests__/ai-mermaid.test.cjs +0 -113
- package/dist/ai-mermaid/__tests__/ai-mermaid.test.mjs +0 -92
- package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.cjs +0 -49
- package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.mjs +0 -41
- package/dist/ai-prompts/__tests__/ai-prompts.test.cjs +0 -54
- package/dist/ai-prompts/__tests__/ai-prompts.test.mjs +0 -38
- package/dist/ai-provider/__tests__/ai-provider.ssr.test.cjs +0 -33
- package/dist/ai-provider/__tests__/ai-provider.ssr.test.mjs +0 -34
- package/dist/ai-provider/__tests__/ai-provider.test.cjs +0 -38
- package/dist/ai-provider/__tests__/ai-provider.test.mjs +0 -33
- package/dist/ai-sender/__tests__/ai-sender.ssr.test.cjs +0 -46
- package/dist/ai-sender/__tests__/ai-sender.ssr.test.mjs +0 -37
- package/dist/ai-sender/__tests__/ai-sender.test.cjs +0 -511
- package/dist/ai-sender/__tests__/ai-sender.test.mjs +0 -322
- package/dist/ai-sources/__tests__/ai-sources.ssr.test.cjs +0 -72
- package/dist/ai-sources/__tests__/ai-sources.ssr.test.mjs +0 -82
- package/dist/ai-sources/__tests__/ai-sources.test.cjs +0 -200
- package/dist/ai-sources/__tests__/ai-sources.test.mjs +0 -160
- package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.cjs +0 -56
- package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.mjs +0 -42
- package/dist/ai-thinking/__tests__/ai-thinking.test.cjs +0 -151
- package/dist/ai-thinking/__tests__/ai-thinking.test.mjs +0 -96
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.cjs +0 -88
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.mjs +0 -55
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.cjs +0 -344
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.mjs +0 -237
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.cjs +0 -32
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.mjs +0 -25
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.cjs +0 -130
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.mjs +0 -103
- package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.cjs +0 -57
- package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.mjs +0 -39
- package/dist/ai-welcome/__tests__/ai-welcome.test.cjs +0 -169
- package/dist/ai-welcome/__tests__/ai-welcome.test.mjs +0 -113
- package/dist/alert/__tests__/alert.ssr.test.cjs +0 -28
- package/dist/alert/__tests__/alert.ssr.test.mjs +0 -29
- package/dist/alert/__tests__/alert.test.cjs +0 -123
- package/dist/alert/__tests__/alert.test.mjs +0 -110
- package/dist/autocomplete/__tests__/autocomplete.ssr.test.cjs +0 -54
- package/dist/autocomplete/__tests__/autocomplete.ssr.test.mjs +0 -47
- package/dist/autocomplete/__tests__/autocomplete.test.cjs +0 -299
- package/dist/autocomplete/__tests__/autocomplete.test.mjs +0 -263
- package/dist/avatar/__tests__/avatar.ssr.test.cjs +0 -103
- package/dist/avatar/__tests__/avatar.ssr.test.mjs +0 -108
- package/dist/avatar/__tests__/avatar.test.cjs +0 -146
- package/dist/avatar/__tests__/avatar.test.mjs +0 -125
- package/dist/back-top/__tests__/back-top.ssr.test.cjs +0 -13
- package/dist/back-top/__tests__/back-top.ssr.test.mjs +0 -10
- package/dist/back-top/__tests__/back-top.test.cjs +0 -88
- package/dist/back-top/__tests__/back-top.test.mjs +0 -76
- package/dist/badge/__tests__/badge.ssr.test.cjs +0 -36
- package/dist/badge/__tests__/badge.ssr.test.mjs +0 -33
- package/dist/badge/__tests__/badge.test.cjs +0 -115
- package/dist/badge/__tests__/badge.test.mjs +0 -112
- package/dist/breadcrumb/__tests__/breadcrumb.ssr.test.cjs +0 -22
- package/dist/breadcrumb/__tests__/breadcrumb.ssr.test.mjs +0 -20
- package/dist/breadcrumb/__tests__/breadcrumb.test.cjs +0 -64
- package/dist/breadcrumb/__tests__/breadcrumb.test.mjs +0 -51
- package/dist/button/__tests__/button.ssr.test.cjs +0 -52
- package/dist/button/__tests__/button.ssr.test.mjs +0 -55
- package/dist/button/__tests__/button.test.cjs +0 -207
- package/dist/button/__tests__/button.test.mjs +0 -141
- package/dist/calendar/__tests__/calendar.ssr.test.cjs +0 -65
- package/dist/calendar/__tests__/calendar.ssr.test.mjs +0 -63
- package/dist/calendar/__tests__/calendar.test.cjs +0 -263
- package/dist/calendar/__tests__/calendar.test.mjs +0 -255
- package/dist/card/__tests__/card.ssr.test.cjs +0 -37
- package/dist/card/__tests__/card.ssr.test.mjs +0 -40
- package/dist/card/__tests__/card.test.cjs +0 -131
- package/dist/card/__tests__/card.test.mjs +0 -124
- package/dist/carousel/__tests__/carousel.ssr.test.cjs +0 -27
- package/dist/carousel/__tests__/carousel.ssr.test.mjs +0 -27
- package/dist/carousel/__tests__/carousel.test.cjs +0 -115
- package/dist/carousel/__tests__/carousel.test.mjs +0 -98
- package/dist/cascader/__tests__/cascader-panel.test.cjs +0 -162
- package/dist/cascader/__tests__/cascader-panel.test.mjs +0 -151
- package/dist/cascader/__tests__/cascader.ssr.test.cjs +0 -61
- package/dist/cascader/__tests__/cascader.ssr.test.mjs +0 -55
- package/dist/cascader/__tests__/cascader.test.cjs +0 -342
- package/dist/cascader/__tests__/cascader.test.mjs +0 -316
- package/dist/category-nav/__tests__/category-nav.ssr.test.cjs +0 -35
- package/dist/category-nav/__tests__/category-nav.ssr.test.mjs +0 -21
- package/dist/category-nav/__tests__/category-nav.test.cjs +0 -53
- package/dist/category-nav/__tests__/category-nav.test.mjs +0 -33
- package/dist/checkbox/__tests__/checkbox.ssr.test.cjs +0 -52
- package/dist/checkbox/__tests__/checkbox.ssr.test.mjs +0 -57
- package/dist/checkbox/__tests__/checkbox.test.cjs +0 -173
- package/dist/checkbox/__tests__/checkbox.test.mjs +0 -133
- package/dist/col/__tests__/col.ssr.test.cjs +0 -44
- package/dist/col/__tests__/col.ssr.test.mjs +0 -42
- package/dist/col/__tests__/col.test.cjs +0 -128
- package/dist/col/__tests__/col.test.mjs +0 -116
- package/dist/color-picker/__tests__/color-picker.ssr.test.cjs +0 -34
- package/dist/color-picker/__tests__/color-picker.ssr.test.mjs +0 -39
- package/dist/color-picker/__tests__/color-picker.test.cjs +0 -227
- package/dist/color-picker/__tests__/color-picker.test.mjs +0 -176
- package/dist/config-provider/__tests__/config-provider.ssr.test.cjs +0 -43
- package/dist/config-provider/__tests__/config-provider.ssr.test.mjs +0 -42
- package/dist/config-provider/__tests__/config-provider.test.cjs +0 -75
- package/dist/config-provider/__tests__/config-provider.test.mjs +0 -64
- package/dist/container/__tests__/container.ssr.test.cjs +0 -71
- package/dist/container/__tests__/container.ssr.test.mjs +0 -50
- package/dist/container/__tests__/container.test.cjs +0 -111
- package/dist/container/__tests__/container.test.mjs +0 -84
- package/dist/countdown/__tests__/countdown.ssr.test.cjs +0 -86
- package/dist/countdown/__tests__/countdown.ssr.test.mjs +0 -78
- package/dist/countdown/__tests__/countdown.test.cjs +0 -767
- package/dist/countdown/__tests__/countdown.test.mjs +0 -722
- package/dist/coupon-card/__tests__/coupon-card.ssr.test.cjs +0 -21
- package/dist/coupon-card/__tests__/coupon-card.ssr.test.mjs +0 -18
- package/dist/coupon-card/__tests__/coupon-card.test.cjs +0 -67
- package/dist/coupon-card/__tests__/coupon-card.test.mjs +0 -64
- package/dist/date-picker/__tests__/date-picker-extended.test.cjs +0 -581
- package/dist/date-picker/__tests__/date-picker-extended.test.mjs +0 -455
- package/dist/date-picker/__tests__/date-picker.ssr.test.cjs +0 -26
- package/dist/date-picker/__tests__/date-picker.ssr.test.mjs +0 -23
- package/dist/date-picker/__tests__/date-picker.test.cjs +0 -170
- package/dist/date-picker/__tests__/date-picker.test.mjs +0 -136
- package/dist/descriptions/__tests__/descriptions.ssr.test.cjs +0 -67
- package/dist/descriptions/__tests__/descriptions.ssr.test.mjs +0 -72
- package/dist/descriptions/__tests__/descriptions.test.cjs +0 -150
- package/dist/descriptions/__tests__/descriptions.test.mjs +0 -130
- package/dist/dialog/__tests__/dialog.functional.test.cjs +0 -49
- package/dist/dialog/__tests__/dialog.functional.test.mjs +0 -49
- package/dist/dialog/__tests__/dialog.ssr.test.cjs +0 -31
- package/dist/dialog/__tests__/dialog.ssr.test.mjs +0 -29
- package/dist/dialog/__tests__/dialog.test.cjs +0 -561
- package/dist/dialog/__tests__/dialog.test.mjs +0 -388
- package/dist/divider/__tests__/divider.ssr.test.cjs +0 -41
- package/dist/divider/__tests__/divider.ssr.test.mjs +0 -44
- package/dist/divider/__tests__/divider.test.cjs +0 -71
- package/dist/divider/__tests__/divider.test.mjs +0 -68
- package/dist/drawer/__tests__/drawer.ssr.test.cjs +0 -25
- package/dist/drawer/__tests__/drawer.ssr.test.mjs +0 -23
- package/dist/drawer/__tests__/drawer.test.cjs +0 -145
- package/dist/drawer/__tests__/drawer.test.mjs +0 -122
- package/dist/dropdown/__tests__/dropdown.ssr.test.cjs +0 -49
- package/dist/dropdown/__tests__/dropdown.ssr.test.mjs +0 -64
- package/dist/dropdown/__tests__/dropdown.test.cjs +0 -310
- package/dist/dropdown/__tests__/dropdown.test.mjs +0 -269
- package/dist/empty/__tests__/empty.ssr.test.cjs +0 -96
- package/dist/empty/__tests__/empty.ssr.test.mjs +0 -99
- package/dist/empty/__tests__/empty.test.cjs +0 -110
- package/dist/empty/__tests__/empty.test.mjs +0 -101
- package/dist/filter-bar/__tests__/filter-bar.ssr.test.cjs +0 -29
- package/dist/filter-bar/__tests__/filter-bar.ssr.test.mjs +0 -16
- package/dist/filter-bar/__tests__/filter-bar.test.cjs +0 -51
- package/dist/filter-bar/__tests__/filter-bar.test.mjs +0 -29
- package/dist/form/__tests__/form-schema.test.cjs +0 -636
- package/dist/form/__tests__/form-schema.test.mjs +0 -366
- package/dist/form/__tests__/form.ssr.test.cjs +0 -74
- package/dist/form/__tests__/form.ssr.test.mjs +0 -73
- package/dist/form/__tests__/form.test.cjs +0 -208
- package/dist/form/__tests__/form.test.mjs +0 -128
- package/dist/gantt-chart/__tests__/debug_ssr.test.cjs +0 -51
- package/dist/gantt-chart/__tests__/debug_ssr.test.mjs +0 -37
- package/dist/gantt-chart/__tests__/gantt-chart.ssr.test.cjs +0 -95
- package/dist/gantt-chart/__tests__/gantt-chart.ssr.test.mjs +0 -94
- package/dist/gantt-chart/__tests__/gantt-chart.test.cjs +0 -86
- package/dist/gantt-chart/__tests__/gantt-chart.test.mjs +0 -79
- package/dist/grid/__tests__/grid.ssr.test.cjs +0 -81
- package/dist/grid/__tests__/grid.ssr.test.mjs +0 -63
- package/dist/grid/__tests__/grid.test.cjs +0 -142
- package/dist/grid/__tests__/grid.test.mjs +0 -89
- package/dist/icon/__tests__/icon.ssr.test.cjs +0 -35
- package/dist/icon/__tests__/icon.ssr.test.mjs +0 -26
- package/dist/icon/__tests__/icon.test.cjs +0 -144
- package/dist/icon/__tests__/icon.test.mjs +0 -123
- package/dist/image/__tests__/image-viewer.test.cjs +0 -101
- package/dist/image/__tests__/image-viewer.test.mjs +0 -94
- package/dist/image/__tests__/image.ssr.test.cjs +0 -73
- package/dist/image/__tests__/image.ssr.test.mjs +0 -72
- package/dist/image/__tests__/image.test.cjs +0 -171
- package/dist/image/__tests__/image.test.mjs +0 -159
- package/dist/image-magnifier/__tests__/image-magnifier.ssr.test.cjs +0 -54
- package/dist/image-magnifier/__tests__/image-magnifier.ssr.test.mjs +0 -35
- package/dist/image-magnifier/__tests__/image-magnifier.test.cjs +0 -257
- package/dist/image-magnifier/__tests__/image-magnifier.test.mjs +0 -177
- package/dist/infinite-scroll/__tests__/infinite-scroll.ssr.test.cjs +0 -59
- package/dist/infinite-scroll/__tests__/infinite-scroll.ssr.test.mjs +0 -84
- package/dist/infinite-scroll/__tests__/infinite-scroll.test.cjs +0 -255
- package/dist/infinite-scroll/__tests__/infinite-scroll.test.mjs +0 -187
- package/dist/input/__tests__/input-utils.test.cjs +0 -77
- package/dist/input/__tests__/input-utils.test.mjs +0 -75
- package/dist/input/__tests__/input.ssr.test.cjs +0 -100
- package/dist/input/__tests__/input.ssr.test.mjs +0 -85
- package/dist/input/__tests__/input.test.cjs +0 -127
- package/dist/input/__tests__/input.test.mjs +0 -112
- package/dist/input-number/__tests__/input-number.hydration.test.cjs +0 -24
- package/dist/input-number/__tests__/input-number.hydration.test.mjs +0 -21
- package/dist/input-number/__tests__/input-number.ssr.test.cjs +0 -95
- package/dist/input-number/__tests__/input-number.ssr.test.mjs +0 -92
- package/dist/input-number/__tests__/input-number.test.cjs +0 -199
- package/dist/input-number/__tests__/input-number.test.mjs +0 -173
- package/dist/input-tag/__tests__/input-tag.ssr.test.cjs +0 -47
- package/dist/input-tag/__tests__/input-tag.ssr.test.mjs +0 -41
- package/dist/input-tag/__tests__/input-tag.test.cjs +0 -268
- package/dist/input-tag/__tests__/input-tag.test.mjs +0 -201
- package/dist/loading/__tests__/loading.ssr.test.cjs +0 -37
- package/dist/loading/__tests__/loading.ssr.test.mjs +0 -27
- package/dist/loading/__tests__/loading.test.cjs +0 -91
- package/dist/loading/__tests__/loading.test.mjs +0 -75
- package/dist/lucky-draw/__tests__/lucky-draw.ssr.test.cjs +0 -33
- package/dist/lucky-draw/__tests__/lucky-draw.ssr.test.mjs +0 -31
- package/dist/lucky-draw/__tests__/lucky-draw.test.cjs +0 -56
- package/dist/lucky-draw/__tests__/lucky-draw.test.mjs +0 -48
- package/dist/marquee/__tests__/marquee.ssr.test.cjs +0 -59
- package/dist/marquee/__tests__/marquee.ssr.test.mjs +0 -60
- package/dist/marquee/__tests__/marquee.test.cjs +0 -94
- package/dist/marquee/__tests__/marquee.test.mjs +0 -92
- package/dist/mention/__tests__/mention.ssr.test.cjs +0 -92
- package/dist/mention/__tests__/mention.ssr.test.mjs +0 -70
- package/dist/mention/__tests__/mention.test.cjs +0 -650
- package/dist/mention/__tests__/mention.test.mjs +0 -523
- package/dist/menu/__tests__/menu.ssr.test.cjs +0 -92
- package/dist/menu/__tests__/menu.ssr.test.mjs +0 -124
- package/dist/menu/__tests__/menu.test.cjs +0 -209
- package/dist/menu/__tests__/menu.test.mjs +0 -182
- package/dist/message/__tests__/message.ssr.test.cjs +0 -29
- package/dist/message/__tests__/message.ssr.test.mjs +0 -23
- package/dist/message/__tests__/message.test.cjs +0 -170
- package/dist/message/__tests__/message.test.mjs +0 -154
- package/dist/message-box/__tests__/message-box.ssr.test.cjs +0 -33
- package/dist/message-box/__tests__/message-box.ssr.test.mjs +0 -30
- package/dist/message-box/__tests__/message-box.test.cjs +0 -100
- package/dist/message-box/__tests__/message-box.test.mjs +0 -95
- package/dist/notification/__tests__/notification.ssr.test.cjs +0 -31
- package/dist/notification/__tests__/notification.ssr.test.mjs +0 -25
- package/dist/notification/__tests__/notification.test.cjs +0 -248
- package/dist/notification/__tests__/notification.test.mjs +0 -206
- package/dist/pagination/__tests__/pagination.ssr.test.cjs +0 -61
- package/dist/pagination/__tests__/pagination.ssr.test.mjs +0 -59
- package/dist/pagination/__tests__/pagination.test.cjs +0 -135
- package/dist/pagination/__tests__/pagination.test.mjs +0 -131
- package/dist/popconfirm/__tests__/popconfirm.ssr.test.cjs +0 -48
- package/dist/popconfirm/__tests__/popconfirm.ssr.test.mjs +0 -63
- package/dist/popconfirm/__tests__/popconfirm.test.cjs +0 -62
- package/dist/popconfirm/__tests__/popconfirm.test.mjs +0 -56
- package/dist/popover/__tests__/popover.ssr.test.cjs +0 -48
- package/dist/popover/__tests__/popover.ssr.test.mjs +0 -63
- package/dist/popover/__tests__/popover.test.cjs +0 -107
- package/dist/popover/__tests__/popover.test.mjs +0 -93
- package/dist/price/__tests__/price.ssr.test.cjs +0 -20
- package/dist/price/__tests__/price.ssr.test.mjs +0 -19
- package/dist/price/__tests__/price.test.cjs +0 -45
- package/dist/price/__tests__/price.test.mjs +0 -42
- package/dist/product-card/__tests__/product-card.ssr.test.cjs +0 -21
- package/dist/product-card/__tests__/product-card.ssr.test.mjs +0 -18
- package/dist/product-card/__tests__/product-card.test.cjs +0 -54
- package/dist/product-card/__tests__/product-card.test.mjs +0 -53
- package/dist/progress/__tests__/progress.ssr.test.cjs +0 -31
- package/dist/progress/__tests__/progress.ssr.test.mjs +0 -29
- package/dist/progress/__tests__/progress.test.cjs +0 -119
- package/dist/progress/__tests__/progress.test.mjs +0 -77
- package/dist/radio/__tests__/radio-button.test.cjs +0 -99
- package/dist/radio/__tests__/radio-button.test.mjs +0 -83
- package/dist/radio/__tests__/radio.ssr.test.cjs +0 -132
- package/dist/radio/__tests__/radio.ssr.test.mjs +0 -165
- package/dist/radio/__tests__/radio.test.cjs +0 -170
- package/dist/radio/__tests__/radio.test.mjs +0 -143
- package/dist/rate/__tests__/rate.ssr.test.cjs +0 -106
- package/dist/rate/__tests__/rate.ssr.test.mjs +0 -103
- package/dist/rate/__tests__/rate.test.cjs +0 -88
- package/dist/rate/__tests__/rate.test.mjs +0 -85
- package/dist/result/__tests__/result.ssr.test.cjs +0 -62
- package/dist/result/__tests__/result.ssr.test.mjs +0 -51
- package/dist/result/__tests__/result.test.cjs +0 -135
- package/dist/result/__tests__/result.test.mjs +0 -92
- package/dist/row/__tests__/row.ssr.test.cjs +0 -29
- package/dist/row/__tests__/row.ssr.test.mjs +0 -30
- package/dist/row/__tests__/row.test.cjs +0 -89
- package/dist/row/__tests__/row.test.mjs +0 -86
- package/dist/row/__tests__/row_ts.test.cjs +0 -31
- package/dist/row/__tests__/row_ts.test.mjs +0 -28
- package/dist/scrollbar/__tests__/scrollbar.ssr.test.cjs +0 -49
- package/dist/scrollbar/__tests__/scrollbar.ssr.test.mjs +0 -54
- package/dist/scrollbar/__tests__/scrollbar.test.cjs +0 -43
- package/dist/scrollbar/__tests__/scrollbar.test.mjs +0 -40
- package/dist/select/__tests__/select.perf.test.cjs +0 -191
- package/dist/select/__tests__/select.perf.test.mjs +0 -185
- package/dist/select/__tests__/select.ssr.test.cjs +0 -58
- package/dist/select/__tests__/select.ssr.test.mjs +0 -52
- package/dist/select/__tests__/select.test.cjs +0 -414
- package/dist/select/__tests__/select.test.mjs +0 -345
- package/dist/skeleton/__tests__/skeleton.ssr.test.cjs +0 -81
- package/dist/skeleton/__tests__/skeleton.ssr.test.mjs +0 -83
- package/dist/skeleton/__tests__/skeleton.test.cjs +0 -72
- package/dist/skeleton/__tests__/skeleton.test.mjs +0 -65
- package/dist/sku-selector/__tests__/sku-selector.ssr.test.cjs +0 -32
- package/dist/sku-selector/__tests__/sku-selector.ssr.test.mjs +0 -19
- package/dist/sku-selector/__tests__/sku-selector.test.cjs +0 -64
- package/dist/sku-selector/__tests__/sku-selector.test.mjs +0 -53
- package/dist/slider/__tests__/repro.test.cjs +0 -25
- package/dist/slider/__tests__/repro.test.mjs +0 -22
- package/dist/slider/__tests__/slider.ssr.test.cjs +0 -118
- package/dist/slider/__tests__/slider.ssr.test.mjs +0 -115
- package/dist/slider/__tests__/slider.test.cjs +0 -155
- package/dist/slider/__tests__/slider.test.mjs +0 -120
- package/dist/smart-address/__tests__/smart-address.ssr.test.cjs +0 -28
- package/dist/smart-address/__tests__/smart-address.ssr.test.mjs +0 -25
- package/dist/smart-address/__tests__/smart-address.test.cjs +0 -68
- package/dist/smart-address/__tests__/smart-address.test.mjs +0 -56
- package/dist/space/__tests__/space.ssr.test.cjs +0 -115
- package/dist/space/__tests__/space.ssr.test.mjs +0 -150
- package/dist/space/__tests__/space.test.cjs +0 -227
- package/dist/space/__tests__/space.test.mjs +0 -187
- package/dist/spin/__tests__/spin.ssr.test.cjs +0 -46
- package/dist/spin/__tests__/spin.ssr.test.mjs +0 -43
- package/dist/spin/__tests__/spin.test.cjs +0 -65
- package/dist/spin/__tests__/spin.test.mjs +0 -63
- package/dist/steps/__tests__/steps.ssr.test.cjs +0 -73
- package/dist/steps/__tests__/steps.ssr.test.mjs +0 -55
- package/dist/steps/__tests__/steps.test.cjs +0 -152
- package/dist/steps/__tests__/steps.test.mjs +0 -123
- package/dist/submit-bar/__tests__/submit-bar.ssr.test.cjs +0 -21
- package/dist/submit-bar/__tests__/submit-bar.ssr.test.mjs +0 -18
- package/dist/submit-bar/__tests__/submit-bar.test.cjs +0 -50
- package/dist/submit-bar/__tests__/submit-bar.test.mjs +0 -36
- package/dist/switch/__tests__/switch.ssr.test.cjs +0 -105
- package/dist/switch/__tests__/switch.ssr.test.mjs +0 -102
- package/dist/switch/__tests__/switch.test.cjs +0 -251
- package/dist/switch/__tests__/switch.test.mjs +0 -193
- package/dist/table/__tests__/table-advance.test.cjs +0 -180
- package/dist/table/__tests__/table-advance.test.mjs +0 -118
- package/dist/table/__tests__/table-interaction.test.cjs +0 -236
- package/dist/table/__tests__/table-interaction.test.mjs +0 -162
- package/dist/table/__tests__/table-utils.test.cjs +0 -690
- package/dist/table/__tests__/table-utils.test.mjs +0 -485
- package/dist/table/__tests__/table.perf.test.cjs +0 -231
- package/dist/table/__tests__/table.perf.test.mjs +0 -225
- package/dist/table/__tests__/table.ssr.test.cjs +0 -296
- package/dist/table/__tests__/table.ssr.test.mjs +0 -265
- package/dist/table/__tests__/table.test.cjs +0 -682
- package/dist/table/__tests__/table.test.mjs +0 -617
- package/dist/table/__tests__/use-column-drag.test.cjs +0 -238
- package/dist/table/__tests__/use-column-drag.test.mjs +0 -150
- package/dist/table/__tests__/use-table-export.test.cjs +0 -179
- package/dist/table/__tests__/use-table-export.test.mjs +0 -105
- package/dist/table/__tests__/use-table-import.test.cjs +0 -206
- package/dist/table/__tests__/use-table-import.test.mjs +0 -144
- package/dist/table/__tests__/use-table-print.test.cjs +0 -190
- package/dist/table/__tests__/use-table-print.test.mjs +0 -134
- package/dist/table/__tests__/use-virtual-scroll.test.cjs +0 -286
- package/dist/table/__tests__/use-virtual-scroll.test.mjs +0 -196
- package/dist/tabs/__tests__/tabs.ssr.test.cjs +0 -57
- package/dist/tabs/__tests__/tabs.ssr.test.mjs +0 -41
- package/dist/tabs/__tests__/tabs.test.cjs +0 -171
- package/dist/tabs/__tests__/tabs.test.mjs +0 -134
- package/dist/tag/__tests__/tag.ssr.test.cjs +0 -45
- package/dist/tag/__tests__/tag.ssr.test.mjs +0 -48
- package/dist/tag/__tests__/tag.test.cjs +0 -194
- package/dist/tag/__tests__/tag.test.mjs +0 -167
- package/dist/time-picker/__tests__/time-picker.ssr.test.cjs +0 -46
- package/dist/time-picker/__tests__/time-picker.ssr.test.mjs +0 -43
- package/dist/time-picker/__tests__/time-picker.test.cjs +0 -228
- package/dist/time-picker/__tests__/time-picker.test.mjs +0 -218
- package/dist/time-picker/__tests__/time-spinner.test.cjs +0 -196
- package/dist/time-picker/__tests__/time-spinner.test.mjs +0 -162
- package/dist/time-select/__tests__/time-select.ssr.test.cjs +0 -42
- package/dist/time-select/__tests__/time-select.ssr.test.mjs +0 -37
- package/dist/time-select/__tests__/time-select.test.cjs +0 -390
- package/dist/time-select/__tests__/time-select.test.mjs +0 -374
- package/dist/tooltip/__tests__/tooltip.ssr.test.cjs +0 -55
- package/dist/tooltip/__tests__/tooltip.ssr.test.mjs +0 -76
- package/dist/tooltip/__tests__/tooltip.test.cjs +0 -132
- package/dist/tooltip/__tests__/tooltip.test.mjs +0 -121
- package/dist/transfer/__tests__/transfer.ssr.test.cjs +0 -47
- package/dist/transfer/__tests__/transfer.ssr.test.mjs +0 -44
- package/dist/transfer/__tests__/transfer.test.cjs +0 -422
- package/dist/transfer/__tests__/transfer.test.mjs +0 -405
- package/dist/tree/__tests__/tree.perf.test.cjs +0 -182
- package/dist/tree/__tests__/tree.perf.test.mjs +0 -198
- package/dist/tree/__tests__/tree.ssr.test.cjs +0 -56
- package/dist/tree/__tests__/tree.ssr.test.mjs +0 -45
- package/dist/tree/__tests__/tree.test.cjs +0 -488
- package/dist/tree/__tests__/tree.test.mjs +0 -333
- package/dist/tree-select/__tests__/tree-select.ssr.test.cjs +0 -52
- package/dist/tree-select/__tests__/tree-select.ssr.test.mjs +0 -55
- package/dist/tree-select/__tests__/tree-select.test.cjs +0 -231
- package/dist/tree-select/__tests__/tree-select.test.mjs +0 -189
- package/dist/typography/__tests__/typography.ssr.test.cjs +0 -85
- package/dist/typography/__tests__/typography.ssr.test.mjs +0 -63
- package/dist/typography/__tests__/typography.test.cjs +0 -362
- package/dist/typography/__tests__/typography.test.mjs +0 -161
- package/dist/upload/__tests__/upload.ssr.test.cjs +0 -28
- package/dist/upload/__tests__/upload.ssr.test.mjs +0 -26
- package/dist/upload/__tests__/upload.test.cjs +0 -467
- package/dist/upload/__tests__/upload.test.mjs +0 -336
- package/dist/waterfall/__tests__/waterfall.ssr.test.cjs +0 -38
- package/dist/waterfall/__tests__/waterfall.ssr.test.mjs +0 -39
- package/dist/waterfall/__tests__/waterfall.test.cjs +0 -122
- package/dist/waterfall/__tests__/waterfall.test.mjs +0 -85
- package/dist/watermark/__tests__/watermark.ssr.test.cjs +0 -32
- package/dist/watermark/__tests__/watermark.ssr.test.mjs +0 -30
- package/dist/watermark/__tests__/watermark.test.cjs +0 -127
- package/dist/watermark/__tests__/watermark.test.mjs +0 -124
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _vitest = require("vitest");
|
|
4
|
-
var _testUtils = require("@vue/test-utils");
|
|
5
|
-
var _vue = require("vue");
|
|
6
|
-
var _aiThoughtChain = _interopRequireDefault(require("../src/ai-thought-chain.vue"));
|
|
7
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
-
const makeItem = (title, status = "complete", content = "") => ({
|
|
9
|
-
title,
|
|
10
|
-
status,
|
|
11
|
-
content
|
|
12
|
-
});
|
|
13
|
-
(0, _vitest.describe)("YhAiThoughtChain", () => {
|
|
14
|
-
(0, _vitest.it)("should render with base class", () => {
|
|
15
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default);
|
|
16
|
-
(0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain").exists()).toBe(true);
|
|
17
|
-
});
|
|
18
|
-
(0, _vitest.it)("should render single node header when no items", () => {
|
|
19
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
20
|
-
props: {
|
|
21
|
-
title: "My Thought"
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
(0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__header").exists()).toBe(true);
|
|
25
|
-
});
|
|
26
|
-
(0, _vitest.it)("should render title in single node mode", () => {
|
|
27
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
28
|
-
props: {
|
|
29
|
-
title: "Thinking Title"
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
(0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__title").text()).toBe("Thinking Title");
|
|
33
|
-
});
|
|
34
|
-
(0, _vitest.it)("should fallback to default title when no title provided", () => {
|
|
35
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default);
|
|
36
|
-
(0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__title").text().length).toBeGreaterThan(0);
|
|
37
|
-
});
|
|
38
|
-
(0, _vitest.it)("should compute thinking status when thinking=true", () => {
|
|
39
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
40
|
-
props: {
|
|
41
|
-
thinking: true
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
(0, _vitest.expect)(wrapper.classes()).toContain("is-thinking");
|
|
45
|
-
});
|
|
46
|
-
(0, _vitest.it)("should compute complete status when thinking=false", () => {
|
|
47
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
48
|
-
props: {
|
|
49
|
-
thinking: false
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
(0, _vitest.expect)(wrapper.classes()).not.toContain("is-thinking");
|
|
53
|
-
});
|
|
54
|
-
(0, _vitest.it)("should use explicit status prop over thinking", () => {
|
|
55
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
56
|
-
props: {
|
|
57
|
-
status: "error",
|
|
58
|
-
thinking: true
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
(0, _vitest.expect)(wrapper.classes()).not.toContain("is-thinking");
|
|
62
|
-
});
|
|
63
|
-
(0, _vitest.it)("should be collapsed by default in single mode", () => {
|
|
64
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
65
|
-
props: {
|
|
66
|
-
content: "Some content"
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
(0, _vitest.expect)(wrapper.classes()).not.toContain("is-expanded");
|
|
70
|
-
});
|
|
71
|
-
(0, _vitest.it)("should expand on header click in single node mode", async () => {
|
|
72
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
73
|
-
props: {
|
|
74
|
-
title: "Title",
|
|
75
|
-
content: "Detail"
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
79
|
-
(0, _vitest.expect)(wrapper.classes()).toContain("is-expanded");
|
|
80
|
-
});
|
|
81
|
-
(0, _vitest.it)("should collapse again on second header click", async () => {
|
|
82
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
83
|
-
props: {
|
|
84
|
-
content: "Detail"
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
88
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
89
|
-
(0, _vitest.expect)(wrapper.classes()).not.toContain("is-expanded");
|
|
90
|
-
});
|
|
91
|
-
(0, _vitest.it)("should render content in single mode when expanded", async () => {
|
|
92
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
93
|
-
props: {
|
|
94
|
-
content: "Thought Content Detail"
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
98
|
-
(0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__text").text()).toBe("Thought Content Detail");
|
|
99
|
-
});
|
|
100
|
-
(0, _vitest.it)("should auto-collapse when status becomes complete and autoCollapse=true", async () => {
|
|
101
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
102
|
-
props: {
|
|
103
|
-
status: "thinking",
|
|
104
|
-
autoCollapse: true
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
108
|
-
(0, _vitest.expect)(wrapper.classes()).toContain("is-expanded");
|
|
109
|
-
await wrapper.setProps({
|
|
110
|
-
status: "complete"
|
|
111
|
-
});
|
|
112
|
-
await (0, _vue.nextTick)();
|
|
113
|
-
(0, _vitest.expect)(wrapper.classes()).not.toContain("is-expanded");
|
|
114
|
-
});
|
|
115
|
-
(0, _vitest.it)("should apply is-timeline class when items provided", () => {
|
|
116
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
117
|
-
props: {
|
|
118
|
-
items: [makeItem("Step 1"), makeItem("Step 2")]
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
(0, _vitest.expect)(wrapper.classes()).toContain("is-timeline");
|
|
122
|
-
});
|
|
123
|
-
(0, _vitest.it)("should render correct number of timeline items", () => {
|
|
124
|
-
const items = [makeItem("Step 1"), makeItem("Step 2"), makeItem("Step 3")];
|
|
125
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
126
|
-
props: {
|
|
127
|
-
items
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
(0, _vitest.expect)(wrapper.findAll(".yh-ai-thought-chain__item").length).toBe(3);
|
|
131
|
-
});
|
|
132
|
-
(0, _vitest.it)("should render item titles", () => {
|
|
133
|
-
const items = [makeItem("Alpha"), makeItem("Beta")];
|
|
134
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
135
|
-
props: {
|
|
136
|
-
items
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
const titles = wrapper.findAll(".yh-ai-thought-chain__item-title");
|
|
140
|
-
(0, _vitest.expect)(titles[0].text()).toBe("Alpha");
|
|
141
|
-
(0, _vitest.expect)(titles[1].text()).toBe("Beta");
|
|
142
|
-
});
|
|
143
|
-
(0, _vitest.it)("should apply is-last class to last item", () => {
|
|
144
|
-
const items = [makeItem("First"), makeItem("Last")];
|
|
145
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
146
|
-
props: {
|
|
147
|
-
items
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
const allItems = wrapper.findAll(".yh-ai-thought-chain__item");
|
|
151
|
-
(0, _vitest.expect)(allItems[allItems.length - 1].classes()).toContain("is-last");
|
|
152
|
-
});
|
|
153
|
-
(0, _vitest.it)("should apply is-active class to thinking item", () => {
|
|
154
|
-
const items = [makeItem("Done", "complete"), makeItem("Running", "thinking")];
|
|
155
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
156
|
-
props: {
|
|
157
|
-
items
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
const allItems = wrapper.findAll(".yh-ai-thought-chain__item");
|
|
161
|
-
(0, _vitest.expect)(allItems[1].classes()).toContain("is-active");
|
|
162
|
-
});
|
|
163
|
-
(0, _vitest.it)("should expand last item by default in timeline mode", () => {
|
|
164
|
-
const items = [makeItem("Step 1", "complete", "done"), makeItem("Step 2", "complete", "also done")];
|
|
165
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
166
|
-
props: {
|
|
167
|
-
items
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
const lastContent = wrapper.findAll(".yh-ai-thought-chain__item-content");
|
|
171
|
-
(0, _vitest.expect)(lastContent.length).toBeGreaterThan(0);
|
|
172
|
-
});
|
|
173
|
-
(0, _vitest.it)("should toggle item expand on item header click", async () => {
|
|
174
|
-
const items = [makeItem("Step", "complete", "content here")];
|
|
175
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
176
|
-
props: {
|
|
177
|
-
items
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
const itemHeader = wrapper.find(".yh-ai-thought-chain__item-header");
|
|
181
|
-
await itemHeader.trigger("click");
|
|
182
|
-
(0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__item").exists()).toBe(true);
|
|
183
|
-
});
|
|
184
|
-
(0, _vitest.it)("should apply dotSize prop to item dots", () => {
|
|
185
|
-
const items = [makeItem("Step", "complete")];
|
|
186
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
187
|
-
props: {
|
|
188
|
-
items,
|
|
189
|
-
dotSize: "large"
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
const dotEl = wrapper.find(".yh-ai-thought-chain__item-dot");
|
|
193
|
-
(0, _vitest.expect)(dotEl.exists()).toBe(true);
|
|
194
|
-
(0, _vitest.expect)(dotEl.classes().join(" ")).toContain("large");
|
|
195
|
-
});
|
|
196
|
-
(0, _vitest.it)("should render default slot in single node mode", async () => {
|
|
197
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
198
|
-
slots: {
|
|
199
|
-
default: '<em class="slot-content">Slot</em>'
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
203
|
-
(0, _vitest.expect)(wrapper.find(".slot-content").exists()).toBe(true);
|
|
204
|
-
});
|
|
205
|
-
(0, _vitest.it)("should compute and show progress", async () => {
|
|
206
|
-
const items = [makeItem("Step 1", "complete"), makeItem("Step 2", "success"), makeItem("Step 3", "thinking"), makeItem("Step 4", "none")];
|
|
207
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
208
|
-
props: {
|
|
209
|
-
items,
|
|
210
|
-
showProgress: true
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
const progressFill = wrapper.find(".yh-ai-thought-chain__progress-fill");
|
|
214
|
-
(0, _vitest.expect)(progressFill.exists()).toBe(true);
|
|
215
|
-
(0, _vitest.expect)(progressFill.attributes("style")).toContain("width: 50%");
|
|
216
|
-
});
|
|
217
|
-
(0, _vitest.it)("should get correct status icons", () => {
|
|
218
|
-
const items = [makeItem("Step 1", "error"), makeItem("Step 2", "success", "Detail 2"), makeItem("Step 3", "loading", "Detail 3")];
|
|
219
|
-
items[1].expanded = true;
|
|
220
|
-
items[2].expanded = true;
|
|
221
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
222
|
-
props: {
|
|
223
|
-
items
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
(0, _vitest.expect)(wrapper.html()).toContain("yh-ai-thought-chain--error");
|
|
227
|
-
});
|
|
228
|
-
(0, _vitest.it)("should emit node-click when item content is clicked", async () => {
|
|
229
|
-
const items = [{
|
|
230
|
-
title: "Step 1",
|
|
231
|
-
content: "click me",
|
|
232
|
-
status: "complete",
|
|
233
|
-
expanded: true
|
|
234
|
-
}];
|
|
235
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
236
|
-
props: {
|
|
237
|
-
items
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
const contentText = wrapper.find(".yh-ai-thought-chain__item-content");
|
|
241
|
-
await contentText.trigger("click");
|
|
242
|
-
(0, _vitest.expect)(wrapper.emitted("node-click")).toBeTruthy();
|
|
243
|
-
});
|
|
244
|
-
(0, _vitest.it)("should emit node-click, even with description", async () => {
|
|
245
|
-
const items = [{
|
|
246
|
-
title: "Step 1",
|
|
247
|
-
description: "desc",
|
|
248
|
-
status: "complete",
|
|
249
|
-
expanded: true
|
|
250
|
-
}];
|
|
251
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
252
|
-
props: {
|
|
253
|
-
items
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
const contentText = wrapper.find(".yh-ai-thought-chain__item-content");
|
|
257
|
-
await contentText.trigger("click");
|
|
258
|
-
(0, _vitest.expect)(wrapper.emitted("node-click")).toBeTruthy();
|
|
259
|
-
});
|
|
260
|
-
(0, _vitest.it)("should not emit node-click if clickable is false", async () => {
|
|
261
|
-
const items = [{
|
|
262
|
-
title: "Step 1",
|
|
263
|
-
content: "click",
|
|
264
|
-
clickable: false,
|
|
265
|
-
expanded: true
|
|
266
|
-
}];
|
|
267
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
268
|
-
props: {
|
|
269
|
-
items
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
const contentText = wrapper.find(".yh-ai-thought-chain__item-content");
|
|
273
|
-
await contentText.trigger("click");
|
|
274
|
-
(0, _vitest.expect)(wrapper.emitted("node-click")).toBeFalsy();
|
|
275
|
-
});
|
|
276
|
-
(0, _vitest.it)("should handle add and delete node in editable mode", async () => {
|
|
277
|
-
const items = [makeItem("Step 1", "complete")];
|
|
278
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
279
|
-
props: {
|
|
280
|
-
items,
|
|
281
|
-
editable: true
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
const actionIcons = wrapper.findAll(".yh-ai-thought-chain__action-icon");
|
|
285
|
-
await actionIcons[0].trigger("click");
|
|
286
|
-
(0, _vitest.expect)(wrapper.emitted("node-delete")).toBeTruthy();
|
|
287
|
-
(0, _vitest.expect)(wrapper.emitted("update:items")).toBeTruthy();
|
|
288
|
-
(0, _vitest.expect)(wrapper.emitted("reorder")).toBeTruthy();
|
|
289
|
-
await actionIcons[1].trigger("click");
|
|
290
|
-
(0, _vitest.expect)(wrapper.emitted("node-add")).toBeTruthy();
|
|
291
|
-
const bottomAddNode = wrapper.find(".yh-ai-thought-chain__add-node");
|
|
292
|
-
await bottomAddNode.trigger("click");
|
|
293
|
-
(0, _vitest.expect)(wrapper.emitted("node-add")?.length).toBe(2);
|
|
294
|
-
});
|
|
295
|
-
(0, _vitest.it)("should not mutate internalItems when editable is false", async () => {
|
|
296
|
-
const items = [makeItem("Step 1", "complete")];
|
|
297
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
298
|
-
props: {
|
|
299
|
-
items,
|
|
300
|
-
editable: false
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
(0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__item-actions").exists()).toBe(false);
|
|
304
|
-
(0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain__add-node").exists()).toBe(false);
|
|
305
|
-
});
|
|
306
|
-
(0, _vitest.it)("should handle drag and drop", async () => {
|
|
307
|
-
const items = [makeItem("1"), makeItem("2")];
|
|
308
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
309
|
-
props: {
|
|
310
|
-
items,
|
|
311
|
-
draggable: true
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
const elements = wrapper.findAll(".yh-ai-thought-chain__item");
|
|
315
|
-
await elements[0].trigger("dragstart", {
|
|
316
|
-
dataTransfer: {}
|
|
317
|
-
});
|
|
318
|
-
(0, _vitest.expect)(wrapper.vm.draggedIndex).toBe(0);
|
|
319
|
-
await elements[1].trigger("dragover");
|
|
320
|
-
await elements[1].trigger("dragleave");
|
|
321
|
-
await elements[1].trigger("dragover");
|
|
322
|
-
await elements[1].trigger("drop");
|
|
323
|
-
(0, _vitest.expect)(wrapper.emitted("update:items")).toBeTruthy();
|
|
324
|
-
(0, _vitest.expect)(wrapper.emitted("reorder")).toBeTruthy();
|
|
325
|
-
await elements[0].trigger("dragend");
|
|
326
|
-
});
|
|
327
|
-
(0, _vitest.it)("should fallback internal items if missing items", async () => {
|
|
328
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
329
|
-
props: {
|
|
330
|
-
items: null
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
(0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain").exists()).toBe(true);
|
|
334
|
-
});
|
|
335
|
-
(0, _vitest.it)("should fall back to empty internalItems when items length is 0 and draggable is true", () => {
|
|
336
|
-
const wrapper = (0, _testUtils.mount)(_aiThoughtChain.default, {
|
|
337
|
-
props: {
|
|
338
|
-
items: [],
|
|
339
|
-
draggable: true
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
(0, _vitest.expect)(wrapper.find(".yh-ai-thought-chain").exists()).toBe(true);
|
|
343
|
-
});
|
|
344
|
-
});
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { mount } from "@vue/test-utils";
|
|
3
|
-
import { nextTick } from "vue";
|
|
4
|
-
import AiThoughtChain from "../src/ai-thought-chain.vue";
|
|
5
|
-
const makeItem = (title, status = "complete", content = "") => ({
|
|
6
|
-
title,
|
|
7
|
-
status,
|
|
8
|
-
content
|
|
9
|
-
});
|
|
10
|
-
describe("YhAiThoughtChain", () => {
|
|
11
|
-
it("should render with base class", () => {
|
|
12
|
-
const wrapper = mount(AiThoughtChain);
|
|
13
|
-
expect(wrapper.find(".yh-ai-thought-chain").exists()).toBe(true);
|
|
14
|
-
});
|
|
15
|
-
it("should render single node header when no items", () => {
|
|
16
|
-
const wrapper = mount(AiThoughtChain, { props: { title: "My Thought" } });
|
|
17
|
-
expect(wrapper.find(".yh-ai-thought-chain__header").exists()).toBe(true);
|
|
18
|
-
});
|
|
19
|
-
it("should render title in single node mode", () => {
|
|
20
|
-
const wrapper = mount(AiThoughtChain, { props: { title: "Thinking Title" } });
|
|
21
|
-
expect(wrapper.find(".yh-ai-thought-chain__title").text()).toBe("Thinking Title");
|
|
22
|
-
});
|
|
23
|
-
it("should fallback to default title when no title provided", () => {
|
|
24
|
-
const wrapper = mount(AiThoughtChain);
|
|
25
|
-
expect(wrapper.find(".yh-ai-thought-chain__title").text().length).toBeGreaterThan(0);
|
|
26
|
-
});
|
|
27
|
-
it("should compute thinking status when thinking=true", () => {
|
|
28
|
-
const wrapper = mount(AiThoughtChain, { props: { thinking: true } });
|
|
29
|
-
expect(wrapper.classes()).toContain("is-thinking");
|
|
30
|
-
});
|
|
31
|
-
it("should compute complete status when thinking=false", () => {
|
|
32
|
-
const wrapper = mount(AiThoughtChain, { props: { thinking: false } });
|
|
33
|
-
expect(wrapper.classes()).not.toContain("is-thinking");
|
|
34
|
-
});
|
|
35
|
-
it("should use explicit status prop over thinking", () => {
|
|
36
|
-
const wrapper = mount(AiThoughtChain, {
|
|
37
|
-
props: { status: "error", thinking: true }
|
|
38
|
-
});
|
|
39
|
-
expect(wrapper.classes()).not.toContain("is-thinking");
|
|
40
|
-
});
|
|
41
|
-
it("should be collapsed by default in single mode", () => {
|
|
42
|
-
const wrapper = mount(AiThoughtChain, { props: { content: "Some content" } });
|
|
43
|
-
expect(wrapper.classes()).not.toContain("is-expanded");
|
|
44
|
-
});
|
|
45
|
-
it("should expand on header click in single node mode", async () => {
|
|
46
|
-
const wrapper = mount(AiThoughtChain, {
|
|
47
|
-
props: { title: "Title", content: "Detail" }
|
|
48
|
-
});
|
|
49
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
50
|
-
expect(wrapper.classes()).toContain("is-expanded");
|
|
51
|
-
});
|
|
52
|
-
it("should collapse again on second header click", async () => {
|
|
53
|
-
const wrapper = mount(AiThoughtChain, { props: { content: "Detail" } });
|
|
54
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
55
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
56
|
-
expect(wrapper.classes()).not.toContain("is-expanded");
|
|
57
|
-
});
|
|
58
|
-
it("should render content in single mode when expanded", async () => {
|
|
59
|
-
const wrapper = mount(AiThoughtChain, {
|
|
60
|
-
props: { content: "Thought Content Detail" }
|
|
61
|
-
});
|
|
62
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
63
|
-
expect(wrapper.find(".yh-ai-thought-chain__text").text()).toBe("Thought Content Detail");
|
|
64
|
-
});
|
|
65
|
-
it("should auto-collapse when status becomes complete and autoCollapse=true", async () => {
|
|
66
|
-
const wrapper = mount(AiThoughtChain, {
|
|
67
|
-
props: { status: "thinking", autoCollapse: true }
|
|
68
|
-
});
|
|
69
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
70
|
-
expect(wrapper.classes()).toContain("is-expanded");
|
|
71
|
-
await wrapper.setProps({ status: "complete" });
|
|
72
|
-
await nextTick();
|
|
73
|
-
expect(wrapper.classes()).not.toContain("is-expanded");
|
|
74
|
-
});
|
|
75
|
-
it("should apply is-timeline class when items provided", () => {
|
|
76
|
-
const wrapper = mount(AiThoughtChain, {
|
|
77
|
-
props: { items: [makeItem("Step 1"), makeItem("Step 2")] }
|
|
78
|
-
});
|
|
79
|
-
expect(wrapper.classes()).toContain("is-timeline");
|
|
80
|
-
});
|
|
81
|
-
it("should render correct number of timeline items", () => {
|
|
82
|
-
const items = [makeItem("Step 1"), makeItem("Step 2"), makeItem("Step 3")];
|
|
83
|
-
const wrapper = mount(AiThoughtChain, { props: { items } });
|
|
84
|
-
expect(wrapper.findAll(".yh-ai-thought-chain__item").length).toBe(3);
|
|
85
|
-
});
|
|
86
|
-
it("should render item titles", () => {
|
|
87
|
-
const items = [makeItem("Alpha"), makeItem("Beta")];
|
|
88
|
-
const wrapper = mount(AiThoughtChain, { props: { items } });
|
|
89
|
-
const titles = wrapper.findAll(".yh-ai-thought-chain__item-title");
|
|
90
|
-
expect(titles[0].text()).toBe("Alpha");
|
|
91
|
-
expect(titles[1].text()).toBe("Beta");
|
|
92
|
-
});
|
|
93
|
-
it("should apply is-last class to last item", () => {
|
|
94
|
-
const items = [makeItem("First"), makeItem("Last")];
|
|
95
|
-
const wrapper = mount(AiThoughtChain, { props: { items } });
|
|
96
|
-
const allItems = wrapper.findAll(".yh-ai-thought-chain__item");
|
|
97
|
-
expect(allItems[allItems.length - 1].classes()).toContain("is-last");
|
|
98
|
-
});
|
|
99
|
-
it("should apply is-active class to thinking item", () => {
|
|
100
|
-
const items = [makeItem("Done", "complete"), makeItem("Running", "thinking")];
|
|
101
|
-
const wrapper = mount(AiThoughtChain, { props: { items } });
|
|
102
|
-
const allItems = wrapper.findAll(".yh-ai-thought-chain__item");
|
|
103
|
-
expect(allItems[1].classes()).toContain("is-active");
|
|
104
|
-
});
|
|
105
|
-
it("should expand last item by default in timeline mode", () => {
|
|
106
|
-
const items = [
|
|
107
|
-
makeItem("Step 1", "complete", "done"),
|
|
108
|
-
makeItem("Step 2", "complete", "also done")
|
|
109
|
-
];
|
|
110
|
-
const wrapper = mount(AiThoughtChain, { props: { items } });
|
|
111
|
-
const lastContent = wrapper.findAll(".yh-ai-thought-chain__item-content");
|
|
112
|
-
expect(lastContent.length).toBeGreaterThan(0);
|
|
113
|
-
});
|
|
114
|
-
it("should toggle item expand on item header click", async () => {
|
|
115
|
-
const items = [makeItem("Step", "complete", "content here")];
|
|
116
|
-
const wrapper = mount(AiThoughtChain, { props: { items } });
|
|
117
|
-
const itemHeader = wrapper.find(".yh-ai-thought-chain__item-header");
|
|
118
|
-
await itemHeader.trigger("click");
|
|
119
|
-
expect(wrapper.find(".yh-ai-thought-chain__item").exists()).toBe(true);
|
|
120
|
-
});
|
|
121
|
-
it("should apply dotSize prop to item dots", () => {
|
|
122
|
-
const items = [makeItem("Step", "complete")];
|
|
123
|
-
const wrapper = mount(AiThoughtChain, { props: { items, dotSize: "large" } });
|
|
124
|
-
const dotEl = wrapper.find(".yh-ai-thought-chain__item-dot");
|
|
125
|
-
expect(dotEl.exists()).toBe(true);
|
|
126
|
-
expect(dotEl.classes().join(" ")).toContain("large");
|
|
127
|
-
});
|
|
128
|
-
it("should render default slot in single node mode", async () => {
|
|
129
|
-
const wrapper = mount(AiThoughtChain, {
|
|
130
|
-
slots: { default: '<em class="slot-content">Slot</em>' }
|
|
131
|
-
});
|
|
132
|
-
await wrapper.find(".yh-ai-thought-chain__header").trigger("click");
|
|
133
|
-
expect(wrapper.find(".slot-content").exists()).toBe(true);
|
|
134
|
-
});
|
|
135
|
-
it("should compute and show progress", async () => {
|
|
136
|
-
const items = [
|
|
137
|
-
makeItem("Step 1", "complete"),
|
|
138
|
-
makeItem("Step 2", "success"),
|
|
139
|
-
makeItem("Step 3", "thinking"),
|
|
140
|
-
makeItem("Step 4", "none")
|
|
141
|
-
];
|
|
142
|
-
const wrapper = mount(AiThoughtChain, {
|
|
143
|
-
props: { items, showProgress: true }
|
|
144
|
-
});
|
|
145
|
-
const progressFill = wrapper.find(".yh-ai-thought-chain__progress-fill");
|
|
146
|
-
expect(progressFill.exists()).toBe(true);
|
|
147
|
-
expect(progressFill.attributes("style")).toContain("width: 50%");
|
|
148
|
-
});
|
|
149
|
-
it("should get correct status icons", () => {
|
|
150
|
-
const items = [
|
|
151
|
-
makeItem("Step 1", "error"),
|
|
152
|
-
makeItem("Step 2", "success", "Detail 2"),
|
|
153
|
-
makeItem("Step 3", "loading", "Detail 3")
|
|
154
|
-
];
|
|
155
|
-
items[1].expanded = true;
|
|
156
|
-
items[2].expanded = true;
|
|
157
|
-
const wrapper = mount(AiThoughtChain, { props: { items } });
|
|
158
|
-
expect(wrapper.html()).toContain("yh-ai-thought-chain--error");
|
|
159
|
-
});
|
|
160
|
-
it("should emit node-click when item content is clicked", async () => {
|
|
161
|
-
const items = [
|
|
162
|
-
{ title: "Step 1", content: "click me", status: "complete", expanded: true }
|
|
163
|
-
];
|
|
164
|
-
const wrapper = mount(AiThoughtChain, { props: { items } });
|
|
165
|
-
const contentText = wrapper.find(".yh-ai-thought-chain__item-content");
|
|
166
|
-
await contentText.trigger("click");
|
|
167
|
-
expect(wrapper.emitted("node-click")).toBeTruthy();
|
|
168
|
-
});
|
|
169
|
-
it("should emit node-click, even with description", async () => {
|
|
170
|
-
const items = [
|
|
171
|
-
{ title: "Step 1", description: "desc", status: "complete", expanded: true }
|
|
172
|
-
];
|
|
173
|
-
const wrapper = mount(AiThoughtChain, { props: { items } });
|
|
174
|
-
const contentText = wrapper.find(".yh-ai-thought-chain__item-content");
|
|
175
|
-
await contentText.trigger("click");
|
|
176
|
-
expect(wrapper.emitted("node-click")).toBeTruthy();
|
|
177
|
-
});
|
|
178
|
-
it("should not emit node-click if clickable is false", async () => {
|
|
179
|
-
const items = [{ title: "Step 1", content: "click", clickable: false, expanded: true }];
|
|
180
|
-
const wrapper = mount(AiThoughtChain, { props: { items } });
|
|
181
|
-
const contentText = wrapper.find(".yh-ai-thought-chain__item-content");
|
|
182
|
-
await contentText.trigger("click");
|
|
183
|
-
expect(wrapper.emitted("node-click")).toBeFalsy();
|
|
184
|
-
});
|
|
185
|
-
it("should handle add and delete node in editable mode", async () => {
|
|
186
|
-
const items = [makeItem("Step 1", "complete")];
|
|
187
|
-
const wrapper = mount(AiThoughtChain, {
|
|
188
|
-
props: { items, editable: true }
|
|
189
|
-
});
|
|
190
|
-
const actionIcons = wrapper.findAll(".yh-ai-thought-chain__action-icon");
|
|
191
|
-
await actionIcons[0].trigger("click");
|
|
192
|
-
expect(wrapper.emitted("node-delete")).toBeTruthy();
|
|
193
|
-
expect(wrapper.emitted("update:items")).toBeTruthy();
|
|
194
|
-
expect(wrapper.emitted("reorder")).toBeTruthy();
|
|
195
|
-
await actionIcons[1].trigger("click");
|
|
196
|
-
expect(wrapper.emitted("node-add")).toBeTruthy();
|
|
197
|
-
const bottomAddNode = wrapper.find(".yh-ai-thought-chain__add-node");
|
|
198
|
-
await bottomAddNode.trigger("click");
|
|
199
|
-
expect(wrapper.emitted("node-add")?.length).toBe(2);
|
|
200
|
-
});
|
|
201
|
-
it("should not mutate internalItems when editable is false", async () => {
|
|
202
|
-
const items = [makeItem("Step 1", "complete")];
|
|
203
|
-
const wrapper = mount(AiThoughtChain, {
|
|
204
|
-
props: { items, editable: false }
|
|
205
|
-
});
|
|
206
|
-
expect(wrapper.find(".yh-ai-thought-chain__item-actions").exists()).toBe(false);
|
|
207
|
-
expect(wrapper.find(".yh-ai-thought-chain__add-node").exists()).toBe(false);
|
|
208
|
-
});
|
|
209
|
-
it("should handle drag and drop", async () => {
|
|
210
|
-
const items = [makeItem("1"), makeItem("2")];
|
|
211
|
-
const wrapper = mount(AiThoughtChain, {
|
|
212
|
-
props: { items, draggable: true }
|
|
213
|
-
});
|
|
214
|
-
const elements = wrapper.findAll(".yh-ai-thought-chain__item");
|
|
215
|
-
await elements[0].trigger("dragstart", { dataTransfer: {} });
|
|
216
|
-
expect(wrapper.vm.draggedIndex).toBe(0);
|
|
217
|
-
await elements[1].trigger("dragover");
|
|
218
|
-
await elements[1].trigger("dragleave");
|
|
219
|
-
await elements[1].trigger("dragover");
|
|
220
|
-
await elements[1].trigger("drop");
|
|
221
|
-
expect(wrapper.emitted("update:items")).toBeTruthy();
|
|
222
|
-
expect(wrapper.emitted("reorder")).toBeTruthy();
|
|
223
|
-
await elements[0].trigger("dragend");
|
|
224
|
-
});
|
|
225
|
-
it("should fallback internal items if missing items", async () => {
|
|
226
|
-
const wrapper = mount(AiThoughtChain, {
|
|
227
|
-
props: { items: null }
|
|
228
|
-
});
|
|
229
|
-
expect(wrapper.find(".yh-ai-thought-chain").exists()).toBe(true);
|
|
230
|
-
});
|
|
231
|
-
it("should fall back to empty internalItems when items length is 0 and draggable is true", () => {
|
|
232
|
-
const wrapper = mount(AiThoughtChain, {
|
|
233
|
-
props: { items: [], draggable: true }
|
|
234
|
-
});
|
|
235
|
-
expect(wrapper.find(".yh-ai-thought-chain").exists()).toBe(true);
|
|
236
|
-
});
|
|
237
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _vitest = require("vitest");
|
|
4
|
-
var _vue = require("vue");
|
|
5
|
-
var _serverRenderer = require("@vue/server-renderer");
|
|
6
|
-
var _aiVoiceTrigger = _interopRequireDefault(require("../src/ai-voice-trigger.vue"));
|
|
7
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
-
(0, _vitest.describe)("YhAiVoiceTrigger SSR", () => {
|
|
9
|
-
(0, _vitest.it)("should render successfully in SSR environment", async () => {
|
|
10
|
-
const app = (0, _vue.createSSRApp)({
|
|
11
|
-
components: {
|
|
12
|
-
AiVoiceTrigger: _aiVoiceTrigger.default
|
|
13
|
-
},
|
|
14
|
-
template: "<ai-voice-trigger />"
|
|
15
|
-
});
|
|
16
|
-
const html = await (0, _serverRenderer.renderToString)(app);
|
|
17
|
-
(0, _vitest.expect)(html).toContain("yh-ai-voice-trigger");
|
|
18
|
-
(0, _vitest.expect)(html).toContain("yh-ai-voice-trigger__trigger");
|
|
19
|
-
});
|
|
20
|
-
(0, _vitest.it)("should render recording state correctly in SSR", async () => {
|
|
21
|
-
const app = (0, _vue.createSSRApp)({
|
|
22
|
-
components: {
|
|
23
|
-
AiVoiceTrigger: _aiVoiceTrigger.default
|
|
24
|
-
},
|
|
25
|
-
template: '<ai-voice-trigger :recording="true" />'
|
|
26
|
-
});
|
|
27
|
-
const html = await (0, _serverRenderer.renderToString)(app);
|
|
28
|
-
(0, _vitest.expect)(html).toContain("is-recording");
|
|
29
|
-
(0, _vitest.expect)(html).toContain("yh-ai-voice-trigger__visualizer");
|
|
30
|
-
(0, _vitest.expect)(html).toContain("yh-ai-voice-trigger__bars");
|
|
31
|
-
});
|
|
32
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { createSSRApp } from "vue";
|
|
3
|
-
import { renderToString } from "@vue/server-renderer";
|
|
4
|
-
import AiVoiceTrigger from "../src/ai-voice-trigger.vue";
|
|
5
|
-
describe("YhAiVoiceTrigger SSR", () => {
|
|
6
|
-
it("should render successfully in SSR environment", async () => {
|
|
7
|
-
const app = createSSRApp({
|
|
8
|
-
components: { AiVoiceTrigger },
|
|
9
|
-
template: "<ai-voice-trigger />"
|
|
10
|
-
});
|
|
11
|
-
const html = await renderToString(app);
|
|
12
|
-
expect(html).toContain("yh-ai-voice-trigger");
|
|
13
|
-
expect(html).toContain("yh-ai-voice-trigger__trigger");
|
|
14
|
-
});
|
|
15
|
-
it("should render recording state correctly in SSR", async () => {
|
|
16
|
-
const app = createSSRApp({
|
|
17
|
-
components: { AiVoiceTrigger },
|
|
18
|
-
template: '<ai-voice-trigger :recording="true" />'
|
|
19
|
-
});
|
|
20
|
-
const html = await renderToString(app);
|
|
21
|
-
expect(html).toContain("is-recording");
|
|
22
|
-
expect(html).toContain("yh-ai-voice-trigger__visualizer");
|
|
23
|
-
expect(html).toContain("yh-ai-voice-trigger__bars");
|
|
24
|
-
});
|
|
25
|
-
});
|