summaryrefslogtreecommitdiff
path: root/testautomation/framework/optional/includes/basic_gridcontrol.inc
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/framework/optional/includes/basic_gridcontrol.inc')
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/basic_gridcontrol.inc40
1 files changed, 24 insertions, 16 deletions
diff --git a/testautomation/framework/optional/includes/basic_gridcontrol.inc b/testautomation/framework/optional/includes/basic_gridcontrol.inc
index 181bd2aa9b1f..5cfbc4e0b879 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