Use WaitForEventAt() in Grid::CellSelect test too
Try making this test more robust as well as it also sporadically fails on AppVeyor. Also simplify it a bit, checking for each of the expected events in turn instead of checking for their total number at the end.
This commit is contained in:
parent
e55d7c1dc3
commit
5f62f30231
1 changed files with 16 additions and 6 deletions
|
|
@ -557,22 +557,32 @@ TEST_CASE_METHOD(GridTestCase, "Grid::CellSelect", "[grid]")
|
|||
wxYield();
|
||||
|
||||
sim.MouseClick();
|
||||
wxYield();
|
||||
|
||||
if ( !WaitForEventAt(point, "mouse click to be processed", [&]() {
|
||||
return cell.GetCount() != 0;
|
||||
}) )
|
||||
return;
|
||||
CHECK(cell.GetCount() == 1);
|
||||
|
||||
cell.Clear();
|
||||
|
||||
m_grid->SetGridCursor(1, 1);
|
||||
|
||||
CHECK(cell.GetCount() == 1);
|
||||
cell.Clear();
|
||||
|
||||
m_grid->GoToCell(1, 0);
|
||||
|
||||
CHECK(cell.GetCount() == 1);
|
||||
cell.Clear();
|
||||
|
||||
sim.MouseMove(point);
|
||||
wxYield();
|
||||
|
||||
sim.MouseDblClick();
|
||||
wxYield();
|
||||
|
||||
CHECK(cell.GetCount() == 3);
|
||||
if ( !WaitForEventAt(point, "mouse double click to be processed", [&]() {
|
||||
return cell.GetCount() != 0;
|
||||
}) )
|
||||
return;
|
||||
CHECK(cell.GetCount() == 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue