[fix] remove erroneous test code

This commit is contained in:
Arjan Singh
2025-09-17 11:03:59 -07:00
parent 5243ef3528
commit c896a4e342
3 changed files with 7 additions and 8 deletions

View File

@@ -48,7 +48,7 @@ export const Default: Story = {
nodeType: 'CheckpointLoaderSimple',
inputName: 'ckpt_name',
currentValue: '',
showLeftPanel: undefined
showLeftPanel: false
},
render: (args) => ({
components: { AssetBrowserModal },

View File

@@ -46,7 +46,6 @@ import type { AssetDisplayItem } from '@/platform/assets/composables/useAssetBro
import type { AssetItem } from '@/platform/assets/schemas/assetSchema'
import { useAssetBrowser } from '../composables/useAssetBrowser'
import { mockAssets } from '../fixtures/ui-mock-assets'
import AssetGrid from './AssetGrid.vue'
// Props
@@ -65,9 +64,6 @@ const emit = defineEmits<{
close: []
}>()
// Use provided assets or fallback to mock data
const assetsToUse = props.assets !== undefined ? props.assets : mockAssets
// Use AssetBrowser composable for all business logic
const {
searchQuery,
@@ -76,7 +72,7 @@ const {
contentTitle,
filteredAssets,
selectAsset
} = useAssetBrowser(assetsToUse)
} = useAssetBrowser(props.assets)
// Dialog controls panel visibility via prop
const shouldShowLeftPanel = computed(() => {

View File

@@ -1,7 +1,8 @@
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { ref } from 'vue'
import AssetBrowserModal from '../components/AssetBrowserModal.vue'
import AssetBrowserModal from '@/platform/assets/components/AssetBrowserModal.vue'
import { mockAssets } from '@/platform/assets/fixtures/ui-mock-assets'
// Component that simulates the useAssetBrowserDialog functionality with working close
const DialogDemoComponent = {
@@ -49,7 +50,8 @@ const DialogDemoComponent = {
handleOpenDialog,
handleOpenWithCurrentValue,
handleCloseDialog,
handleAssetSelected
handleAssetSelected,
mockAssets
}
},
template: `
@@ -116,6 +118,7 @@ const DialogDemoComponent = {
>
<div class="w-[80vw] h-[80vh] max-w-[80vw] max-h-[80vh] rounded-2xl overflow-hidden">
<AssetBrowserModal
:assets="mockAssets"
:node-type="currentNodeType"
:input-name="currentInputName"
:current-value="currentValue"