-
Notifications
You must be signed in to change notification settings - Fork 0
Add confirm dialog when deleting keys #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,9 +113,10 @@ public void RemoveSecret_WhenUserRemovesSecret_SecretIsDeleted() { | |
| secretsStore.Set("SecretToRemove", "SomeValue"); | ||
| secretsStore.Save(); | ||
|
|
||
| // Simulate: D (delete secret), select the key (Enter to select first), then Q (quit) | ||
| // Simulate: D (delete secret), select the key (Enter to select first), confirm (y), then Q (quit) | ||
| console.Input.PushText("D"); | ||
| console.Input.PushKey(ConsoleKey.Enter); // Select first (only) item | ||
| console.Input.PushTextWithEnter("y"); // Confirm deletion | ||
|
||
| console.Input.PushText("Q"); | ||
|
|
||
| // Act | ||
|
|
@@ -165,6 +166,7 @@ public void AddEditRemove_FullWorkflow_SecretsAreManagedCorrectly() { | |
| // Step 4: Remove SecondKey (first in sorted list, so just press Enter) | ||
| console.Input.PushText("D"); | ||
| console.Input.PushKey(ConsoleKey.Enter); // Select first item (SecondKey) | ||
| console.Input.PushTextWithEnter("y"); // Confirm deletion | ||
|
|
||
| // Step 5: Quit | ||
| console.Input.PushText("Q"); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -149,9 +149,10 @@ public void Run_WithProjectDirectory_RemoveSecret_SecretIsDeleted() { | |
| console.Interactive(); | ||
| var tool = CreateRealTool(console); | ||
|
|
||
| // Simulate: D (delete secret), select the key (Enter to select first), then Q (quit) | ||
| // Simulate: D (delete secret), select the key (Enter to select first), confirm (y), then Q (quit) | ||
| console.Input.PushText("D"); | ||
| console.Input.PushKey(ConsoleKey.Enter); // Select first (only) item | ||
| console.Input.PushTextWithEnter("y"); // Confirm deletion | ||
|
||
| console.Input.PushText("Q"); | ||
|
|
||
| // Act | ||
|
|
@@ -196,6 +197,7 @@ public void Run_WithProjectDirectory_FullWorkflow_SecretsAreManagedCorrectly() { | |
| // Step 4: Remove SecondKey (first in sorted list, so just press Enter) | ||
| console.Input.PushText("D"); | ||
| console.Input.PushKey(ConsoleKey.Enter); // Select first item (SecondKey) | ||
| console.Input.PushTextWithEnter("y"); // Confirm deletion | ||
|
|
||
| // Step 5: Quit | ||
| console.Input.PushText("Q"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The confirmation logic treats an empty response (just pressing Enter) as a cancellation, which may not be intuitive for users. When users press Enter without typing anything, it's unclear whether they meant to confirm or cancel the deletion. Consider either: