Try to fix unit tests systematically failing under AppVeyor

Raise the window to ensure that it gets the expected mouse events.

See #24082.

Closes #24109.
This commit is contained in:
ali kettab 2023-11-30 14:24:46 +01:00 committed by Vadim Zeitlin
parent acdeb0b7f5
commit 47bc3a8b96
2 changed files with 4 additions and 0 deletions

View file

@ -360,6 +360,8 @@ GridTestCase::GridTestCase() : m_tempGrid(nullptr)
m_grid->Refresh(); m_grid->Refresh();
m_grid->Update(); m_grid->Update();
wxTheApp->GetTopWindow()->Raise();
waitForPaint.YieldUntilPainted(); waitForPaint.YieldUntilPainted();
} }

View file

@ -81,6 +81,8 @@ void ListCtrlTestCase::setUp()
m_list = new wxListCtrl(wxTheApp->GetTopWindow()); m_list = new wxListCtrl(wxTheApp->GetTopWindow());
m_list->SetWindowStyle(wxLC_REPORT | wxLC_EDIT_LABELS); m_list->SetWindowStyle(wxLC_REPORT | wxLC_EDIT_LABELS);
m_list->SetSize(400, 200); m_list->SetSize(400, 200);
wxTheApp->GetTopWindow()->Raise();
} }
void ListCtrlTestCase::tearDown() void ListCtrlTestCase::tearDown()