mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-30 04:05:36 +01:00
Increase delays for testTui/search since it is the flakiest test
This commit is contained in:
parent
ff79707ccf
commit
10851528bc
@ -1791,9 +1791,9 @@ func testTui_search(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check the output when there is a search
|
// Check the output when there is a search
|
||||||
out = captureTerminalOutput(t, tester, []string{
|
out = captureTerminalOutputWithComplexCommands(t, tester, []TmuxCommand{
|
||||||
"hishtory SPACE tquery ENTER",
|
{Keys: "hishtory SPACE tquery ENTER"},
|
||||||
"ls",
|
{Keys: "ls", ExtraDelay: 1.5},
|
||||||
})
|
})
|
||||||
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
||||||
testutils.CompareGoldens(t, out, "TestTui-Search")
|
testutils.CompareGoldens(t, out, "TestTui-Search")
|
||||||
@ -1802,7 +1802,7 @@ func testTui_search(t *testing.T) {
|
|||||||
out = captureTerminalOutputWithComplexCommands(t, tester, []TmuxCommand{
|
out = captureTerminalOutputWithComplexCommands(t, tester, []TmuxCommand{
|
||||||
{Keys: "hishtory SPACE tquery ENTER"},
|
{Keys: "hishtory SPACE tquery ENTER"},
|
||||||
// Extra delay to ensure that the search for 'ls' finishes before we select an entry
|
// Extra delay to ensure that the search for 'ls' finishes before we select an entry
|
||||||
{Keys: "ls", ExtraDelay: 2.0},
|
{Keys: "ls", ExtraDelay: 3.0},
|
||||||
{Keys: "ENTER"},
|
{Keys: "ENTER"},
|
||||||
})
|
})
|
||||||
out = strings.Split(strings.TrimSpace(strings.Split(out, "hishtory tquery")[1]), "\n")[0]
|
out = strings.Split(strings.TrimSpace(strings.Split(out, "hishtory tquery")[1]), "\n")[0]
|
||||||
@ -1815,7 +1815,7 @@ func testTui_search(t *testing.T) {
|
|||||||
out = captureTerminalOutputWithComplexCommands(t, tester, []TmuxCommand{
|
out = captureTerminalOutputWithComplexCommands(t, tester, []TmuxCommand{
|
||||||
// ExtraDelay to ensure that after searching for 'foo:' it gets the real results for an empty query
|
// ExtraDelay to ensure that after searching for 'foo:' it gets the real results for an empty query
|
||||||
{Keys: "hishtory SPACE tquery SPACE foo: ENTER", ExtraDelay: 1.5},
|
{Keys: "hishtory SPACE tquery SPACE foo: ENTER", ExtraDelay: 1.5},
|
||||||
{Keys: "ls", ExtraDelay: 1.0},
|
{Keys: "ls", ExtraDelay: 1.5},
|
||||||
})
|
})
|
||||||
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
||||||
testutils.CompareGoldens(t, out, "TestTui-InitialInvalidSearch")
|
testutils.CompareGoldens(t, out, "TestTui-InitialInvalidSearch")
|
||||||
@ -1824,7 +1824,7 @@ func testTui_search(t *testing.T) {
|
|||||||
out = captureTerminalOutputWithComplexCommands(t, tester, []TmuxCommand{
|
out = captureTerminalOutputWithComplexCommands(t, tester, []TmuxCommand{
|
||||||
{Keys: "hishtory SPACE tquery ENTER", ExtraDelay: 1.0},
|
{Keys: "hishtory SPACE tquery ENTER", ExtraDelay: 1.0},
|
||||||
// ExtraDelay to ensure that the search for 'ls' finishes before we make it invalid by adding ':'
|
// ExtraDelay to ensure that the search for 'ls' finishes before we make it invalid by adding ':'
|
||||||
{Keys: "ls", ExtraDelay: 1.5},
|
{Keys: "ls", ExtraDelay: 3.0},
|
||||||
{Keys: ":"},
|
{Keys: ":"},
|
||||||
})
|
})
|
||||||
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
out = strings.TrimSpace(strings.Split(out, "hishtory tquery")[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user