@@ -145,6 +145,19 @@ def test_move_down_carousel(self):
145
145
146
146
assert result == ["bar" ]
147
147
148
+ def test_move_down_with_tab_carousel (self ):
149
+ stdin = helper .event_factory (key .CTRL_I , key .CTRL_I , key .CTRL_I , key .CTRL_I , key .SPACE , key .ENTER )
150
+ message = "Foo message"
151
+ variable = "Bar variable"
152
+ choices = ["foo" , "bar" , "bazz" ]
153
+
154
+ question = questions .Checkbox (variable , message , choices = choices , carousel = True )
155
+
156
+ sut = ConsoleRender (event_generator = stdin )
157
+ result = sut .render (question )
158
+
159
+ assert result == ["bar" ]
160
+
148
161
def test_move_up_carousel (self ):
149
162
stdin = helper .event_factory (key .UP , key .SPACE , key .ENTER )
150
163
message = "Foo message"
@@ -158,6 +171,20 @@ def test_move_up_carousel(self):
158
171
159
172
assert result == ["bazz" ]
160
173
174
+ @unittest .SkipTest
175
+ def test_move_up_with_shift_tab_carousel (self ):
176
+ stdin = helper .event_factory (key .SHIFT_TAB , key .SPACE , key .ENTER )
177
+ message = "Foo message"
178
+ variable = "Bar variable"
179
+ choices = ["foo" , "bar" , "bazz" ]
180
+
181
+ question = questions .Checkbox (variable , message , choices = choices , carousel = True )
182
+
183
+ sut = ConsoleRender (event_generator = stdin )
184
+ result = sut .render (question )
185
+
186
+ assert result == ["bazz" ]
187
+
161
188
def test_ctrl_c_breaks_execution (self ):
162
189
stdin_array = [key .CTRL_C ]
163
190
stdin = helper .event_factory (* stdin_array )
0 commit comments