mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-28 02:07:09 -04: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:
@@ -57,6 +57,11 @@ func (self *GuiDriver) Click(x, y int) {
|
|||||||
0,
|
0,
|
||||||
)
|
)
|
||||||
self.waitTillIdle()
|
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
|
// wait until lazygit is idle (i.e. all processing is done) before continuing
|
||||||
|
|||||||
Reference in New Issue
Block a user