/ tests / features / wezterm_backdrops.feature
wezterm_backdrops.feature
 1  Feature: WezTerm backdrops extension
 2    The Backdrops module manages a list of background images and supports
 3    cycling and setting by index. Edge cases (empty list, index out of range)
 4    must be handled safely.
 5  
 6    Scenario: Cycle forward wraps from last to first
 7      Given backdrops with files { "a.png", "b.png", "c.png" }
 8      And current index is 3
 9      When I cycle forward
10      Then current index is 1
11      And current background file is "a.png"
12  
13    Scenario: Cycle back wraps from first to last
14      Given backdrops with files { "a.png", "b.png", "c.png" }
15      And current index is 1
16      When I cycle back
17      Then current index is 3
18      And current background file is "c.png"
19  
20    Scenario: Set image by index validates range
21      Given backdrops with files { "a.png", "b.png" }
22      When I set image at index 2
23      Then current index is 2
24      And current background file is "b.png"
25  
26    Scenario: Set image with index out of range logs error and does not change index
27      Given backdrops with files { "a.png" }
28      And current index is 1
29      When I set image at index 5
30      Then an error was logged for index out of range
31      And current index is still 1