Don't disable automated tests which work under GTK 3

Those tests are supposed to be skipped under GTK 2 only
This commit is contained in:
ali kettab 2022-09-15 11:29:24 +01:00
parent f9d55dbb5c
commit 1853d46c02

View file

@ -28,6 +28,14 @@
#include "waitforpaint.h"
// To disable tests which work locally, but not when run on GitHub CI.
#if defined(__WXGTK__) && !defined(__WXGTK3__)
#define wxSKIP_AUTOMATIC_TEST_IF_GTK2() \
if ( IsAutomaticTest() ) return
#else
#define wxSKIP_AUTOMATIC_TEST_IF_GTK2()
#endif
namespace
{
@ -609,17 +617,13 @@ TEST_CASE_METHOD(GridTestCase, "Grid::SortClick", "[grid]")
TEST_CASE_METHOD(GridTestCase, "Grid::Size", "[grid]")
{
// TODO on OSX resizing interactively works, but not automated
// Grid could not pass the test under GTK, OSX, and Universal.
// Grid could not pass the test under OSX and Universal.
// So there may has bug in Grid implementation
#if wxUSE_UIACTIONSIMULATOR && !defined(__WXOSX__) && !defined(__WXUNIVERSAL__)
if ( !EnableUITests() )
return;
#ifdef __WXGTK20__
// Works locally, but not when run on Travis CI.
if ( IsAutomaticTest() )
return;
#endif
wxSKIP_AUTOMATIC_TEST_IF_GTK2();
EventCounter colsize(m_grid, wxEVT_GRID_COL_SIZE);
EventCounter rowsize(m_grid, wxEVT_GRID_ROW_SIZE);
@ -659,11 +663,7 @@ TEST_CASE_METHOD(GridTestCase, "Grid::RangeSelect", "[grid]")
if ( !EnableUITests() )
return;
#ifdef __WXGTK20__
// Works locally, but not when run on Travis CI.
if ( IsAutomaticTest() )
return;
#endif
wxSKIP_AUTOMATIC_TEST_IF_GTK2();
EventCounter select(m_grid, wxEVT_GRID_RANGE_SELECTED);
@ -1456,16 +1456,12 @@ TEST_CASE_METHOD(GridTestCase, "Grid::WindowAsEditorControl", "[grid]")
TEST_CASE_METHOD(GridTestCase, "Grid::ResizeScrolledHeader", "[grid]")
{
// TODO this test currently works only under Windows unfortunately
// TODO this test currently works only under Windows and GTK unfortunately
#if wxUSE_UIACTIONSIMULATOR && (defined(__WXMSW__) || defined(__WXGTK__))
if ( !EnableUITests() )
return;
#ifdef __WXGTK20__
// Works locally, but not when run on Travis CI.
if ( IsAutomaticTest() )
return;
#endif
wxSKIP_AUTOMATIC_TEST_IF_GTK2();
SECTION("Default") {}
SECTION("Native header") { m_grid->UseNativeColHeader(); }
@ -1507,16 +1503,12 @@ TEST_CASE_METHOD(GridTestCase, "Grid::ResizeScrolledHeader", "[grid]")
TEST_CASE_METHOD(GridTestCase, "Grid::ColumnMinWidth", "[grid]")
{
// TODO this test currently works only under Windows unfortunately
// TODO this test currently works only under Windows and GTK unfortunately
#if wxUSE_UIACTIONSIMULATOR && (defined(__WXMSW__) || defined(__WXGTK__))
if ( !EnableUITests() )
return;
#ifdef __WXGTK20__
// Works locally, but not when run on Travis CI.
if ( IsAutomaticTest() )
return;
#endif
wxSKIP_AUTOMATIC_TEST_IF_GTK2();
SECTION("Default") {}
SECTION("Native header")