feat(graph): add Federation Graph page and enhance coverage

Adds a new Federation Graph page to display subgraphs and their 
schemas. Implements loading state and error handling. Enhances 
coverage reporting by including 'lcov' format for better insights 
into test coverage metrics.
This commit is contained in:
2025-11-22 19:49:53 +01:00
parent 535a516732
commit 5dc29141d5
10 changed files with 382 additions and 12 deletions
+54 -10
View File
@@ -2,16 +2,36 @@ import { config } from '@vue/test-utils'
import { vi } from 'vitest'
import * as Vue from 'vue'
// Mock localStorage
const localStorageMock = {
getItem: vi.fn(),
setItem: vi.fn(),
removeItem: vi.fn(),
clear: vi.fn(),
key: vi.fn(),
length: 0,
// Mock localStorage with actual implementation
class LocalStorageMock {
private store: Map<string, string> = new Map()
getItem(key: string): string | null {
return this.store.get(key) ?? null
}
setItem(key: string, value: string): void {
this.store.set(key, value)
}
removeItem(key: string): void {
this.store.delete(key)
}
clear(): void {
this.store.clear()
}
key(index: number): string | null {
return Array.from(this.store.keys())[index] ?? null
}
get length(): number {
return this.store.size
}
}
global.localStorage = localStorageMock as unknown as Storage
global.localStorage = new LocalStorageMock() as unknown as Storage
// Make Vue composables globally available
global.ref = Vue.ref
@@ -87,7 +107,31 @@ config.global.stubs = {
VIcon: {
name: 'v-icon',
template: '<i class="v-icon" :class="icon" @click="$emit(\'click\')"></i>',
props: ['icon', 'large'],
props: ['icon', 'large', 'start', 'end', 'size'],
emits: ['click'],
},
VMenu: {
name: 'v-menu',
template: '<div class="v-menu"><slot name="activator" :props="{}" /><slot /></div>',
props: ['modelValue', 'closeOnContentClick'],
},
VList: {
name: 'v-list',
template: '<div class="v-list"><slot /></div>',
},
VListItem: {
name: 'v-list-item',
template: '<div class="v-list-item" :data-active="active" @click="$emit(\'click\')"><slot /><slot name="append" /></div>',
props: ['active', 'value'],
emits: ['click'],
},
VListItemTitle: {
name: 'v-list-item-title',
template: '<div class="v-list-item-title"><slot /></div>',
},
VChip: {
name: 'v-chip',
template: '<div class="v-chip" :class="variant"><slot /></div>',
props: ['size', 'variant', 'prependIcon'],
},
}