diff --git a/src/renderer/src/components/settings/accounts/providers/ManagedDataAccountsSection.fixture.tsx b/src/renderer/src/components/settings/accounts/providers/ManagedDataAccountsSection.fixture.tsx new file mode 100644 index 00000000000..877c605dd39 --- /dev/null +++ b/src/renderer/src/components/settings/accounts/providers/ManagedDataAccountsSection.fixture.tsx @@ -0,0 +1,25 @@ +import { defineFixture } from '../../../../component-fixtures/component-fixture' +import { ManagedDataAccountsSection } from './ManagedDataAccountsSection' + +function Frame(): React.JSX.Element { + return ( +
+ +
+ ) +} + +/** The CLI steps start hidden behind "Use from the command line". */ +export const cliCollapsed = defineFixture({ width: 720, render: () => }) + +export const cliOpen = defineFixture({ + width: 720, + render: () => , + interact: async (frame) => { + const trigger = [...frame.querySelectorAll('button')].find((button) => + button.textContent?.includes('Use from the command line') + ) + trigger?.click() + await new Promise((resolve) => setTimeout(resolve, 200)) + } +}) diff --git a/src/renderer/src/components/settings/accounts/providers/ManagedDataAccountsSection.tsx b/src/renderer/src/components/settings/accounts/providers/ManagedDataAccountsSection.tsx index 51974b7dae4..28be119b9cc 100644 --- a/src/renderer/src/components/settings/accounts/providers/ManagedDataAccountsSection.tsx +++ b/src/renderer/src/components/settings/accounts/providers/ManagedDataAccountsSection.tsx @@ -6,7 +6,10 @@ import type { ManagedDataAccountProvider, ManagedDataAccountsState } from '../../../../../../shared/managed-account-types' +import { ChevronDown } from 'lucide-react' +import { cn } from '@/lib/utils' import { Button } from '../../../ui/button' +import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../../../ui/collapsible' import { Badge } from '../../../ui/badge' import { Dialog, @@ -33,6 +36,7 @@ export function ManagedDataAccountsSection({ const [busy, setBusy] = useState(false) const [removeId, setRemoveId] = useState(null) const [copied, setCopied] = useState(false) + const [cliOpen, setCliOpen] = useState(false) const environmentId = target.kind === 'environment' ? target.environmentId : null useEffect(() => { @@ -100,22 +104,40 @@ export function ManagedDataAccountsSection({ )} >
- {command} + + + + + +
+ {command} + +
+
+
-