Skip to content

Commit 92da490

Browse files
authored
feat(ui): insert message "no tests found" in ui (#7366)
1 parent 191ef9e commit 92da490

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

packages/ui/client/components/ProgressBar.vue

+4-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,10 @@ import { explorerTree } from '~/composables/explorer'
44
55
const { width } = useWindowSize()
66
const classes = computed(() => {
7-
// if there are no files, then in progress and gray
8-
if (explorerTree.summary.files === 0) {
9-
return '!bg-gray-4 !dark:bg-gray-7 in-progress'
10-
}
11-
else if (!finished.value) {
12-
return 'in-progress'
13-
}
14-
15-
return null
7+
return [
8+
explorerTree.summary.files === 0 && '!bg-gray-4 !dark:bg-gray-7',
9+
!finished.value && 'in-progress',
10+
].filter(Boolean).join(' ')
1611
})
1712
1813
const widthPass = computed(() => {
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
<script setup lang="ts">
2+
import { finished } from '~/composables/client/state'
3+
import { explorerTree } from '~/composables/explorer'
4+
</script>
5+
16
<template>
27
<div gap-0 flex="~ col gap-4" h-full justify-center items-center>
3-
<!-- <div bg-header rounded-lg p="y4 x2"> -->
8+
<template v-if="explorerTree.summary.files === 0 && finished">
9+
<div class="text-gray-5">
10+
No tests found
11+
</div>
12+
</template>
413
<section aria-labelledby="tests" m="y-4 x-2">
514
<TestsEntry />
615
</section>
716
<TestFilesEntry />
8-
<!-- </div> -->
917
</div>
1018
</template>

0 commit comments

Comments
 (0)