Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
feat(client): todo open in editor CTA
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Dec 16, 2021
1 parent 7f4db35 commit aa3ae34
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions packages/peeky-client/src/features/test/TestResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import { useMutation } from '@vue/apollo-composable'
import gql from 'graphql-tag'
import { computed, defineProps, ref } from 'vue'
import { ChevronRightIcon } from '@zhuowenli/vue-feather-icons'
import BaseButton from '../BaseButton.vue'
import StatusIcon from '../StatusIcon.vue'
import TestAssertionDiff from './TestAssertionDiff.vue'
import BaseButton from '../BaseButton.vue'
const props = defineProps({
test: {
Expand Down Expand Up @@ -66,13 +66,26 @@ const diffShown = computed(() => props.test?.error?.actual && props.test?.error?

<template>
<div class="flex flex-col">
<StatusIcon
<div
v-if="test.status !== 'error'"
:status="test.status"
class="flex-none mx-auto my-auto"
icon-class="w-24 h-24 p-4"
bg
/>
class="flex-none mx-auto my-auto flex flex-col items-center space-y-4"
>
<StatusIcon
:status="test.status"
class="flex-none"
icon-class="w-24 h-24 p-4"
bg
/>

<BaseButton
v-if="test.status === 'todo'"
color="gray"
class="px-4 py-2"
@click="openInEditor({ id: suite.runTestFile.testFile.id, line: 1, col: 1 })"
>
Open in your editor
</BaseButton>
</div>

<template v-else>
<div class="bg-red-100 dark:bg-red-900 text-red-600 dark:text-red-300 rounded m-1 divide-y divide-red-200 dark:divide-red-800">
Expand Down

0 comments on commit aa3ae34

Please sign in to comment.