From: asl Date: Fri, 3 Nov 2017 14:15:15 +0000 (+0300) Subject: refs #1328: additional test for overview actions X-Git-Tag: v2.1~61 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ce7ec42efc2c0c1aef385473bbb0102e89af8f34;p=modules%2Fhydro.git refs #1328: additional test for overview actions --- diff --git a/src/HYDRO_tests/reference_data/CMakeLists.txt b/src/HYDRO_tests/reference_data/CMakeLists.txt index bcdd3397..d16a4708 100644 --- a/src/HYDRO_tests/reference_data/CMakeLists.txt +++ b/src/HYDRO_tests/reference_data/CMakeLists.txt @@ -140,6 +140,7 @@ SET(REFERENCE_DATA overview_zoomed_2.png overview_panned_1.png overview_rotated_1.png + overview_drag.png bathy_rescaled_user.png bathy_rescaled_visible.png bathy_text_labels.png diff --git a/src/HYDRO_tests/reference_data/overview_drag.png b/src/HYDRO_tests/reference_data/overview_drag.png new file mode 100644 index 00000000..e4f5a910 Binary files /dev/null and b/src/HYDRO_tests/reference_data/overview_drag.png differ diff --git a/src/HYDRO_tests/test_Overview.cxx b/src/HYDRO_tests/test_Overview.cxx index fe5f221b..d01de7cf 100644 --- a/src/HYDRO_tests/test_Overview.cxx +++ b/src/HYDRO_tests/test_Overview.cxx @@ -218,6 +218,7 @@ void test_Overview::test_actions_in_overview() create(); showShape(); TestViewer::viewWindow()->onTopView(); + QTest::mouseMove( TestViewer::viewWindow() ); OCCViewer_ViewWindow* aMain = TestViewer::viewWindow()->getView( OCCViewer_ViewFrame::MAIN_VIEW ); OCCViewer_ViewPort3d* vp = aMain->getViewPort(); @@ -227,5 +228,11 @@ void test_Overview::test_actions_in_overview() qApp->processEvents(); CPPUNIT_ASSERT_OVERVIEW( "overview_zoomed_1" ); - QTest::qWait( 50000 ); + QTest::mouseMove( myOverview->getViewPort(false), QPoint( 150, 50 ) ); + QTest::mouseClick( myOverview->getViewPort(false), Qt::LeftButton, Qt::KeyboardModifiers(), QPoint( 150, 50 ) ); + qApp->processEvents(); + + CPPUNIT_ASSERT_OVERVIEW( "overview_drag" ); + + //QTest::qWait( 50000 ); }