feat(pool): add table-driven account batch actions

This commit is contained in:
elky
2026-07-19 16:09:20 +08:00
parent 95053f9502
commit 644ae9c1bf
20 changed files with 1403 additions and 1095 deletions
@@ -0,0 +1,29 @@
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { describe, expect, it } from 'vitest'
const source = readFileSync(
resolve(process.cwd(), 'src/views/admin/PoolManagement.vue'),
'utf8',
)
describe('PoolManagement provider detail drawer', () => {
it('keeps the heavy drawer out of the initial route chunk', () => {
expect(source).not.toContain(
"import ProviderDetailDrawer from '@/features/providers/components/ProviderDetailDrawer.vue'",
)
expect(source).toContain(
"() => import('@/features/providers/components/ProviderDetailDrawer.vue')",
)
})
it('only mounts the drawer after the provider detail action is opened', () => {
const drawerTemplate = source
.split('<ProviderDetailDrawer')[1]
?.split('/>')[0]
expect(drawerTemplate).toBeTruthy()
expect(drawerTemplate).toContain('v-if="providerDrawerOpen && selectedProviderId"')
expect(source).toContain('@view-provider="openProviderDrawer"')
})
})