-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
InlineRunAllSpecs.vue
52 lines (47 loc) · 1.26 KB
/
InlineRunAllSpecs.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<template>
<Tooltip
placement="right"
:data-cy="`run-all-specs-for-${directory}`"
>
<button
class="flex h-full w-full items-center justify-center"
data-cy="run-all-specs-button"
:disabled="specNumber === 0"
@click.stop="emits('runAllSpecs')"
>
<IconActionPlaySmall
size="16"
:stroke-color="grayscale ? 'gray-200' : 'gray-700'"
fill-color="transparent"
:hocus-stroke-color="grayscale ? undefined : 'indigo-500'"
:hocus-fill-color="grayscale ? undefined : 'indigo-100'"
class="inline-flex align-text-bottom"
data-cy="play-button"
/>
</button>
<template
#popper
>
<span
class="font-normal text-sm inline-flex"
data-cy="tooltip-content"
>
{{ t('specPage.runSelectedSpecs', specNumber) }}
</span>
</template>
</Tooltip>
</template>
<script lang="ts" setup>
import { IconActionPlaySmall } from '@cypress-design/vue-icon'
import Tooltip from '@packages/frontend-shared/src/components/Tooltip.vue'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
defineProps<{
specNumber: number
directory: string
grayscale?: boolean
}>()
const emits = defineEmits<{
(event: 'runAllSpecs'): void
}>()
</script>