@@ -187,35 +187,35 @@ func createDecryptTUIEncryptedFixture(t *testing.T) *decryptTUIFixture {
187187
188188func successDecryptTUISequence (secret string ) []timedSimKey {
189189 keys := []timedSimKey {
190- {Key : tcell .KeyEnter , Wait : 150 * time .Millisecond },
191- {Key : tcell .KeyEnter , Wait : 300 * time .Millisecond },
190+ {Key : tcell .KeyEnter , Wait : 250 * time .Millisecond },
191+ {Key : tcell .KeyEnter , Wait : 500 * time .Millisecond },
192192 }
193193
194194 for _ , r := range secret {
195195 keys = append (keys , timedSimKey {
196196 Key : tcell .KeyRune ,
197197 R : r ,
198- Wait : 20 * time .Millisecond ,
198+ Wait : 35 * time .Millisecond ,
199199 })
200200 }
201201
202202 keys = append (keys ,
203- timedSimKey {Key : tcell .KeyTab , Wait : 80 * time .Millisecond },
204- timedSimKey {Key : tcell .KeyEnter , Wait : 50 * time .Millisecond },
205- timedSimKey {Key : tcell .KeyTab , Wait : 300 * time .Millisecond },
206- timedSimKey {Key : tcell .KeyEnter , Wait : 50 * time .Millisecond },
203+ timedSimKey {Key : tcell .KeyTab , Wait : 150 * time .Millisecond },
204+ timedSimKey {Key : tcell .KeyEnter , Wait : 100 * time .Millisecond },
205+ timedSimKey {Key : tcell .KeyTab , Wait : 500 * time .Millisecond },
206+ timedSimKey {Key : tcell .KeyEnter , Wait : 100 * time .Millisecond },
207207 )
208208
209209 return keys
210210}
211211
212212func abortDecryptTUISequence () []timedSimKey {
213213 return []timedSimKey {
214- {Key : tcell .KeyEnter , Wait : 150 * time .Millisecond },
215- {Key : tcell .KeyEnter , Wait : 300 * time .Millisecond },
216- {Key : tcell .KeyRune , R : '0' , Wait : 300 * time .Millisecond },
217- {Key : tcell .KeyTab , Wait : 80 * time .Millisecond },
218- {Key : tcell .KeyEnter , Wait : 50 * time .Millisecond },
214+ {Key : tcell .KeyEnter , Wait : 250 * time .Millisecond },
215+ {Key : tcell .KeyEnter , Wait : 500 * time .Millisecond },
216+ {Key : tcell .KeyRune , R : '0' , Wait : 500 * time .Millisecond },
217+ {Key : tcell .KeyTab , Wait : 150 * time .Millisecond },
218+ {Key : tcell .KeyEnter , Wait : 100 * time .Millisecond },
219219 }
220220}
221221
@@ -233,8 +233,11 @@ func runDecryptWorkflowTUIForTest(t *testing.T, ctx context.Context, cfg *config
233233 select {
234234 case err := <- errCh :
235235 return err
236- case <- time .After (12 * time .Second ):
237- t .Fatalf ("RunDecryptWorkflowTUI did not complete within 12s" )
236+ case <- ctx .Done ():
237+ t .Fatalf ("RunDecryptWorkflowTUI context expired: %v" , ctx .Err ())
238+ return nil
239+ case <- time .After (20 * time .Second ):
240+ t .Fatalf ("RunDecryptWorkflowTUI did not complete within 20s" )
238241 return nil
239242 }
240243}
0 commit comments