mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-07 20:00:37 -07:00
fix: Add folder names in permissions dialog similar to the launch dialog (#11278)
This commit is contained in:
@@ -46,6 +46,7 @@ describe('PermissionsModifyTrustDialog', () => {
|
||||
let mockCommitTrustLevelChange: Mock;
|
||||
|
||||
beforeEach(() => {
|
||||
mockedCwd.mockReturnValue('/test/dir');
|
||||
mockUpdateTrustLevel = vi.fn();
|
||||
mockCommitTrustLevelChange = vi.fn();
|
||||
vi.mocked(usePermissionsModifyTrust).mockReturnValue({
|
||||
@@ -120,6 +121,17 @@ describe('PermissionsModifyTrustDialog', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should render the labels with folder names', async () => {
|
||||
const { lastFrame } = renderWithProviders(
|
||||
<PermissionsModifyTrustDialog onExit={vi.fn()} addItem={vi.fn()} />,
|
||||
);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(lastFrame()).toContain('Trust this folder (dir)');
|
||||
expect(lastFrame()).toContain('Trust parent folder (test)');
|
||||
});
|
||||
});
|
||||
|
||||
it('should call onExit when escape is pressed', async () => {
|
||||
const onExit = vi.fn();
|
||||
const { stdin, lastFrame } = renderWithProviders(
|
||||
|
||||
Reference in New Issue
Block a user