feat: simplify tool confirmation labels for better UX (#15296)

This commit is contained in:
N. Taylor Mullen
2025-12-18 16:38:53 -08:00
committed by GitHub
parent 402148dbc4
commit e0f159085e
10 changed files with 72 additions and 72 deletions

View File

@@ -24,23 +24,23 @@ describe('ShellConfirmationDialog', () => {
expect(lastFrame()).toMatchSnapshot();
});
it('calls onConfirm with ProceedOnce when "Yes, allow once" is selected', () => {
it('calls onConfirm with ProceedOnce when "Allow once" is selected', () => {
const { lastFrame } = renderWithProviders(
<ShellConfirmationDialog request={request} />,
);
const select = lastFrame()!.toString();
// Simulate selecting the first option
// This is a simplified way to test the selection
expect(select).toContain('Yes, allow once');
expect(select).toContain('Allow once');
});
it('calls onConfirm with ProceedAlways when "Yes, allow always for this session" is selected', () => {
it('calls onConfirm with ProceedAlways when "Allow for this session" is selected', () => {
const { lastFrame } = renderWithProviders(
<ShellConfirmationDialog request={request} />,
);
const select = lastFrame()!.toString();
// Simulate selecting the second option
expect(select).toContain('Yes, allow always for this session');
expect(select).toContain('Allow for this session');
});
it('calls onConfirm with Cancel when "No (esc)" is selected', () => {