diff options
author | Thorsten Bosbach <tbo@openoffice.org> | 2011-01-20 15:13:01 +0100 |
---|---|---|
committer | Thorsten Bosbach <tbo@openoffice.org> | 2011-01-20 15:13:01 +0100 |
commit | facd3efbf57e411df7c3d2801b705308c328f215 (patch) | |
tree | ed017cf382433e8a07069ac3190cbea98e5c21cd | |
parent | 2c897eddbbac1c41c53e997db6c0a3d27628c88d (diff) |
#i113362# enhance gridcontrol test for tabpages
-rw-r--r-- | testautomation/framework/optional/f_basic_gridcontrol.bas | 1 | ||||
-rw-r--r-- | testautomation/framework/optional/includes/basic_gridcontrol.inc | 52 | ||||
-rwxr-xr-x | testautomation/framework/optional/input/gridcontrol.odt | bin | 14075 -> 12252 bytes | |||
-rw-r--r-- | testautomation/global/win/dial_d_h.win | 6 |
4 files changed, 58 insertions, 1 deletions
diff --git a/testautomation/framework/optional/f_basic_gridcontrol.bas b/testautomation/framework/optional/f_basic_gridcontrol.bas index dc5f9a392988..de92175ab5ec 100644 --- a/testautomation/framework/optional/f_basic_gridcontrol.bas +++ b/testautomation/framework/optional/f_basic_gridcontrol.bas @@ -39,6 +39,7 @@ sub main hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_LOW ) call tGridcontrolLoad + call tTabcontrolLoad hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT ) call hStatusOut() diff --git a/testautomation/framework/optional/includes/basic_gridcontrol.inc b/testautomation/framework/optional/includes/basic_gridcontrol.inc index 61d7837df3cb..95bad4d09463 100644 --- a/testautomation/framework/optional/includes/basic_gridcontrol.inc +++ b/testautomation/framework/optional/includes/basic_gridcontrol.inc @@ -32,7 +32,6 @@ '\****************************************************************************** testcase tGridcontrolLoad - const MACRO_NAME = "Show" const FILE_NAME = "framework/optional/input/gridcontrol.odt" @@ -91,7 +90,58 @@ testcase tGridcontrolLoad printlog( "Test exit, cleanup" ) hFileCloseAll() hDeleteFile( gLastWorkFile ) +endcase + + +testcase tTabcontrolLoad + const MACRO_NAME = "ShowTab" + const FILE_NAME = "framework/optional/input/gridcontrol.odt" + + dim i as integer + dim a as integer + printlog( "Open the test document: " & FILE_NAME ) + call hFileOpenLocally( gTestToolPath & FILE_NAME ) + + printlog "Start the macro, that performs the test" + hExecMacro( MACRO_NAME ) + + Kontext "tabcontroldialog" + if tabcontroldialog.exists(5) then + if tabcontainer.getPageCount = 2 then + printlog "There are 2 tabs" + else + warnlog "There are NOT 2 tabs, there are: " + tabcontainer.getpagecount + endif + if tabcontainer.getPage = "tabcontrol_1" then + printlog "Default tab page is page 1" + else + warnlog "Default tab page is NOT page 1" + endif + tabcontainer.setPage tabcontrol_2 + wait 1000 + if tabcontainer.getPage = "tabcontrol_2" then + printlog "Switching to tab 2 works" + else + warnlog "Switching to tab 2 failed" + endif + tabcontainer.setPage tabcontrol_1 + wait 1000 + if tabcontainer.getPage = "tabcontrol_1" then + printlog "Switching to tab 1 works" + else + warnlog "Switching to tab 1 failed" + endif + + Kontext "tabcontroldialog" + tabcontroldialog.close + else + warnlog "tabcontrol Dialog did not come up after pressing button" + endif + + printlog( "Test exit, cleanup" ) + hFileCloseAll() + hDeleteFile( gLastWorkFile ) endcase diff --git a/testautomation/framework/optional/input/gridcontrol.odt b/testautomation/framework/optional/input/gridcontrol.odt Binary files differindex 2f467b3f2852..d1d52c32245f 100755 --- a/testautomation/framework/optional/input/gridcontrol.odt +++ b/testautomation/framework/optional/input/gridcontrol.odt diff --git a/testautomation/global/win/dial_d_h.win b/testautomation/global/win/dial_d_h.win index ba6673edb39d..926c153ae43b 100644 --- a/testautomation/global/win/dial_d_h.win +++ b/testautomation/global/win/dial_d_h.win @@ -448,6 +448,12 @@ ShowGridcontrol sym:showGridcontrol *GridControlDialog sym:gridcontroldialog gridcontrolcontrol sym:gridcontrolself +*TabControlDialog sym:tabcontroldialog +tabcontrol_1 sym:tabcontrol_1 +tabcontrol_2 sym:tabcontrol_2 +tabbutton sym:tabbutton +tabcontainer sym:tabcontainer + *GroupingDlg sym:SC_HID_SC_DPDATEGROUP AutoStart sym:sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_AUTOSTART ManualStart sym:sc:RadioButton:RID_SCDLG_DPNUMGROUP:RB_MANSTART |