Skip to content

docs: add test in the features page #3255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions examples/sites/demos/pc/app/button/webdoc/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ export default {
value: true,
remark: '规范只支持主要按钮、次要按钮、危险按钮、文本按钮4种,不支持成功按钮、警告按钮、信息按钮。'
},
'e2e-test': true,
'unit-test': true,
apis: ['type'],
demos: ['basic-usage']
},
Expand All @@ -171,6 +173,8 @@ export default {
cloud: {
value: true
},
'e2e-test': true,
'unit-test': true,
apis: ['round'],
demos: ['round']
},
Expand All @@ -184,6 +188,8 @@ export default {
cloud: {
value: false
},
'e2e-test': true,
'unit-test': true,
apis: ['circle'],
demos: ['circle']
},
Expand All @@ -197,6 +203,8 @@ export default {
cloud: {
value: true
},
'e2e-test': true,
'unit-test': false,
apis: ['ghost'],
demos: ['ghost']
},
Expand All @@ -210,6 +218,8 @@ export default {
cloud: {
value: true
},
'e2e-test': true,
'unit-test': true,
apis: ['disabled'],
demos: ['dynamic-disabled']
},
Expand All @@ -223,6 +233,8 @@ export default {
cloud: {
value: true
},
'e2e-test': true,
'unit-test': true,
apis: ['icon'],
demos: ['icon']
},
Expand All @@ -236,6 +248,8 @@ export default {
cloud: {
value: true
},
'e2e-test': true,
'unit-test': true,
apis: ['loading'],
demos: ['loading']
},
Expand All @@ -249,6 +263,8 @@ export default {
cloud: {
value: true
},
'e2e-test': true,
'unit-test': true,
apis: ['size'],
demos: ['size']
},
Expand All @@ -262,6 +278,8 @@ export default {
cloud: {
value: false
},
'e2e-test': true,
'unit-test': false,
apis: ['reset-time'],
demos: ['reset-time']
}
Expand Down
12 changes: 11 additions & 1 deletion examples/sites/src/views/features.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="ti-p48">
<div class="ti-mw1000 !mx-auto markdown-body">
<div class="ti-mw1000 !mx-auto markdown-body feature-list-container">
<h1 class="ti-f-r ti-f-box-center">
组件特性列表
<tiny-tag size="small" type="success" :title="`${componentCount} components`" class="ml8">{{
Expand Down Expand Up @@ -95,6 +95,8 @@
<i :class="[feature.cloud.remark ? 'i-ti-cloud' : 'i-ti-cloud-full', 'ml4']"></i>
</template>
</tiny-popover>
<i :class="[feature['e2e-test'] ? 'i-ti-e2e-test' : '', 'ml4']" title="E2E 测试用例已覆盖"></i>
<i :class="[feature['unit-test'] ? 'i-ti-unit-test' : '', 'ml4']" title="单元测试用例已覆盖"></i>
</tiny-col>
</tiny-row>
</tiny-layout>
Expand Down Expand Up @@ -164,3 +166,11 @@ const toUpperCamelCase = (str) =>
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join('')
</script>

<style lang="scss" scoped>
.feature-list-container :deep(.reference-wrapper) {
display: flex;
align-items: center;
justify-content: center;
}
</style>
16 changes: 15 additions & 1 deletion examples/sites/uno.config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading