summaryrefslogtreecommitdiff
path: root/testautomation/framework
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2011-01-28 12:51:43 +0100
committerVladimir Glazunov <vg@openoffice.org>2011-01-28 12:51:43 +0100
commit1beec983c969aafe3b265d80ebe7bdac219f865d (patch)
tree39e412cfce9ef1c0bfd8193e40dbb5b9a8287122 /testautomation/framework
parent9ca154c806a82dad3c92d8e4363631628e1a5d6e (diff)
parent022a609786ee7c4d97a43168cb7dd6c3a4a14bb1 (diff)
CWS-TOOLING: integrate CWS tabcontrol
Diffstat (limited to 'testautomation/framework')
-rw-r--r--testautomation/framework/optional/f_basic_gridcontrol.bas1
-rw-r--r--testautomation/framework/optional/includes/basic_gridcontrol.inc52
-rwxr-xr-xtestautomation/framework/optional/input/gridcontrol.odtbin14075 -> 12252 bytes
3 files changed, 52 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
index 2f467b3f2852..d1d52c32245f 100755
--- a/testautomation/framework/optional/input/gridcontrol.odt
+++ b/testautomation/framework/optional/input/gridcontrol.odt
Binary files differ