mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-22 16:24:00 +01:00
Add ExtraDelay to make testTui/delete more reliable
This commit is contained in:
parent
392ebfb0fd
commit
4d7e685a6e
@ -1875,10 +1875,11 @@ func testTui_delete(t testing.TB) {
|
||||
manuallySubmitHistoryEntry(t, userSecret, testutils.MakeFakeHistoryEntry("echo 'cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'"))
|
||||
|
||||
// Check that we can delete an entry
|
||||
out := captureTerminalOutput(t, tester, []string{
|
||||
"hishtory SPACE tquery ENTER",
|
||||
"aaaaaa",
|
||||
"C-K",
|
||||
out := captureTerminalOutputWithComplexCommands(t, tester, []TmuxCommand{
|
||||
{Keys: "hishtory SPACE tquery ENTER"},
|
||||
// ExtraDelay so that the search query finishes before we hit delete
|
||||
{Keys: "aaaaaa", ExtraDelay: 1.0},
|
||||
{Keys: "C-K"},
|
||||
})
|
||||
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
||||
testutils.CompareGoldens(t, out, "TestTui-Delete")
|
||||
|
Loading…
Reference in New Issue
Block a user