mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-12 20:19:51 +08:00
feat(pool): add table-driven account batch actions
This commit is contained in:
@@ -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"')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user