{section.commands.map((command) => (
{command.name}
{command.badge?.()}
{'route' in command && {command.route}}
))}
))}
>
)
}
describe('useDatabaseEntitySearchCommands', () => {
let searchRequests: string[]
beforeEach(() => {
searchRequests = []
mockUseSelectedProjectQuery.mockReturnValue({
data: { id: 1, ref: 'default', name: 'default', connectionString: 'encrypted' },
})
addAPIMock({
method: 'post',
path: '/platform/pg-meta/:ref/query',
response: async ({ request }) => {
const { query } = (await request.json()) as { query: string }
searchRequests.push(query)
return HttpResponse.json([SEARCH_RESULT])
},
})
})
it('lists matching tables with their policy count and RLS status', async () => {
customRender(