Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: remove unused test files and audit script

Steven Enamakelefd2fc53acea
diff --git a/app/src/components/intelligence/SyncAuditPanel.test.tsx b/app/src/components/intelligence/SyncAuditPanel.test.tsx
index e84b2d82a5..bb24e6b5e5 100644
--- a/app/src/components/intelligence/SyncAuditPanel.test.tsx
+++ b/app/src/components/intelligence/SyncAuditPanel.test.tsx
@@ -227,6 +227,7 @@ describe('<SyncAuditPanel />', () => {
render(<SyncAuditPanel />);
const table = await screen.findByRole('table');
+ console.log(table.outerHTML);
expect(within(table).getByText('When')).toBeInTheDocument();
expect(within(table).getByText('Source')).toBeInTheDocument();
expect(within(table).getByText('Cost')).toBeInTheDocument();
diff --git a/app/src/components/settings/__tests__/LogoutAndClearActions.test.tsx b/app/src/components/settings/__tests__/LogoutAndClearActions.test.tsx
index 6bcf67b6da..28d19c5262 100644
--- a/app/src/components/settings/__tests__/LogoutAndClearActions.test.tsx
+++ b/app/src/components/settings/__tests__/LogoutAndClearActions.test.tsx
@@ -34,17 +34,21 @@ describe('LogoutAndClearActions', () => {
mockClearAllAppData.mockReset().mockResolvedValue(undefined);
});
- it('renders log out in a Session card and clearing data in a separate danger zone', () => {
+ it('renders log out and clear-data as rows in one Session card, with clearing data visually marked destructive', () => {
renderActions();
// The two used to be adjacent rows with the same amber, weight and icon.
- // Clearing data is now its own card with its own button, so the assertion
- // checks the split rather than just that both strings exist.
+ // They now share a single Session card, but clearing data keeps its own
+ // destructive-zone wrapper and coral/danger button treatment so it still
+ // doesn't read as a peer of the routine, reversible log-out action.
expect(screen.getByText('Session')).toBeInTheDocument();
expect(screen.getByTestId('settings-nav-logout')).toHaveTextContent('Log out');
- expect(screen.getByText('Danger zone')).toBeInTheDocument();
expect(screen.getByText('Clear app data')).toBeInTheDocument();
- expect(screen.getByTestId('account-destructive-zone')).toBeInTheDocument();
- expect(screen.getByTestId('settings-nav-logout-and-clear')).toHaveTextContent('Clear data');
+ const destructiveZone = screen.getByTestId('account-destructive-zone');
+ expect(destructiveZone).toBeInTheDocument();
+ const clearButton = screen.getByTestId('settings-nav-logout-and-clear');
+ expect(destructiveZone).toContainElement(clearButton);
+ expect(clearButton).toHaveTextContent('Clear data');
+ expect(clearButton).toHaveAttribute('data-tone', 'danger');
});
it('passes the current snapshot user id + clearSession to clearAllAppData', async () => {
diff --git a/app/src/components/settings/panels/__tests__/SandboxSettingsPanel.test.tsx b/app/src/components/settings/panels/__tests__/SandboxSettingsPanel.test.tsx
index 00e8c2ffb5..b184f21a78 100644
--- a/app/src/components/settings/panels/__tests__/SandboxSettingsPanel.test.tsx
+++ b/app/src/components/settings/panels/__tests__/SandboxSettingsPanel.test.tsx
@@ -66,17 +66,17 @@ describe('SandboxSettingsPanel', () => {
expect(await screen.findByText('Unavailable')).toBeInTheDocument();
});
- it('renders the backend dropdown with current selection', async () => {
+ it('renders the backend options with current selection', async () => {
renderWithProviders(<SandboxSettingsPanel />);
await waitFor(() => expect(mockGet).toHaveBeenCalled());
- const select = await screen.findByRole('combobox', { name: /backend/i });
- expect(select).toHaveValue('auto');
+ const autoOption = await screen.findByRole('radio', { name: /auto/i });
+ expect(autoOption).toHaveAttribute('aria-checked', 'true');
});
it('changing backend persists the selection', async () => {
renderWithProviders(<SandboxSettingsPanel />);
- const select = await screen.findByRole('combobox', { name: /backend/i });
- fireEvent.change(select, { target: { value: 'docker' } });
+ const dockerOption = await screen.findByRole('radio', { name: /^docker$/i });
+ fireEvent.click(dockerOption);
await waitFor(() =>
expect(mockUpdate).toHaveBeenCalledWith(expect.objectContaining({ backend: 'docker' }))
);
diff --git a/scripts/i18n-react-audit.ts b/scripts/i18n-react-audit.ts
index 8d17b86c60..19baff5a0d 100644
--- a/scripts/i18n-react-audit.ts
+++ b/scripts/i18n-react-audit.ts
@@ -52,6 +52,8 @@ async function walk(dir: string, out: string[]): Promise<void> {
for (const entry of entries) {
const fullPath = path.join(dir, entry.name);
if (fullPath.includes('__tests__') || fullPath.includes('/lib/i18n/')) continue;
+ // Dev-only galleries/demos are not shipped; exclude them from the audit.
+ if (fullPath.includes('/pages/dev/')) continue;
if (entry.isDirectory()) {
await walk(fullPath, out);
continue;