]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #1341: debug of automatic tests
authorasl <asl@opencascade.com>
Wed, 15 Nov 2017 12:51:23 +0000 (15:51 +0300)
committerasl <asl@opencascade.com>
Wed, 15 Nov 2017 12:51:23 +0000 (15:51 +0300)
37 files changed:
src/HYDRO_tests/TestViewer.cxx
src/HYDRO_tests/reference_data/linux/Polyline_Presentation_triangle.png
src/HYDRO_tests/reference_data/linux/Split_Polylines_Colors.png
src/HYDRO_tests/reference_data/linux/Split_Straight.png
src/HYDRO_tests/reference_data/linux/bathy_prs.png
src/HYDRO_tests/reference_data/linux/bathy_prs_fit_selected.png
src/HYDRO_tests/reference_data/linux/bathy_rescaled_selection.png
src/HYDRO_tests/reference_data/linux/bathy_rescaled_user.png
src/HYDRO_tests/reference_data/linux/bathy_rescaled_visible.png
src/HYDRO_tests/reference_data/linux/bathy_selection.png
src/HYDRO_tests/reference_data/linux/bathy_text_labels.png
src/HYDRO_tests/reference_data/linux/diff_image.png
src/HYDRO_tests/reference_data/linux/gv_zoomed_1.png
src/HYDRO_tests/reference_data/linux/gv_zoomed_2.png
src/HYDRO_tests/reference_data/linux/merge_faces_boxes_13.png
src/HYDRO_tests/reference_data/linux/merge_faces_boxes_14.png
src/HYDRO_tests/reference_data/linux/merge_faces_boxes_21.png
src/HYDRO_tests/reference_data/linux/merge_faces_boxes_22.png
src/HYDRO_tests/reference_data/linux/merge_faces_circles_12.png
src/HYDRO_tests/reference_data/linux/merge_faces_circles_13.png
src/HYDRO_tests/reference_data/linux/merge_faces_circles_14.png
src/HYDRO_tests/reference_data/linux/merge_faces_circles_21.png
src/HYDRO_tests/reference_data/linux/overview_drag.png
src/HYDRO_tests/reference_data/linux/overview_empty.png
src/HYDRO_tests/reference_data/linux/overview_panned_1.png
src/HYDRO_tests/reference_data/linux/overview_prs.png
src/HYDRO_tests/reference_data/linux/overview_rotated_1.png
src/HYDRO_tests/reference_data/linux/overview_selection.png
src/HYDRO_tests/reference_data/linux/overview_selection_a.png
src/HYDRO_tests/reference_data/linux/overview_zoomed_1.png
src/HYDRO_tests/reference_data/linux/overview_zoomed_2.png
src/HYDRO_tests/reference_data/linux/stream_dtm_3d.png
src/HYDRO_tests/test_GraphicsView.cxx
src/HYDRO_tests/test_HYDROData_Main.cxx
src/HYDRO_tests/test_HYDROData_Stream.cxx
src/HYDRO_tests/test_HYDROGUI_BathymetryPrs.cxx
src/HYDRO_tests/test_Overview.cxx

index d02aa1f7dedd21bf163e6e5914fff27afebb36b9..36addda8e11a33e1325f1303246d7dc375eea563 100644 (file)
@@ -54,6 +54,7 @@
 #endif
 
 #include <cppunit/TestAssert.h>
+#include <QApplication>
 
 OCCViewer_ViewManager* TestViewer::myViewManager = 0;
 OCCViewer_ViewFrame* TestViewer::myViewWindow = 0;
@@ -134,6 +135,8 @@ void TestViewer::eraseAll( bool isUpdate, bool eraseStructures )
       GS->Erase();
     }
   }
+  viewer()->setTrihedronShown( false );
+  qApp->processEvents();
 }
 
 void TestViewer::show( const Handle(AIS_InteractiveObject)& theObject,
index 652ec440d3de562bcfee4c9e6eefac3cda841144..18e185b85ebd47c2ea1e3cc2912b74ac095b0659 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/Polyline_Presentation_triangle.png and b/src/HYDRO_tests/reference_data/linux/Polyline_Presentation_triangle.png differ
index b96b1d9319ee16d4da4c3029974a237842505029..184186f051cbdc2993a1542ad2afdf7b2cf49bbe 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/Split_Polylines_Colors.png and b/src/HYDRO_tests/reference_data/linux/Split_Polylines_Colors.png differ
index 89586780aacc32c3d30b99a548b6746f3b766036..a70479640d82e89647a5e913a2c9735feb6f3d67 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/Split_Straight.png and b/src/HYDRO_tests/reference_data/linux/Split_Straight.png differ
index 1cffa732e11c529f9a3f623b5c6716d652635253..838fd492196c5390e9a50615506451302ae3f5b6 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/bathy_prs.png and b/src/HYDRO_tests/reference_data/linux/bathy_prs.png differ
index d751826c61377c1ddf62cd5918898c3e1291ba0b..2926092710041f8c21ac2cc8cb013c3090101288 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/bathy_prs_fit_selected.png and b/src/HYDRO_tests/reference_data/linux/bathy_prs_fit_selected.png differ
index 6f628ccc31615888c6cbb7e3c11e1269b21d9c74..2fa7a43eb5afe37a14052eb1113861d890ec1867 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/bathy_rescaled_selection.png and b/src/HYDRO_tests/reference_data/linux/bathy_rescaled_selection.png differ
index 3fa36a36f360fe8e4ec1751108e7d277bf003fd2..008c265ccdf28f47dea9af31b7c395f4ba7d9ec2 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/bathy_rescaled_user.png and b/src/HYDRO_tests/reference_data/linux/bathy_rescaled_user.png differ
index 1d70bc84c6185c782cb04532cdba03c659abbe51..3470c2601d8066d71f545980158d736cbd4e184e 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/bathy_rescaled_visible.png and b/src/HYDRO_tests/reference_data/linux/bathy_rescaled_visible.png differ
index df5a5c5a1a9fd8a54d574b0a05dc4c184bb1712e..01d90f37cbefa980124d33264d2ba83f8668c531 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/bathy_selection.png and b/src/HYDRO_tests/reference_data/linux/bathy_selection.png differ
index 7b88665b8ed4aa109bd1017f389596e43f3805b6..fdb46308a4a9a877097322ac9564a22e08dd3d5f 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/bathy_text_labels.png and b/src/HYDRO_tests/reference_data/linux/bathy_text_labels.png differ
index f20ddb7fa88db4672a0b749a31e157ac833ca9b9..afd7eb3784f0c9d42a794f4897dedddc6c6accdc 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/diff_image.png and b/src/HYDRO_tests/reference_data/linux/diff_image.png differ
index 7d100270c0b1b2f07999cb61bf9b16bd8f6b8140..f3ba468c80596e2f6869437d8bb900a760fc91a3 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/gv_zoomed_1.png and b/src/HYDRO_tests/reference_data/linux/gv_zoomed_1.png differ
index b892b21823d9dd9e089c05765cc940bd24241220..eb568a27cf437b5072c70fb0d2ebe0eee3084e79 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/gv_zoomed_2.png and b/src/HYDRO_tests/reference_data/linux/gv_zoomed_2.png differ
index a85f343c38e5829a49abfdce68173e5e4ded5fc0..adb97cf36cb00c31f983e2ce962baea7be867f58 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_13.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_13.png differ
index 5cb66dadbeedb6f021246e5aa2f6a6a51acde038..bcc7bfaa27049c1a18e5257472693fe09bcdbe42 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_14.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_14.png differ
index 487d5ff80b1c025be94ec56d94a9c528952fbf28..2f47db4c5b1bd9ab341ed05c1d3b84cde73f8925 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_21.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_21.png differ
index d96c96c1f96b0d13fd0cd0d913f121b6efb6528a..2a027e1c5e1dc7d5dd2461dea6ad92e3a07807a9 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_22.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_boxes_22.png differ
index 4abe17aa0346d13eba3d0f8d9aa9733f3b321466..218889923ea874068a7fc7e9331980ec673a6451 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_circles_12.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_circles_12.png differ
index 4b73eb8cc175496577177b2983198c0256e62f94..11abeb3b650f1aa28b7dc8015bccb0c13759ffca 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_circles_13.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_circles_13.png differ
index 4b73eb8cc175496577177b2983198c0256e62f94..11abeb3b650f1aa28b7dc8015bccb0c13759ffca 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_circles_14.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_circles_14.png differ
index ca1eb432a90e98d31c897910ef4be89270058454..b0f0b8afa2d23fd263064202a0e6506a89f79b8f 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/merge_faces_circles_21.png and b/src/HYDRO_tests/reference_data/linux/merge_faces_circles_21.png differ
index d9c642635f3783579f464ee0380615dbdd6ddfcf..c8c241676f7dc1c585fcd444911bd7d472e7adaf 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/overview_drag.png and b/src/HYDRO_tests/reference_data/linux/overview_drag.png differ
index 1e37efd6270dd196329408bc71c05bbf78f534a3..d650ce30ecd6ba846987d6d50bc4f636d3559140 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/overview_empty.png and b/src/HYDRO_tests/reference_data/linux/overview_empty.png differ
index 48c25af3a07e02fb441e05ce43cb19eab0334c43..4027bede99c7885ce151e6c84b56ac6d59e2a55a 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/overview_panned_1.png and b/src/HYDRO_tests/reference_data/linux/overview_panned_1.png differ
index c2b37cf10bab82c5686c16d29b6f537af7f0a29a..c989e7d04dadf7b842caab530f28999d58c24821 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/overview_prs.png and b/src/HYDRO_tests/reference_data/linux/overview_prs.png differ
index da4ab14d07c6adfff92e54fe16931a0b68be57cc..b28710f0174d8271d78510cadb911c37b66bc9e2 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/overview_rotated_1.png and b/src/HYDRO_tests/reference_data/linux/overview_rotated_1.png differ
index 417780e6fc223fdba22d5ff105286a7bfa71a770..14cffa3181428e9530eca0048045262cb1d8c59b 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/overview_selection.png and b/src/HYDRO_tests/reference_data/linux/overview_selection.png differ
index 4af1406c16f5b9f2211f3c47a9f3fd27afd79370..dbecfe4e462d68bf0714bcaf945330f293df6c0c 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/overview_selection_a.png and b/src/HYDRO_tests/reference_data/linux/overview_selection_a.png differ
index 2944ba5336c7a5e0b5b37486a131ea6f7ac7f70c..da9ec2b520acb0bbfcf425a0384cc01f54313c53 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/overview_zoomed_1.png and b/src/HYDRO_tests/reference_data/linux/overview_zoomed_1.png differ
index 4c443cd98415846dd2a9340d597810e124a65de3..712d335ef034fa0e0e1a667f08af4a9c4b8e7748 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/overview_zoomed_2.png and b/src/HYDRO_tests/reference_data/linux/overview_zoomed_2.png differ
index 2f0eb241f63b15c813d88d53590849c9f176cc89..18b9520c60e1010d4589f2c6a35ca5be4c8bc70c 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/linux/stream_dtm_3d.png and b/src/HYDRO_tests/reference_data/linux/stream_dtm_3d.png differ
index 8d9f660231b6916d13f8816c0f76a61e7adb7231..b4d23f43c0839b711b383a39f0d34e06c5e99f75 100644 (file)
@@ -93,6 +93,8 @@ QRectF TestObject::boundingRect() const
 
 void test_GraphicsView::test_wheel_zoom()
 {
+  TestViewer::eraseAll( true, true );
+  
   GraphicsView_ViewManager* aViewManager = new GraphicsView_ViewManager( 0, 0 );
   GraphicsView_Viewer* aViewer = new GraphicsView_Viewer( "test", 0 );
 
@@ -111,11 +113,13 @@ void test_GraphicsView::test_wheel_zoom()
   TestObject* obj = new TestObject();
   aViewPort->addItem( obj );
   aViewPort->fitAll();
+  qApp->processEvents();
   CPPUNIT_ASSERT_VIEW( "gv_fitall" );
 
   // 2. Mouse wheel zoom
   QWheelEvent we1( QPoint( 10, 10 ), 120*10, Qt::NoButton, Qt::NoModifier );
   qApp->sendEvent( aViewPort->viewport(), &we1 );
+  qApp->processEvents();
   CPPUNIT_ASSERT_VIEW( "gv_zoomed_1" );
   
   //QTest::qWait( 50000 );
@@ -124,5 +128,9 @@ void test_GraphicsView::test_wheel_zoom()
   qApp->sendEvent( aViewPort->viewport(), &we2 );
   CPPUNIT_ASSERT_VIEW( "gv_zoomed_2" );
 
+  aWindow->setVisible(false);
+  aWindow->deleteLater();
+  qApp->processEvents();
+
   //QTest::qWait( 50000 );
 }
index b9fbf30583413fb818844aa52f5c082e2c1afb41..a3c68444595ab31a813053a0edbb4a2aaab52e13 100644 (file)
@@ -75,7 +75,11 @@ int main( int argc, char* argv[] )
     CppUnit::TestFactoryRegistry::getRegistry();
   // Add the top suite to the test runner
   TestLib_Runner runner;
+#ifdef WIN32
   QString aPath = qgetenv( "HYDRO_SRC_DIR" ) + "/src/tests.cfg";
+#else
+  QString aPath = "/tmp/hydro/tests.cfg";
+#endif
   runner.Load( aPath.toStdString() );
   runner.addTest( registry.makeTest() );   
   try
index 86c3d676350d726c6a92a78809a782d6c3ada00c..338eb7821d88ccf48e705da4275be7ac562827f1 100644 (file)
@@ -49,6 +49,8 @@ void test_HYDROData_Stream::tearDown()
 
 void test_HYDROData_Stream::test_dialog()
 {
+  TestViewer::eraseAll( true, true );
+  
   HYDROGUI_StreamDlg* aDlg = new HYDROGUI_StreamDlg( 0, "stream" );
   aDlg->show();
   qApp->processEvents();
@@ -67,6 +69,8 @@ void test_HYDROData_Stream::test_dialog()
 
 void test_HYDROData_Stream::test_alt_object()
 {
+  TestViewer::eraseAll( true, true );
+  
   Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
 
   Handle(HYDROData_Stream) aStream = 
@@ -87,6 +91,8 @@ void test_HYDROData_Stream::test_alt_object()
 
 void test_HYDROData_Stream::test_params_sync()
 {
+  TestViewer::eraseAll( true, true );
+  
   Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
 
   Handle(HYDROData_Stream) aStream = 
@@ -138,6 +144,8 @@ void test_HYDROData_Stream::test_params_sync()
 
 void test_HYDROData_Stream::test_dump()
 {
+  TestViewer::eraseAll( true, true );
+  
   // Case 1. Without hydraulic axis
   Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
 
@@ -227,6 +235,8 @@ void test_HYDROData_Stream::test_dump()
 
 void test_HYDROData_Stream::test_presentation()
 {
+  TestViewer::eraseAll( true, true );
+  
   Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
   
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
index f2c32cbdd69837fa907cbb42beb15dcbbc0045e9..4eec4f63173378f981a88b2a0eba9f1427932e45 100644 (file)
@@ -60,10 +60,9 @@ void test_HYDROGUI_BathymetryPrs::updateColors()
   myBathPrs->UpdateWithColorScale( TestViewer::colorScale() );
 }
 
-
 void test_HYDROGUI_BathymetryPrs::test_presentation()
 {
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
   Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
   
   importTestBath( aDoc );
@@ -80,7 +79,7 @@ void test_HYDROGUI_BathymetryPrs::test_presentation()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void select( int x1, int y1, int x2, int y2 )
@@ -95,7 +94,7 @@ void select( int x1, int y1, int x2, int y2 )
 
 void test_HYDROGUI_BathymetryPrs::test_selection()
 {
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
   Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
 
   importTestBath( aDoc );
@@ -121,12 +120,12 @@ void test_HYDROGUI_BathymetryPrs::test_selection()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void test_HYDROGUI_BathymetryPrs::test_rescale_by_selection()
 {
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
   Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
 
   importTestBath( aDoc );
@@ -180,12 +179,12 @@ void test_HYDROGUI_BathymetryPrs::test_rescale_by_selection()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void test_HYDROGUI_BathymetryPrs::test_rescale_by_visible()
 {
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
   Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
 
   importTestBath( aDoc );
@@ -227,12 +226,12 @@ void test_HYDROGUI_BathymetryPrs::test_rescale_by_visible()
 
   //QTest::qWait( 50000 );
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void test_HYDROGUI_BathymetryPrs::test_text_presentation()
 {
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
   Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
 
   importTestBath( aDoc );
@@ -278,12 +277,12 @@ void test_HYDROGUI_BathymetryPrs::test_text_presentation()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void test_HYDROGUI_BathymetryPrs::test_rescale_default()
 {
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
   Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
 
   importTestBath( aDoc );
@@ -335,12 +334,12 @@ void test_HYDROGUI_BathymetryPrs::test_rescale_default()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
 
 void test_HYDROGUI_BathymetryPrs::test_fit_on_selected()
 {
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
   Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
 
   importTestBath( aDoc );
@@ -365,5 +364,5 @@ void test_HYDROGUI_BathymetryPrs::test_fit_on_selected()
   //QTest::qWait( 50000 );
 
   aDoc->Close();
-  TestViewer::eraseAll( true );
+  TestViewer::eraseAll( true, true );
 }
index a58fca22aa107f706d2bc6a84cfe9e4193e605d0..4fef7e2185848d10bce4e1edd591bfbcccc582bb 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <HYDROGUI_Overview.h>
 #include <OCCViewer_ViewFrame.h>
+#include <OCCViewer_ViewModel.h>
 #include <OCCViewer_ViewPort3d.h>
 #include <V3d_View.hxx>
 
@@ -76,38 +77,45 @@ QImage test_Overview::dumpViews()
   painter.drawRect( WIDTH, WIDTH, w2, h2 );
   painter.drawRect( w2+WIDTH, WIDTH, w1, h1 );
 
+  //static int q = 0;
+  //q++;
+  //anOverview.save( QString( "/tmp/hydro/overview_" ) + QString::number( q ) + ".png" );
+  //aMain.save( QString( "/tmp/hydro/main_" ) + QString::number( q ) + ".png" );
+
   painter.drawImage( WIDTH, WIDTH, anOverview );
   painter.drawImage( w2+WIDTH, WIDTH, aMain );
 
-  return pix.toImage();
+  QImage res = pix.toImage();
+  //res.save( QString( "/tmp/hydro/result_" ) + QString::number( q ) + ".png" );
+  
+  return res;
 }
 
 void test_Overview::create()
 {
-  static bool isPassed = false;
-  if( isPassed )
-    return;
+  TestViewer::eraseAll( true, true );
+  
+  // Initialization of the empty viewer
 
-  // default mouse position
-  QTest::mouseMove( TestViewer::viewWindow(), QPoint( 0, 0 ) );
+  static bool isCreated = false;
+  if( !isCreated )
+  {
+    myOverview = new HYDROGUI_Overview( "Test overview" );
+    myOverview->show();
 
-  // Initialization of the empty viewer
-  myOverview = new HYDROGUI_Overview( "Test overview" );
-  myOverview->show();
+    // default mouse position
+    QTest::mouseMove( TestViewer::viewWindow(), QPoint( 0, 0 ) );
+
+    isCreated = true;
+  }
   myOverview->setMainView( TestViewer::viewWindow() );
   TestViewer::viewWindow()->setGeometry( 400, 100, 800, 800 );
   TestViewer::viewWindow()->onTopView();
   myOverview->setGeometry( 100, 100, 200, 200 );
-
-  isPassed = true;
 }
 
 void test_Overview::showShape()
 {
-  static bool isPassed = false;
-  if( isPassed )
-    return;
-
   // Show loaded shape in the viewer
   BRep_Builder B;
   TopoDS_Shape shape;
@@ -118,8 +126,6 @@ void test_Overview::showShape()
   
   qApp->processEvents();
   myOverview->setTopView(); //TODO: automatic fit all on show???*/
-
-  isPassed = true;
 }
 
 void fitAllWithRestore( OCCViewer_ViewPort3d* vp )
@@ -159,14 +165,21 @@ void test_Overview::test_actions_in_main()
   create();
   showShape();
   TestViewer::viewWindow()->onTopView();
-
-  // 1. selection in main view
-  QTest::mouseMove( TestViewer::viewWindow() );
-  CPPUNIT_ASSERT_OVERVIEW( "overview_selection" );
+  qApp->processEvents();
 
   OCCViewer_ViewWindow* aMain = TestViewer::viewWindow()->getView( OCCViewer_ViewFrame::MAIN_VIEW );
   OCCViewer_ViewPort3d* vp = aMain->getViewPort();
 
+  // 1. selection in main view
+  QTest::mouseMove( vp, QPoint(150,150) );
+  TestViewer::context()->MoveTo(150, 150, vp->getView(), Standard_True );
+  TestViewer::context()->Select( Standard_True );
+  qApp->processEvents();
+  //QTest::qWait( 50000 );
+  //aMain->dumpView().save("/tmp/hydro/dump.png");
+  //aMain->dumpView().rgbSwapped().save("/tmp/hydro/dump2.png");
+  CPPUNIT_ASSERT_OVERVIEW( "overview_selection" );
+
   // 2. mouse wheel zoom
   QWheelEvent we( QPoint( 243, 416 ), 120*20, Qt::NoButton, Qt::NoModifier );
   qApp->sendEvent( vp, &we );
@@ -203,7 +216,14 @@ void test_Overview::test_set_mainview_2_times()
   create();
   showShape();
   TestViewer::viewWindow()->onTopView();
-  QTest::mouseMove( TestViewer::viewWindow() );
+
+  OCCViewer_ViewWindow* aMain = TestViewer::viewWindow()->getView( OCCViewer_ViewFrame::MAIN_VIEW );
+  OCCViewer_ViewPort3d* vp = aMain->getViewPort();
+
+  QTest::mouseMove( vp, QPoint(150,150) );
+  TestViewer::context()->MoveTo(150, 150, vp->getView(), Standard_True );
+  TestViewer::context()->Select( Standard_True );
+  qApp->processEvents();
   
   //QTest::qWait( 20000 );
   CPPUNIT_ASSERT_OVERVIEW( "overview_selection" );
@@ -219,11 +239,15 @@ 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();
 
+  QTest::mouseMove( vp, QPoint(150,150) );
+  TestViewer::context()->MoveTo(150, 150, vp->getView(), Standard_True );
+  TestViewer::context()->Select( Standard_True );
+  qApp->processEvents();
+
   QWheelEvent we( QPoint( 243, 416 ), 120*20, Qt::NoButton, Qt::NoModifier );
   qApp->sendEvent( vp, &we );
   qApp->processEvents();