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