Also use WaitForEventAt() in Grid::SortClick test case

Abandon this test too if the mouse moves for whatever reason.
This commit is contained in:
Vadim Zeitlin 2023-12-25 15:16:40 +01:00
parent 8218e31418
commit 216b5a4b23

View file

@ -662,10 +662,10 @@ TEST_CASE_METHOD(GridTestCase, "Grid::SortClick", "[grid]")
wxYield();
sim.MouseClick();
WaitFor("mouse click to be processed", [&]() {
return sort.GetCount() != 0;
});
if ( !WaitForEventAt(pos, "mouse click to be processed", [&]() {
return sort.GetCount() != 0;
}) )
return;
CHECK(sort.GetCount() == 1);
#endif
}