feat(api-manager): collapsible and searchable connection groups with select-all - #13952
Conversation
|
A UI está segura; o teste não prova nada. A premissa é consistente com o repo: a lista antiga era flat com Bloqueador — Isso acontece por uma escolha de runner: o componente é Bug real de comportamento: Menores: |
… + add render coverage expandedProviders was computed once via a lazy useState initializer keyed on the first render's connections/selectedConnections. When the permissions modal opens before its fetch resolves (a common pattern), those props arrive empty at mount and real data lands on a later re-render, so a provider group with a pre-existing selection never auto-expanded. - Adjust expandedProviders during render (React's documented pattern for reacting to data becoming available) instead of only at the first-render lazy initializer, guarded to run once so it never fights a later manual collapse. - Add a Vitest render test (api-key-connection-groups-render.test.tsx) that actually mounts ProviderConnectionPermissionList and exercises the delayed- data auto-expand, manual collapse persistence, search filtering, and the indeterminate/select-all checkbox state. The existing api-key-connection-groups.test.ts only imports the ProviderConnection TYPE and re-implements the grouping/filter logic inline, so it would still pass even if the component file were deleted. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
… for chevron label
|
Fixes applied and verified:
|
72cb483
into
diegosouzapw:release/v3.8.51
Summary
/dashboard/api-manager) to match the pattern ofProviderModelPermissionList.ProviderConnectionPermissionList.tsx:useEffectimport for indeterminate checkbox synchronization.tests/unit/api-key-connection-groups.test.tscovering grouping, search filtering, provider-level select/deselect calculations, and graceful handling of empty/null inputs.Verification
npm run typecheck:corepassed cleanly (0 errors).node --import tsx/esm --test tests/unit/api-key-connection-groups.test.tspassed (5/5).6d7e44aand verified live modal rendering.