Skip to content

Commit

Permalink
feat(ui): insert message "no tests found" in ui (#7366)
Browse files Browse the repository at this point in the history
  • Loading branch information
DevJoaoLopes authored Feb 3, 2025
1 parent 191ef9e commit 92da490
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
13 changes: 4 additions & 9 deletions packages/ui/client/components/ProgressBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@ import { explorerTree } from '~/composables/explorer'
const { width } = useWindowSize()
const classes = computed(() => {
// if there are no files, then in progress and gray
if (explorerTree.summary.files === 0) {
return '!bg-gray-4 !dark:bg-gray-7 in-progress'
}
else if (!finished.value) {
return 'in-progress'
}
return null
return [
explorerTree.summary.files === 0 && '!bg-gray-4 !dark:bg-gray-7',
!finished.value && 'in-progress',
].filter(Boolean).join(' ')
})
const widthPass = computed(() => {
Expand Down
12 changes: 10 additions & 2 deletions packages/ui/client/components/dashboard/TestsFilesContainer.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
<script setup lang="ts">
import { finished } from '~/composables/client/state'
import { explorerTree } from '~/composables/explorer'
</script>

<template>
<div gap-0 flex="~ col gap-4" h-full justify-center items-center>
<!-- <div bg-header rounded-lg p="y4 x2"> -->
<template v-if="explorerTree.summary.files === 0 && finished">
<div class="text-gray-5">
No tests found
</div>
</template>
<section aria-labelledby="tests" m="y-4 x-2">
<TestsEntry />
</section>
<TestFilesEntry />
<!-- </div> -->
</div>
</template>

0 comments on commit 92da490

Please sign in to comment.