Make sure the window is active after SetFocus() under wxQt

Calling wxYield() after SetFocus() ensures that the window is active
and the tests will pass. Otherwise, they would fail.
This commit is contained in:
ali kettab 2023-10-31 22:41:42 +01:00
parent 3a71aeed5e
commit b5dad92007
5 changed files with 16 additions and 3 deletions

View file

@ -281,6 +281,7 @@ TEST_CASE_METHOD(NumValidatorTestCase, "ValNum::Interactive", "[valnum]")
// Entering '-' in a control with positive range is not allowed.
m_text->SetFocus();
wxYield();
sim.Char('-');
wxYield();
CHECK( m_text->GetValue() == "" );