diff --git a/packages/ui/client/auto-imports.d.ts b/packages/ui/client/auto-imports.d.ts index 021bd219e..988fe2d8d 100644 --- a/packages/ui/client/auto-imports.d.ts +++ b/packages/ui/client/auto-imports.d.ts @@ -12,6 +12,7 @@ declare global { const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] const calcExternalLabels: typeof import('./composables/module-graph')['calcExternalLabels'] const codemirrorRef: typeof import('./composables/codemirror')['codemirrorRef'] + const columnNumber: typeof import('./composables/params')['columnNumber'] const computed: typeof import('vue')['computed'] const computedAsync: typeof import('@vueuse/core')['computedAsync'] const computedEager: typeof import('@vueuse/core')['computedEager'] @@ -49,6 +50,7 @@ declare global { const eagerComputed: typeof import('@vueuse/core')['eagerComputed'] const effectScope: typeof import('vue')['effectScope'] const extendRef: typeof import('@vueuse/core')['extendRef'] + const getAttachmentUrl: typeof import('./composables/attachments')['getAttachmentUrl'] const getCurrentBrowserIframe: typeof import('./composables/api')['getCurrentBrowserIframe'] const getCurrentInstance: typeof import('vue')['getCurrentInstance'] const getCurrentScope: typeof import('vue')['getCurrentScope'] @@ -61,13 +63,16 @@ declare global { const injectLocal: typeof import('@vueuse/core')['injectLocal'] const isDark: typeof import('./composables/dark')['isDark'] const isDefined: typeof import('@vueuse/core')['isDefined'] + const isExternalAttachment: typeof import('./composables/attachments')['isExternalAttachment'] const isProxy: typeof import('vue')['isProxy'] const isReactive: typeof import('vue')['isReactive'] const isReadonly: typeof import('vue')['isReadonly'] const isRef: typeof import('vue')['isRef'] + const isTestFile: typeof import('./composables/error')['isTestFile'] const lineNumber: typeof import('./composables/params')['lineNumber'] const mainSizes: typeof import('./composables/navigation')['mainSizes'] const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable'] + const mapLeveledTaskStacks: typeof import('./composables/error')['mapLeveledTaskStacks'] const markRaw: typeof import('vue')['markRaw'] const navigateTo: typeof import('./composables/navigation')['navigateTo'] const nextTick: typeof import('vue')['nextTick'] @@ -94,6 +99,7 @@ declare global { const onUpdated: typeof import('vue')['onUpdated'] const onWatcherCleanup: typeof import('vue')['onWatcherCleanup'] const openInEditor: typeof import('./composables/error')['openInEditor'] + const openScreenshot: typeof import('./composables/screenshot')['openScreenshot'] const openedTreeItems: typeof import('./composables/navigation')['openedTreeItems'] const panels: typeof import('./composables/navigation')['panels'] const params: typeof import('./composables/params')['params'] @@ -120,19 +126,23 @@ declare global { const resolveComponent: typeof import('vue')['resolveComponent'] const resolveRef: typeof import('@vueuse/core')['resolveRef'] const resolveUnref: typeof import('@vueuse/core')['resolveUnref'] + const sanitizeFilePath: typeof import('./composables/attachments')['sanitizeFilePath'] const selectedTest: typeof import('./composables/params')['selectedTest'] const setIframeViewport: typeof import('./composables/api')['setIframeViewport'] const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowRef: typeof import('vue')['shallowRef'] const shouldOpenInEditor: typeof import('./composables/error')['shouldOpenInEditor'] + const showAnnotationSource: typeof import('./composables/codemirror')['showAnnotationSource'] const showCoverage: typeof import('./composables/navigation')['showCoverage'] const showDashboard: typeof import('./composables/navigation')['showDashboard'] const showLine: typeof import('./composables/codemirror')['showLine'] + const showLocationSource: typeof import('./composables/codemirror')['showLocationSource'] const showNavigationPanel: typeof import('./composables/navigation')['showNavigationPanel'] const showReport: typeof import('./composables/navigation')['showReport'] const showRightPanel: typeof import('./composables/navigation')['showRightPanel'] const showSource: typeof import('./composables/codemirror')['showSource'] + const showTaskSource: typeof import('./composables/codemirror')['showTaskSource'] const syncRef: typeof import('@vueuse/core')['syncRef'] const syncRefs: typeof import('@vueuse/core')['syncRefs'] const templateRef: typeof import('@vueuse/core')['templateRef'] @@ -279,6 +289,7 @@ declare global { const useSSRWidth: typeof import('@vueuse/core')['useSSRWidth'] const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation'] const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea'] + const useScreenshot: typeof import('./composables/screenshot')['useScreenshot'] const useScriptTag: typeof import('@vueuse/core')['useScriptTag'] const useScroll: typeof import('@vueuse/core')['useScroll'] const useScrollLock: typeof import('@vueuse/core')['useScrollLock'] diff --git a/packages/ui/client/components.d.ts b/packages/ui/client/components.d.ts index 0a7fe8fa8..8bd55fe18 100644 --- a/packages/ui/client/components.d.ts +++ b/packages/ui/client/components.d.ts @@ -7,6 +7,7 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + AnnotationAttachmentImage: typeof import('./components/AnnotationAttachmentImage.vue')['default'] BrowserIframe: typeof import('./components/BrowserIframe.vue')['default'] CodeMirrorContainer: typeof import('./components/CodeMirrorContainer.vue')['default'] ConnectionOverlay: typeof import('./components/ConnectionOverlay.vue')['default'] @@ -38,5 +39,6 @@ declare module 'vue' { ViewModuleGraph: typeof import('./components/views/ViewModuleGraph.vue')['default'] ViewReport: typeof import('./components/views/ViewReport.vue')['default'] ViewReportError: typeof import('./components/views/ViewReportError.vue')['default'] + ViewTestReport: typeof import('./components/views/ViewTestReport.vue')['default'] } } diff --git a/packages/ui/client/components/AnnotationAttachmentImage.vue b/packages/ui/client/components/AnnotationAttachmentImage.vue new file mode 100644 index 000000000..6196bf21c --- /dev/null +++ b/packages/ui/client/components/AnnotationAttachmentImage.vue @@ -0,0 +1,34 @@ + + + diff --git a/packages/ui/client/components/FileDetails.vue b/packages/ui/client/components/FileDetails.vue index db1f236ad..74fb43d83 100644 --- a/packages/ui/client/components/FileDetails.vue +++ b/packages/ui/client/components/FileDetails.vue @@ -1,4 +1,5 @@ @@ -174,7 +190,7 @@ const projectNameTextColor = computed(() => { {{ current.file.projectName }}
- {{ current?.name }} + {{ testTitle }}
{ :file="current" data-testid="console" /> - + +
diff --git a/packages/ui/client/components/explorer/ExplorerItem.vue b/packages/ui/client/components/explorer/ExplorerItem.vue index d813df041..06b61fd99 100644 --- a/packages/ui/client/components/explorer/ExplorerItem.vue +++ b/packages/ui/client/components/explorer/ExplorerItem.vue @@ -4,11 +4,12 @@ import type { TaskTreeNodeType } from '~/composables/explorer/types' import { Tooltip as VueTooltip } from 'floating-vue' import { nextTick } from 'vue' import { client, isReport, runFiles, runTask } from '~/composables/client' -import { showSource } from '~/composables/codemirror' +import { showTaskSource } from '~/composables/codemirror' import { explorerTree } from '~/composables/explorer' import { hasFailedSnapshot } from '~/composables/explorer/collector' import { escapeHtml, highlightRegex } from '~/composables/explorer/state' import { coverageEnabled } from '~/composables/navigation' +import { getProjectTextColor } from '~/utils/task' // TODO: better handling of "opened" - it means to forcefully open the tree item and set in TasksList right now const { @@ -149,26 +150,11 @@ function showDetails() { onItemClick?.(t) } else { - showSource(t) + showTaskSource(t) } } -const projectNameTextColor = computed(() => { - switch (projectNameColor) { - case 'blue': - case 'green': - case 'magenta': - case 'black': - case 'red': - return 'white' - - case 'yellow': - case 'cyan': - case 'white': - default: - return 'black' - } -}) +const projectNameTextColor = computed(() => getProjectTextColor(projectNameColor))