command_preview.feature

 1Feature: Command preview and execution
 2
 3  Before handing off to restic, the session shows the resolved
 4  command and asks the user to confirm. This gives the user a
 5  chance to review what will run and go back to correct mistakes.
 6
 7  Rule: The confirmation screen shows the resolved restic command
 8
 9    Scenario: Reviewing the command before execution
10      Given the user has completed all required screens
11      When the confirmation screen is shown
12      Then it displays the resolved restic command line
13      And it displays any environment variables that will be set
14      And the user can confirm to proceed
15
16    Scenario: Confirming execution
17      Given the confirmation screen is showing
18      When the user confirms
19      Then restic is executed with the resolved configuration
20
21    Scenario: Going back from the confirmation screen
22      Given the confirmation screen is showing
23      When the user presses Esc
24      Then they return to the last visible screen of the flow
25      And their previous answers are preserved
26
27  Rule: --show-command prints the command and exits without executing
28
29    Scenario: --show-command in interactive mode
30      Given the user launched keld interactively with --show-command
31      When the confirmation screen would normally appear
32      Then the resolved command is printed as text
33      And the output format matches non-interactive --show-command
34      And the session exits without executing restic