mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2026-11-28 15:33:42 +08:00
Share workspace packages between Ray Admin and the interactive docs. BREAKING CHANGE: v6 is a new major line. v5 stays on legacy/v5.
41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
import { AdminShell } from '@ray-template/admin-shell'
|
|
import { RIcon } from '@ray-template/ui/icon'
|
|
import { RTablePro } from '@ray-template/ui/table-pro'
|
|
import { mount } from '@vue/test-utils'
|
|
|
|
it('mounts the shared shell, icons and table using only public package entries', async () => {
|
|
const wrapper = mount(AdminShell, {
|
|
props: {
|
|
layout: {
|
|
mode: 'right',
|
|
contentWidth: 'fluid',
|
|
contentMaxWidth: 1200,
|
|
contentPadding: 16,
|
|
fixedHeader: true,
|
|
fixedFooter: true,
|
|
},
|
|
},
|
|
slots: {
|
|
sidebar: () => <RIcon name="action/search" />,
|
|
default: () => (
|
|
<RTablePro
|
|
bare
|
|
columns={[{ key: 'name', title: 'Name' }]}
|
|
data={[{ id: 1, name: 'Workspace consumer' }]}
|
|
/>
|
|
),
|
|
},
|
|
})
|
|
|
|
try {
|
|
await vi.waitFor(() => {
|
|
expect(
|
|
wrapper.get('.r-icon svg').element.childElementCount,
|
|
).toBeGreaterThan(0)
|
|
})
|
|
expect(wrapper.text()).toContain('Workspace consumer')
|
|
} finally {
|
|
wrapper.unmount()
|
|
}
|
|
})
|