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

Commit

Permalink
feat: refetch output on test status change
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Dec 21, 2021
1 parent d787ef5 commit e025ee4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/peeky-client/src/features/test/TestOutput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { useQuery, useResult } from '@vue/apollo-composable'
import gql from 'graphql-tag'
import { useRoute } from 'vue-router'
import { defineProps, onMounted, ref } from 'vue'
import { defineProps, onMounted, ref, watch } from 'vue'
import Terminal from '../terminal/Terminal.vue'
const route = useRoute()
Expand All @@ -20,7 +20,7 @@ const props = defineProps({
},
})
const { result } = useQuery(() => gql`
const { result, refetch } = useQuery(() => gql`
query testLogs ($runId: ID!, $suiteId: ID!, $testId: ID!) {
run (id: $runId) {
id
Expand All @@ -46,6 +46,12 @@ const { result } = useQuery(() => gql`
const logs = useResult(result, [], data => data.run.testSuite.test.logs)
watch(() => props.test.status, () => {
refetch()
})
// Fonts
const fontsLoaded = ref(false)
onMounted(async () => {
await document.fonts.load('14px "Fira Code"')
Expand Down

0 comments on commit e025ee4

Please sign in to comment.