From ce7ec42efc2c0c1aef385473bbb0102e89af8f34 Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 3 Nov 2017 17:15:15 +0300 Subject: [PATCH] refs #1328: additional test for overview actions --- src/HYDRO_tests/reference_data/CMakeLists.txt | 1 + src/HYDRO_tests/reference_data/overview_drag.png | Bin 0 -> 7464 bytes src/HYDRO_tests/test_Overview.cxx | 9 ++++++++- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/HYDRO_tests/reference_data/overview_drag.png 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 0000000000000000000000000000000000000000..e4f5a91056c9aa12b236579fd6448d1030cd6c03 GIT binary patch literal 7464 zcmeHMc|6qXzkkM*Y2l2~BHNIZgHxu{rW#D84Mkd{Vn#a3u4CWE=$x3z(jpN;r=)YN z9YvBcW#S~F#Y~aZOqQ}W3KN6-8B)K_J^i|`d++Q1b^q}4^*o<_c|V`$!Lr)AQGS}r zG=z}+=1r#72w^+nM`nr)tc3J6E`(oGy*Al;BlI0t`h$tr|4tPlwT8{6Yjy;rbTv`` zau2kt6g96hPTFx|jfUVk*^&Fp`TN-M>3r&O63ru>D$?O%$$rzXxmmE)i&!qHEY!H zJzEB~-wP7c9UtEVH~ba|Fi5ldZj;8txZ&A7UHcK@LEi&!L{Ty}F8skXad_*|EfPcTJBk8KKi`EqZ)UY0;3ZI;d@V z%hXuV%=du}wV9$C#s~H#AqFKD8`ZKrH|UAu9~JnOVf8VHCezOnhua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eQcYVqGpXQ%Le zw!1XOh5uD!gMZ#ZCe8l0)zn#wSq2mTrzf8;YfX&{4gB_NyW@@XJ?=5Weu);JU9ZDJ zdrsV0{<(@NCTdn#xi9s8E@z78v&L!C!RFtTQs~bVc@mr=;{f}acbvt@+f(1m?ca{< z?P*vS#)Yr7hS$t)_sOvvzhVOC%JrgIhKgU)J{AhKlOW%50)YSSiPt`m9|XtN82U=z z06)FceZun#-W2&dgRd!B=jEwiH}7k^VhZ9aEb89Tw-qs}$A|k&*uz&WqXXcn z`+|Z$+oDQooOr6@Y;mR^CF12{JXs>n>wr*Aph-x$;dU5eH3%M91la>c>ajJrkxN(#(#f2gDC;*jEPy=lPOX zZEP`hsPwN;eCa5wsJUCLMDJJu|G3aR&D1IHc;0uTUdcpk)I3r+5bD;$FYc-73G2)m z7`@X-9eR;t()IcwioLTYjDvTdi(dcJwGJW8Uz=^^VBwG!2X*Z zHuj>bW-%w+ptqY^+EZ&Rsx^7rWY8{zR8-6rutc442Xo3s>KchpgtLg`;MXyiZnm*3 zO9vMoA8F~inOkO#HJlBB&M+lUO}#k~=Q+sdk9Mc!h5e?>A2#nw)zM(TZwq^q(L8G2 z6SBXruU0ZR1ohe@Qo$fuA#<}!QAqFak;I_-cc}wgjQ&!@2rwXlddS^;hs2N z$eJt%vXvA{q!X}01&KI;dlX`MK;p`Yk~aM@I&$R%K2Y>v3vOKF2tH{^bY$QJ8dH|T z*7>+A2JmpVX5K4@t>d%ef_r7#;6;(|yFjECH@bEbGK?6-HDBHtA~$rS7XD|5Hm~1m Kn!A>EonTopView(); + 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 ); } -- 2.39.2