]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #1328: additional test for overview actions
authorasl <asl@opencascade.com>
Fri, 3 Nov 2017 14:15:15 +0000 (17:15 +0300)
committerasl <asl@opencascade.com>
Fri, 3 Nov 2017 14:15:15 +0000 (17:15 +0300)
src/HYDRO_tests/reference_data/CMakeLists.txt
src/HYDRO_tests/reference_data/overview_drag.png [new file with mode: 0644]
src/HYDRO_tests/test_Overview.cxx

index bcdd3397b0c9e0bf36a910f82fe1a530af056a3f..d16a47088566cd12d4e8e171f3cb53b5cf364bb0 100644 (file)
@@ -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 (file)
index 0000000..e4f5a91
Binary files /dev/null and b/src/HYDRO_tests/reference_data/overview_drag.png differ
index fe5f221b953bad46229ed4773d6705211219fe20..d01de7cf7a012027e229357daf3a6a00c6aea30b 100644 (file)
@@ -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 );
 }