feat(cli): implement atomic writes and safety checks for trusted folders (#18406)

This commit is contained in:
Gal Zahavi
2026-02-09 09:16:56 -08:00
committed by GitHub
parent 01906a9205
commit 81ccd80c6d
16 changed files with 549 additions and 971 deletions
@@ -46,22 +46,26 @@ describe('LogoutConfirmationDialog', () => {
expect(mockCall.isFocused).toBe(true);
});
it('should call onSelect with LOGIN when Login is selected', () => {
it('should call onSelect with LOGIN when Login is selected', async () => {
const onSelect = vi.fn();
renderWithProviders(<LogoutConfirmationDialog onSelect={onSelect} />);
const mockCall = vi.mocked(RadioButtonSelect).mock.calls[0][0];
mockCall.onSelect(LogoutChoice.LOGIN);
await act(async () => {
mockCall.onSelect(LogoutChoice.LOGIN);
});
expect(onSelect).toHaveBeenCalledWith(LogoutChoice.LOGIN);
});
it('should call onSelect with EXIT when Exit is selected', () => {
it('should call onSelect with EXIT when Exit is selected', async () => {
const onSelect = vi.fn();
renderWithProviders(<LogoutConfirmationDialog onSelect={onSelect} />);
const mockCall = vi.mocked(RadioButtonSelect).mock.calls[0][0];
mockCall.onSelect(LogoutChoice.EXIT);
await act(async () => {
mockCall.onSelect(LogoutChoice.EXIT);
});
expect(onSelect).toHaveBeenCalledWith(LogoutChoice.EXIT);
});