]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
corrections of tests for overview
authorasl <asl@opencascade.com>
Fri, 3 Nov 2017 13:24:15 +0000 (16:24 +0300)
committerasl <asl@opencascade.com>
Fri, 3 Nov 2017 13:24:15 +0000 (16:24 +0300)
src/HYDRO_tests/reference_data/CMakeLists.txt
src/HYDRO_tests/reference_data/overview_panned_1.png
src/HYDRO_tests/reference_data/overview_selection.png
src/HYDRO_tests/reference_data/overview_selection_a.png [new file with mode: 0644]
src/HYDRO_tests/reference_data/overview_zoomed_2.png
src/HYDRO_tests/test_Overview.cxx

index 8957b0957432814d767b926c28d4f0a2371910ba..bcdd3397b0c9e0bf36a910f82fe1a530af056a3f 100644 (file)
@@ -135,6 +135,7 @@ SET(REFERENCE_DATA
     overview_empty.png
     overview_prs.png
     overview_selection.png
+    overview_selection_a.png
     overview_zoomed_1.png
     overview_zoomed_2.png
     overview_panned_1.png
index cf482f4498a5b996b5e25fe9adb45a0a898c193d..d1cdf9dd9723762b36ed4ea51a4e9135a6986152 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/overview_panned_1.png and b/src/HYDRO_tests/reference_data/overview_panned_1.png differ
index 18e18296532b766e971250439f2bc65a70e29064..bff97cc5713fee6671a75fa5d7e89a6c73209a48 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/overview_selection.png and b/src/HYDRO_tests/reference_data/overview_selection.png differ
diff --git a/src/HYDRO_tests/reference_data/overview_selection_a.png b/src/HYDRO_tests/reference_data/overview_selection_a.png
new file mode 100644 (file)
index 0000000..18e1829
Binary files /dev/null and b/src/HYDRO_tests/reference_data/overview_selection_a.png differ
index 169f8a792067a0574dcfb59d29541e2d6e52f566..1d58bc4f41fbfb4829519e1a1858c490cb68f9ad 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/overview_zoomed_2.png and b/src/HYDRO_tests/reference_data/overview_zoomed_2.png differ
index 3bba27d48f7bf412ac3e9a7eeb03238f8625226e..fe5f221b953bad46229ed4773d6705211219fe20 100644 (file)
@@ -159,13 +159,13 @@ void test_Overview::test_actions_in_main()
   showShape();
   TestViewer::viewWindow()->onTopView();
 
-  OCCViewer_ViewWindow* aMain = TestViewer::viewWindow()->getView( OCCViewer_ViewFrame::MAIN_VIEW );
-  OCCViewer_ViewPort3d* vp = aMain->getViewPort();
-
   // 1. selection in main view
   QTest::mouseMove( TestViewer::viewWindow() );
   CPPUNIT_ASSERT_OVERVIEW( "overview_selection" );
 
+  OCCViewer_ViewWindow* aMain = TestViewer::viewWindow()->getView( OCCViewer_ViewFrame::MAIN_VIEW );
+  OCCViewer_ViewPort3d* vp = aMain->getViewPort();
+
   // 2. mouse wheel zoom
   QWheelEvent we( QPoint( 243, 416 ), 120*20, Qt::NoButton, Qt::NoModifier );
   qApp->sendEvent( vp, &we );
@@ -210,10 +210,22 @@ void test_Overview::test_set_mainview_2_times()
   myOverview->setMainView( TestViewer::viewWindow() );
   qApp->processEvents();
 
-  CPPUNIT_ASSERT_OVERVIEW( "overview_selection" );
+  CPPUNIT_ASSERT_OVERVIEW( "overview_selection_a" );
 }
 
 void test_Overview::test_actions_in_overview()
 {
-  //TODO
+  create();
+  showShape();
+  TestViewer::viewWindow()->onTopView();
+
+  OCCViewer_ViewWindow* aMain = TestViewer::viewWindow()->getView( OCCViewer_ViewFrame::MAIN_VIEW );
+  OCCViewer_ViewPort3d* vp = aMain->getViewPort();
+
+  QWheelEvent we( QPoint( 243, 416 ), 120*20, Qt::NoButton, Qt::NoModifier );
+  qApp->sendEvent( vp, &we );
+  qApp->processEvents();
+  CPPUNIT_ASSERT_OVERVIEW( "overview_zoomed_1" );
+
+  QTest::qWait( 50000 );
 }