Merge branch 'main' into image-output-backwards-compat

This commit is contained in:
Christian Byrne
2025-12-12 19:05:36 -08:00
committed by GitHub
66 changed files with 1160 additions and 385 deletions

View File

@@ -1,4 +1,5 @@
import { createTestingPinia } from '@pinia/testing'
import type { VueWrapper } from '@vue/test-utils'
import { mount } from '@vue/test-utils'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { nextTick } from 'vue'
@@ -57,6 +58,7 @@ describe('ImagePreview', () => {
'/api/view?filename=test2.png&type=output'
]
}
const wrapperRegistry = new Set<VueWrapper>()
beforeEach(() => {
delete mockNode.imgs
@@ -64,7 +66,7 @@ describe('ImagePreview', () => {
})
const mountImagePreview = (props = {}) => {
return mount(ImagePreview, {
const wrapper = mount(ImagePreview, {
props: { ...defaultProps, ...props },
global: {
plugins: [
@@ -82,8 +84,17 @@ describe('ImagePreview', () => {
}
}
})
wrapperRegistry.add(wrapper)
return wrapper
}
afterEach(() => {
wrapperRegistry.forEach((wrapper) => {
wrapper.unmount()
})
wrapperRegistry.clear()
})
it('renders image preview when imageUrls provided', () => {
const wrapper = mountImagePreview()

View File

@@ -199,6 +199,6 @@ describe('LGraphNode', () => {
const wrapper = mountLGraphNode({ nodeData: mockNodeData })
expect(wrapper.classes()).toContain('border-node-stroke-executing')
expect(wrapper.classes()).toContain('outline-node-stroke-executing')
})
})