-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: IATR non-failure run statuses (#25286)
Co-authored-by: Rocky <25568640+rockindahizzy@users.noreply.github.com>
- Loading branch information
1 parent
9008365
commit bad5093
Showing
16 changed files
with
612 additions
and
751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<template> | ||
<Alert | ||
:title="t('debugPage.manuallyCancelled')" | ||
status="warning" | ||
:icon="ErrorOutlineIcon" | ||
class="flex flex-col mb-24px w-full" | ||
> | ||
<div class="flex items-center"> | ||
<div>{{ t('debugPage.specsSkipped', {n: totalSpecs, totalSkippedSpecs}) }}</div> | ||
<template v-if="cancellation.cancelledBy?.email && cancellation.cancelledBy.fullName"> | ||
<div class="rounded-full font-semibold bg-orange-500 h-3px mx-10px w-3px" /> | ||
<div class="flex items-center"> | ||
<UserAvatar | ||
:email="cancellation.cancelledBy.email" | ||
class="h-20px mr-7px w-20px" | ||
data-cy="cancelled-by-user-avatar" | ||
/> | ||
<div>{{ cancellation.cancelledBy.fullName }}</div> | ||
</div> | ||
</template> | ||
<template v-if="cancellation.cancelledAt"> | ||
<div class="rounded-full font-semibold bg-orange-500 h-3px mx-10px w-3px" /> | ||
<div> | ||
{{ dayjs(cancellation.cancelledAt).local().format('MMM D, YYYY h:mm A') }} | ||
</div> | ||
</template> | ||
</div> | ||
</Alert> | ||
</template> | ||
<script lang="ts" setup> | ||
import UserAvatar from '@packages/frontend-shared/src/gql-components/topnav/UserAvatar.vue' | ||
import ErrorOutlineIcon from '~icons/cy/status-errored-outline_x16.svg' | ||
import Alert from '@cy/components/Alert.vue' | ||
import { dayjs } from '../runs/utils/day' | ||
import { useI18n } from '@cy/i18n' | ||
const { t } = useI18n() | ||
defineProps<{ | ||
totalSpecs: number | ||
totalSkippedSpecs: number | ||
cancellation: { | ||
cancelledAt?: string | null | ||
cancelledBy: { | ||
fullName?: string | null | ||
email?: string | null | ||
} | null | ||
} | ||
}>() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<template> | ||
<Alert | ||
:title="t('debugPage.incomplete')" | ||
status="warning" | ||
:icon="ErrorOutlineIcon" | ||
class="flex flex-col mb-24px w-full" | ||
> | ||
<div class="ml-5px"> | ||
<ul | ||
v-for="(error, index) in errors" | ||
:key="index" | ||
class="list-disc ml-25px" | ||
> | ||
<li><pre>{{ error }}</pre></li> | ||
</ul> | ||
</div> | ||
<div class="mt-20px"> | ||
{{ t('debugPage.specsSkipped', {n: totalSpecs, totalSkippedSpecs}) }} | ||
</div> | ||
</Alert> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import ErrorOutlineIcon from '~icons/cy/status-errored-outline_x16.svg' | ||
import Alert from '@cy/components/Alert.vue' | ||
import dayjs from 'dayjs' | ||
import utc from 'dayjs/plugin/utc' | ||
import { useI18n } from '@cy/i18n' | ||
const { t } = useI18n() | ||
dayjs.extend(utc) | ||
defineProps<{ | ||
errors?: readonly string[] | ||
totalSpecs: number | ||
totalSkippedSpecs: number | ||
}>() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<template> | ||
<Alert | ||
:title="t('debugPage.incomplete')" | ||
status="warning" | ||
:icon="ErrorOutlineIcon" | ||
class="flex flex-col mb-24px w-full" | ||
> | ||
{{ t('debugPage.runHasNoTests') }} | ||
</Alert> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import ErrorOutlineIcon from '~icons/cy/status-errored-outline_x16.svg' | ||
import Alert from '@cy/components/Alert.vue' | ||
import { useI18n } from '@cy/i18n' | ||
const { t } = useI18n() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template> | ||
<div | ||
class="flex flex-col items-center" | ||
> | ||
<LockedProject class="icon-dark-gray-500" /> | ||
<span class="font-medium mt-24px text-gray-900"> | ||
{{ t('debugPage.overPlanLimit') }} | ||
</span> | ||
<span class="mt-10px text-gray-600">{{ t('debugPage.reachedMonthlyUsage') }}</span> | ||
<span class="text-gray-600">{{ t('debugPage.upgradeYourPlan') }}</span> | ||
<Button | ||
size="lg" | ||
class="mt-25px" | ||
:href="actionUrl" | ||
> | ||
{{ overLimitActionType === 'CONTACT_ADMIN' ? t('debugPage.contactAdmin') : t('debugPage.upgradePlan') }} | ||
</Button> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import LockedProject from '~icons/cy/locked-project_x48.svg' | ||
import Button from '@packages/frontend-shared/src/components/Button.vue' | ||
import type { OverLimitActionTypeEnum } from '../generated/graphql' | ||
import { getUtmSource } from '@packages/frontend-shared/src/utils/getUtmSource' | ||
import { useI18n } from '@cy/i18n' | ||
import { getUrlWithParams } from '@packages/frontend-shared/src/utils/getUrlWithParams' | ||
import { computed } from '@vue/reactivity' | ||
const { t } = useI18n() | ||
const props = defineProps<{ | ||
overLimitActionType: OverLimitActionTypeEnum | ||
overLimitActionUrl: string | ||
}>() | ||
const actionUrl = computed(() => { | ||
return getUrlWithParams({ url: props.overLimitActionUrl, params: { utmMedium: 'Debug Tab', utmSource: getUtmSource() } }) | ||
}) | ||
</script> |
Oops, something went wrong.