Try changing BitmapToggleButtonTestCase to avoid wxMSW failures
This test sporadically fails under AppVeyor, perhaps due to a hard-coded sleep in it which may somehow misbehave there -- try changing it not to rely on this sleep. This has a nice side effect of making the test run faster, too.
This commit is contained in:
parent
9b9ec141fb
commit
3f2b7f6bdb
1 changed files with 7 additions and 4 deletions
|
|
@ -74,8 +74,10 @@ void BitmapToggleButtonTestCase::Click()
|
|||
|
||||
wxUIActionSimulator sim;
|
||||
|
||||
const wxPoint pos = m_button->GetScreenPosition();
|
||||
|
||||
//We move in slightly to account for window decorations
|
||||
sim.MouseMove(m_button->GetScreenPosition() + wxPoint(10, 10));
|
||||
sim.MouseMove(pos + wxPoint(10, 10));
|
||||
wxYield();
|
||||
|
||||
sim.MouseClick();
|
||||
|
|
@ -86,9 +88,10 @@ void BitmapToggleButtonTestCase::Click()
|
|||
|
||||
clicked.Clear();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
wxMilliSleep(1000);
|
||||
#endif
|
||||
// Change the mouse position to prevent the second click from being
|
||||
// recognized as double click.
|
||||
sim.MouseMove(pos + wxPoint(20, 20));
|
||||
wxYield();
|
||||
|
||||
sim.MouseClick();
|
||||
wxYield();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue