restore_flow.feature

 1Feature: Restore interactive flow
 2
 3  The restore flow guides the user through selecting a snapshot,
 4  optionally choosing specific files, setting a target directory,
 5  and choosing overwrite behaviour. Each step is skipped when the
 6  resolved configuration already provides the needed value.
 7
 8  Background:
 9    Given the user has selected the "restore" command
10
11  Rule: A snapshot is selected from the repository or entered manually
12
13    Scenario: Snapshots loaded from the repository
14      Given the repository is accessible
15      When the snapshot selection screen is reached
16      Then a spinner is shown while snapshots are fetched
17      And the fetched snapshots are presented in a filterable list
18
19    Scenario: Snapshot listing fails
20      Given the repository is not accessible
21      When the snapshot selection screen is reached
22      Then an error notice is displayed
23      And the user is offered a text input for manual snapshot ID entry
24
25    Scenario: No snapshots in the repository
26      Given the repository contains no snapshots
27      When the snapshot selection screen is reached
28      Then a notice indicates the repository is empty
29      And the user is offered a text input for manual snapshot ID entry
30
31    Scenario: Snapshot ID already provided
32      Given a snapshot ID is already resolved
33      Then the snapshot selection screen is not shown
34
35  Rule: The user may select specific files to restore from the snapshot
36
37    Scenario: File listing loaded from the snapshot
38      Given a snapshot has been selected
39      When the file selection screen is reached
40      Then a spinner is shown while the file listing is fetched
41      And a file picker is presented for the snapshot's contents
42
43    Scenario: Full restore when all files are selected
44      Given the file picker is showing
45      When the user confirms with all files selected
46      Then no include paths are added to the restore command
47
48    Scenario: Partial restore when specific files are selected
49      Given the file picker is showing
50      When the user selects specific files and confirms
51      Then the selected paths are added as include paths
52
53    Scenario: File listing fetch fails
54      Given a snapshot has been selected
55      When the file listing cannot be fetched
56      Then a notice is displayed
57      And the file picker is skipped
58      And the flow proceeds with a full restore
59
60    Scenario: File selection already configured
61      Given include paths are already resolved
62      Then the file selection screen is not shown
63
64  Rule: A target directory is specified for the restored files
65
66    Scenario: Target directory prompted
67      Given no target directory is resolved
68      When the target directory screen is reached
69      Then a text input prompts for the restore destination
70
71    Scenario: Target directory already configured
72      Given a target directory is already resolved
73      Then the target directory screen is not shown
74
75  Rule: The overwrite behaviour is chosen before restoring
76
77    Scenario: Overwrite behaviour prompted
78      Given no overwrite behaviour is resolved
79      When the overwrite screen is reached
80      Then a selector presents the available overwrite options
81
82    Scenario: Overwrite behaviour already configured
83      Given an overwrite behaviour is already resolved
84      Then the overwrite screen is not shown