This commit is contained in:
Stephen Zhou
2026-05-25 21:06:12 +08:00
parent 9d8c3280e2
commit 4531d93114
2 changed files with 2 additions and 12 deletions

View File

@ -82,7 +82,7 @@ describe('DeveloperApiSection', () => {
vi.clearAllMocks()
})
// Loading should reserve the same shape as the enabled API page: endpoint copy row plus API key table.
// Loading should reserve the same shape as the enabled API key list.
describe('Loading state', () => {
it('should render the updated API tab skeleton while access config is loading', () => {
// Arrange
@ -92,7 +92,7 @@ describe('DeveloperApiSection', () => {
const { container } = render(<DeveloperApiSection appInstanceId="instance-1" />)
// Assert
expect(screen.getByText('deployments.access.api.endpoint')).toBeInTheDocument()
expect(screen.queryByText('deployments.access.api.endpoint')).not.toBeInTheDocument()
expect(screen.getByRole('columnheader', { name: 'deployments.access.api.table.name' })).toBeInTheDocument()
expect(screen.getByRole('columnheader', { name: 'deployments.access.api.table.environment' })).toBeInTheDocument()
expect(screen.getByRole('columnheader', { name: 'deployments.access.api.table.key' })).toBeInTheDocument()

View File

@ -200,18 +200,8 @@ function CreatedApiTokenDialog({ token, onDismiss }: {
}
function DeveloperApiSkeleton() {
const { t } = useTranslation('deployments')
return (
<div className="flex flex-col gap-4" data-slot="deployment-developer-api-skeleton">
<div className="flex h-8 items-center gap-1 rounded-lg border border-components-input-border-active bg-components-input-bg-normal pr-1 pl-1.5">
<div className="flex h-5 shrink-0 items-center rounded-md border border-divider-subtle px-1.5 system-2xs-medium text-text-tertiary">
{t('access.api.endpoint')}
</div>
<SkeletonRectangle className="my-0 h-3 min-w-0 flex-1 animate-pulse" />
<div className="h-3.5 w-px shrink-0 bg-divider-regular" />
<SkeletonRectangle className="my-0 size-6 shrink-0 animate-pulse rounded-md" />
</div>
<ApiKeyTableSkeleton />
</div>
)