summaryrefslogtreecommitdiff
path: root/testautomation
diff options
context:
space:
mode:
authorThorsten Bosbach <tbo@OpenOffice.org>2010-07-19 18:08:34 +0200
committerThorsten Bosbach <tbo@OpenOffice.org>2010-07-19 18:08:34 +0200
commitf6d3ed5a642ec165583b4adb9c69b61e9c3f120e (patch)
treed986abee06468fa62e19f800f3f8d590dc55ec4a /testautomation
parent135c3397ff46737f0ef7a8f14f1050736e535347 (diff)
#i113248 fix tablecontrol test
Diffstat (limited to 'testautomation')
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/f_basic_gridcontrol.bas13
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/basic_gridcontrol.inc40
-rwxr-xr-xtestautomation/framework/optional/input/gridcontrol.odtbin12600 -> 14075 bytes
3 files changed, 26 insertions, 27 deletions
diff --git a/testautomation/framework/optional/f_basic_gridcontrol.bas b/testautomation/framework/optional/f_basic_gridcontrol.bas
index 74ee57c52c5d..697618e7fc65 100755..100644
--- a/testautomation/framework/optional/f_basic_gridcontrol.bas
+++ b/testautomation/framework/optional/f_basic_gridcontrol.bas
@@ -32,26 +32,17 @@
'\******************************************************************************
sub main
-
use "framework\optional\includes\basic_gridcontrol.inc"
-
call hStatusIn ("framework", "f_basic_gridcontrol.bas")
-
- hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_LOW )
+ printlog "Load Document with gridcontrol"
call tGridcontrolLoad
hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT )
-
- call hStatusOut()
-
+ call hStatusOut
end sub
sub LoadIncludeFiles
-
use "global\system\includes\master.inc"
use "global\system\includes\gvariabl.inc"
-
- use "global\tools\includes\optional\t_treelist_tools.inc"
-
gApplication = "WRITER"
call GetUseFiles()
end sub
diff --git a/testautomation/framework/optional/includes/basic_gridcontrol.inc b/testautomation/framework/optional/includes/basic_gridcontrol.inc
index 7f914ba9dafc..6406bb1844c8 100755..100644
--- a/testautomation/framework/optional/includes/basic_gridcontrol.inc
+++ b/testautomation/framework/optional/includes/basic_gridcontrol.inc
@@ -32,22 +32,28 @@
'\******************************************************************************
testcase tGridcontrolLoad
-
- const MACRO_NAME = "VclTestTool"
- const MACRO_NOT_FOUND = 0
- const FILE_NAME = "framework/optional/input/gridcontrol.odt"
-
- dim iPos as integer
+ dim sLocation as string
+ dim i,x,a as integer
+ dim sTemp as string
+ dim lFiles(200) as string
+ dim bTemp as boolean
+ dim iError, iOK as integer
- printlog( "Open the test document: " & FILE_NAME )
- call hFileOpen( gTestToolPath & FILE_NAME )
+ sLocation = "framework/optional/include/basic_gridcontrol.inc::"
- printlog( "Open the <Run Macro> dialog" )
- ToolsMacrosRunMacro
+ hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_LOW )
- printlog( "Find the document, its library and the test macro, run the macro" )
- Kontext "ScriptSelector"
- if ( ScriptSelector.exists( 10 ) ) then
+ printlog "Open the test document"
+ call hFileOpen(convertPath(gTestToolPath + "framework/optional/input/gridcontrol.odt"))
+ printlog "Security dialog might come up"
+ kontext "SecurityWarning"
+ if SecurityWarning.exists(5) then
+ printlog "Allow to run macros"
+ SecurityWarning.ok
+ endif
+ call sleep 1
+ call sMakeReadOnlyDocumentEditable
+ call sleep 1
printlog "Start the macro, that performs the test"
Kontext "GridControlDialogStarter"
@@ -96,9 +102,11 @@ testcase tGridcontrolLoad
warnlog "Gridcontrol Dialog did not come up after pressing button"
endif
- printlog( "Test exit, cleanup" )
- hFileCloseAll()
-
+ printlog "clean up"
+ printlog "Close the document, else an error about the navigator will be thrown"
+ if getDocumentcount > 0 then
+ call hCloseDocument()
+ endif
endcase
diff --git a/testautomation/framework/optional/input/gridcontrol.odt b/testautomation/framework/optional/input/gridcontrol.odt
index 46be0c44a065..2f467b3f2852 100755
--- a/testautomation/framework/optional/input/gridcontrol.odt
+++ b/testautomation/framework/optional/input/gridcontrol.odt
Binary files differ