Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions browser_tests/tests/nodeHelp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,6 @@ This is English documentation.
)
await selectNodeWithPan(comfyPage, checkpointNodes[0])

// Click help button again
const helpButton2 = comfyPage.page.locator(
'.selection-toolbox button[data-testid="info-button"]'
)
await helpButton2.click()

// Content should update
await expect(helpPage).toContainText('Checkpoint Loader Help')
await expect(helpPage).toContainText(
Expand Down
17 changes: 17 additions & 0 deletions src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class="flex items-center border-b border-(--p-divider-color) px-3 py-2"
>
<Button
v-tooltip.bottom="$t('g.back')"

Check failure on line 7 in src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue

View workflow job for this annotation

GitHub Actions / test

tests-ui/tests/components/sidebar/nodeLibrary/NodeHelpPage.test.ts > NodeHelpPage > does not react to selection when help is closed

TypeError: _ctx.$t is not a function ❯ Proxy._sfc_render src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue:7:27 ❯ renderComponentRoot node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6445:16 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5262:46 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19 ❯ setupRenderEffect node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5397:5 ❯ mountComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5172:7 ❯ processComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5125:9 ❯ patch node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4654:11 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5269:11 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19

Check failure on line 7 in src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue

View workflow job for this annotation

GitHub Actions / test

tests-ui/tests/components/sidebar/nodeLibrary/NodeHelpPage.test.ts > NodeHelpPage > does not react to selection when help is closed

TypeError: _ctx.$t is not a function ❯ Proxy._sfc_render src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue:7:27 ❯ renderComponentRoot node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6445:16 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5262:46 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19 ❯ setupRenderEffect node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5397:5 ❯ mountComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5172:7 ❯ processComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5125:9 ❯ patch node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4654:11 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5269:11 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19

Check failure on line 7 in src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue

View workflow job for this annotation

GitHub Actions / test

tests-ui/tests/components/sidebar/nodeLibrary/NodeHelpPage.test.ts > NodeHelpPage > does not react to selection when help is closed

TypeError: _ctx.$t is not a function ❯ Proxy._sfc_render src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue:7:27 ❯ renderComponentRoot node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6445:16 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5262:46 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19 ❯ setupRenderEffect node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5397:5 ❯ mountComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5172:7 ❯ processComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5125:9 ❯ patch node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4654:11 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5269:11 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19

Check failure on line 7 in src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue

View workflow job for this annotation

GitHub Actions / test

tests-ui/tests/components/sidebar/nodeLibrary/NodeHelpPage.test.ts > NodeHelpPage > does not reopen help when the same node stays selected

TypeError: _ctx.$t is not a function ❯ Proxy._sfc_render src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue:7:27 ❯ renderComponentRoot node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6445:16 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5262:46 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19 ❯ setupRenderEffect node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5397:5 ❯ mountComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5172:7 ❯ processComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5125:9 ❯ patch node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4654:11 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5269:11 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19

Check failure on line 7 in src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue

View workflow job for this annotation

GitHub Actions / test

tests-ui/tests/components/sidebar/nodeLibrary/NodeHelpPage.test.ts > NodeHelpPage > does not reopen help when the same node stays selected

TypeError: _ctx.$t is not a function ❯ Proxy._sfc_render src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue:7:27 ❯ renderComponentRoot node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6445:16 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5262:46 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19 ❯ setupRenderEffect node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5397:5 ❯ mountComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5172:7 ❯ processComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5125:9 ❯ patch node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4654:11 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5269:11 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19

Check failure on line 7 in src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue

View workflow job for this annotation

GitHub Actions / test

tests-ui/tests/components/sidebar/nodeLibrary/NodeHelpPage.test.ts > NodeHelpPage > does not reopen help when the same node stays selected

TypeError: _ctx.$t is not a function ❯ Proxy._sfc_render src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue:7:27 ❯ renderComponentRoot node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6445:16 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5262:46 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19 ❯ setupRenderEffect node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5397:5 ❯ mountComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5172:7 ❯ processComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5125:9 ❯ patch node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4654:11 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5269:11 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19

Check failure on line 7 in src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue

View workflow job for this annotation

GitHub Actions / test

tests-ui/tests/components/sidebar/nodeLibrary/NodeHelpPage.test.ts > NodeHelpPage > opens help for a newly selected node while help is open

TypeError: _ctx.$t is not a function ❯ Proxy._sfc_render src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue:7:27 ❯ renderComponentRoot node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6445:16 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5262:46 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19 ❯ setupRenderEffect node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5397:5 ❯ mountComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5172:7 ❯ processComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5125:9 ❯ patch node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4654:11 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5269:11 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19

Check failure on line 7 in src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue

View workflow job for this annotation

GitHub Actions / test

tests-ui/tests/components/sidebar/nodeLibrary/NodeHelpPage.test.ts > NodeHelpPage > opens help for a newly selected node while help is open

TypeError: _ctx.$t is not a function ❯ Proxy._sfc_render src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue:7:27 ❯ renderComponentRoot node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6445:16 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5262:46 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19 ❯ setupRenderEffect node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5397:5 ❯ mountComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5172:7 ❯ processComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5125:9 ❯ patch node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4654:11 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5269:11 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19

Check failure on line 7 in src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue

View workflow job for this annotation

GitHub Actions / test

tests-ui/tests/components/sidebar/nodeLibrary/NodeHelpPage.test.ts > NodeHelpPage > opens help for a newly selected node while help is open

TypeError: _ctx.$t is not a function ❯ Proxy._sfc_render src/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue:7:27 ❯ renderComponentRoot node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:6445:16 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5262:46 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19 ❯ setupRenderEffect node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5397:5 ❯ mountComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5172:7 ❯ processComponent node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5125:9 ❯ patch node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:4654:11 ❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5269:11 ❯ ReactiveEffect.run node_modules/.pnpm/@VUE[email protected]/node_modules/@vue/reactivity/dist/reactivity.cjs.js:229:19
icon="pi pi-arrow-left"
text
severity="secondary"
Expand All @@ -19,14 +19,31 @@
</template>

<script setup lang="ts">
import { whenever } from '@vueuse/core'
import Button from 'primevue/button'

import NodeHelpContent from '@/components/node/NodeHelpContent.vue'
import { useSelectionState } from '@/composables/graph/useSelectionState'
import type { ComfyNodeDefImpl } from '@/stores/nodeDefStore'
import { useNodeHelpStore } from '@/stores/workspace/nodeHelpStore'

const { node } = defineProps<{ node: ComfyNodeDefImpl }>()

defineEmits<{
(e: 'close'): void
}>()

const nodeHelpStore = useNodeHelpStore()
const { nodeDef } = useSelectionState()

// Keep the open help page synced with the current selection while help is open.
whenever(
() => (nodeHelpStore.isHelpOpen ? nodeDef.value : null),
(def) => {
if (!def) return
const currentHelpNode = nodeHelpStore.currentHelpNode
if (currentHelpNode?.nodePath === def.nodePath) return
nodeHelpStore.openHelp(def)
}
)
</script>
5 changes: 2 additions & 3 deletions src/composables/graph/useSelectionState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,11 @@ export function useSelectionState() {

const isSidebarActive =
sidebarTabStore.activeSidebarTabId === nodeLibraryTabId
const currentHelpNode: any = nodeHelpStore.currentHelpNode
const currentHelpNode = nodeHelpStore.currentHelpNode
const isSameNodeHelpOpen =
isSidebarActive &&
nodeHelpStore.isHelpOpen &&
currentHelpNode &&
currentHelpNode.nodePath === def.nodePath
currentHelpNode?.nodePath === def.nodePath

if (isSameNodeHelpOpen) {
nodeHelpStore.closeHelp()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import { flushPromises, mount } from '@vue/test-utils'
import { computed, ref } from 'vue'
import { beforeEach, describe, expect, test, vi } from 'vitest'

import NodeHelpPage from '@/components/sidebar/tabs/nodeLibrary/NodeHelpPage.vue'
import { useSelectionState } from '@/composables/graph/useSelectionState'
import { useNodeHelpStore } from '@/stores/workspace/nodeHelpStore'

vi.mock('@/composables/graph/useSelectionState')
vi.mock('@/stores/workspace/nodeHelpStore')

const baseNode = {
nodePath: 'NodeA',
display_name: 'Node A',
description: '',
inputs: {},
outputs: []
}

describe('NodeHelpPage', () => {
const selection = ref<any | null>(null)
let openHelp: ReturnType<typeof vi.fn>

const mountPage = () =>
mount(NodeHelpPage, {
props: { node: baseNode as any },
global: {
stubs: {
ProgressSpinner: true,
Button: true
}
}
})

beforeEach(() => {
vi.resetAllMocks()
selection.value = null
openHelp = vi.fn()

vi.mocked(useSelectionState).mockReturnValue({
nodeDef: computed(() => selection.value)
} as any)

vi.mocked(useNodeHelpStore).mockReturnValue({
renderedHelpHtml: ref('<p>help</p>'),
isLoading: ref(false),
error: ref(null),
isHelpOpen: true,
currentHelpNode: { nodePath: 'NodeA' },
openHelp,
closeHelp: vi.fn()
} as any)
Comment on lines +21 to +52
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Avoid any / as any in test typings

This test uses ref<any | null> and several as any assertions for props and mocked composables. Given the repo guidelines for TypeScript, it would be better to give these values concrete structural types.

For example:

  • Type selection as ref<{ nodePath: string } | null> instead of any.
  • Type the mocked useSelectionState return as Pick<ReturnType<typeof useSelectionState>, 'nodeDef'> (or a small local interface) instead of as any.
  • Likewise, type the useNodeHelpStore mock as Partial<ReturnType<typeof useNodeHelpStore>> and satisfy only the fields this test needs.

This keeps tests aligned with the real APIs and avoids any while remaining lightweight.

Also applies to: 58-61, 66-87

🤖 Prompt for AI Agents
In tests-ui/tests/components/sidebar/nodeLibrary/NodeHelpPage.test.ts around
lines 21-52 (also applies to lines 58-61 and 66-87), the test uses broad any/as
any typings for selection, props and mocked composables; replace these with
concrete lightweight types: declare selection as ref<{ nodePath: string } |
null>, type the mocked useSelectionState return as Pick<ReturnType<typeof
useSelectionState>, 'nodeDef'> (or a small local interface exposing nodeDef),
and type the useNodeHelpStore mock as Partial<ReturnType<typeof
useNodeHelpStore>> providing only renderedHelpHtml, isLoading, error,
isHelpOpen, currentHelpNode, openHelp and closeHelp; update the mount props to
match the component prop type rather than using as any so the test uses real
structural types without introducing heavy typings.

})

test('opens help for a newly selected node while help is open', async () => {
const wrapper = mountPage()

selection.value = { nodePath: 'NodeB' }
await flushPromises()

expect(openHelp).toHaveBeenCalledWith({ nodePath: 'NodeB' })

wrapper.unmount()
})

test('does not reopen help when the same node stays selected', async () => {
const wrapper = mountPage()

selection.value = { nodePath: 'NodeA' }
await flushPromises()

expect(openHelp).not.toHaveBeenCalled()

wrapper.unmount()
})

test('does not react to selection when help is closed', async () => {
vi.mocked(useNodeHelpStore).mockReturnValueOnce({
renderedHelpHtml: ref('<p>help</p>'),
isLoading: ref(false),
error: ref(null),
isHelpOpen: false,
currentHelpNode: null,
openHelp,
closeHelp: vi.fn()
} as any)

const wrapper = mountPage()

selection.value = { nodePath: 'NodeB' }
await flushPromises()

expect(openHelp).not.toHaveBeenCalled()

wrapper.unmount()
})
})
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createPinia, setActivePinia } from 'pinia'
import { beforeEach, describe, expect, test, vi } from 'vitest'
import { type Ref, ref } from 'vue'
import { ref } from 'vue'
import type { Ref } from 'vue'

import { useSelectionState } from '@/composables/graph/useSelectionState'
import { useNodeLibrarySidebarTab } from '@/composables/sidebarTabs/useNodeLibrarySidebarTab'
Expand Down
Loading