mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-31 23:19:40 +02:00
Fix clicking multiple times in an integration test
So far we only had tests that called Click() only once. If you have a test that calls Click twice (we'll add one in the next commit), you'll notice that the second click is interpreted as a drag because the mouse button wasn't released in between. Fix this by sending a "mouse-up" event after the click.
This commit is contained in:
parent
052974be65
commit
286e5f4849
@ -57,6 +57,11 @@ func (self *GuiDriver) Click(x, y int) {
|
||||
0,
|
||||
)
|
||||
self.waitTillIdle()
|
||||
self.gui.g.ReplayedEvents.MouseEvents <- gocui.NewTcellMouseEventWrapper(
|
||||
tcell.NewEventMouse(x, y, tcell.ButtonNone, 0),
|
||||
0,
|
||||
)
|
||||
self.waitTillIdle()
|
||||
}
|
||||
|
||||
// wait until lazygit is idle (i.e. all processing is done) before continuing
|
||||
|
Loading…
x
Reference in New Issue
Block a user