mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-23 07:50:15 +00:00
fix: forward job list attrs to scroll container
This commit is contained in:
@@ -176,6 +176,33 @@ describe('JobAssetsList', () => {
|
||||
expect(wrapper.find('[data-job-id="job-2"]').exists()).toBe(true)
|
||||
})
|
||||
|
||||
it('forwards parent attrs to the scroll container', () => {
|
||||
const wrapper = mount(JobAssetsList, {
|
||||
attrs: {
|
||||
class: 'min-h-0 flex-1'
|
||||
},
|
||||
props: {
|
||||
displayedJobGroups: [
|
||||
{
|
||||
key: 'today',
|
||||
label: 'Today',
|
||||
items: [buildJob({ id: 'job-1' })]
|
||||
}
|
||||
]
|
||||
},
|
||||
global: {
|
||||
stubs: {
|
||||
teleport: true,
|
||||
JobDetailsPopover: JobDetailsPopoverStub
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
expect(wrapper.get('[data-testid="job-assets-list"]').classes()).toEqual(
|
||||
expect.arrayContaining(['min-h-0', 'flex-1', 'h-full', 'overflow-y-auto'])
|
||||
)
|
||||
})
|
||||
|
||||
it('emits viewItem on preview-click for completed jobs with preview', async () => {
|
||||
const job = buildJob()
|
||||
const wrapper = mountJobAssetsList([job])
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
v-bind="$attrs"
|
||||
:ref="containerProps.ref"
|
||||
:style="containerProps.style"
|
||||
data-testid="job-assets-list"
|
||||
@@ -124,6 +125,10 @@ import { cn } from '@/utils/tailwindUtil'
|
||||
import { iconForJobState } from '@/utils/queueDisplay'
|
||||
import { isActiveJobState } from '@/utils/queueUtil'
|
||||
|
||||
defineOptions({
|
||||
inheritAttrs: false
|
||||
})
|
||||
|
||||
const HEADER_ROW_HEIGHT = 20
|
||||
const GROUP_ROW_GAP = 16
|
||||
const JOB_ROW_HEIGHT = 48
|
||||
|
||||
Reference in New Issue
Block a user