diff options
author | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-04-29 15:20:44 +0200 |
---|---|---|
committer | Joerg Skottke [jsk] <jsk@openoffice.org> | 2010-04-29 15:20:44 +0200 |
commit | 99c8f2e22ac6a894baf4c8afa0d83a28b21a1fb7 (patch) | |
tree | 318499e6749646affd8b8012a3efc290f550c051 /testautomation/framework | |
parent | c0550c4cf087286cb9267f862f2f01b4335f9d18 (diff) |
vitomation01: #i111247 - Various small enhancements
Diffstat (limited to 'testautomation/framework')
-rwxr-xr-x | testautomation/framework/optional/f_basic_modules.bas | 1 | ||||
-rwxr-xr-x | testautomation/framework/optional/includes/basic_modulehide.inc | 18 |
2 files changed, 10 insertions, 9 deletions
diff --git a/testautomation/framework/optional/f_basic_modules.bas b/testautomation/framework/optional/f_basic_modules.bas index a2719c27bada..fa7aa18f9ef5 100755 --- a/testautomation/framework/optional/f_basic_modules.bas +++ b/testautomation/framework/optional/f_basic_modules.bas @@ -71,6 +71,7 @@ sub LoadIncludeFiles use "global\tools\includes\optional\t_filetools.inc" use "global\tools\includes\optional\t_accels.inc" use "global\tools\includes\optional\t_stringtools.inc" + use "global\tools\includes\optional\t_macro_tools.inc" gApplication = "WRITER" call GetUseFiles() diff --git a/testautomation/framework/optional/includes/basic_modulehide.inc b/testautomation/framework/optional/includes/basic_modulehide.inc index 2a86f71d4163..7702f14fdfb7 100755 --- a/testautomation/framework/optional/includes/basic_modulehide.inc +++ b/testautomation/framework/optional/includes/basic_modulehide.inc @@ -35,7 +35,9 @@ testcase tBasicIdeModuleHide const CFN = "tBasicIdeModuleHide::" - const RAISE_MESSAGEBOX = 1 + + const TESTMACRO = "TTMacro1" + const ERR_NO_LINES_INSERTED = 0 const RC_SUCCESS = 0 const RC_TIMEOUT = -1 @@ -52,7 +54,7 @@ testcase tBasicIdeModuleHide ToolsMacro_uno hCreateModuleForDoc() - if ( hInsertMacro( RAISE_MESSAGEBOX ) ) then + if ( hInsertMacroFromFile( TESTMACRO ) > ERR_NO_LINES_INSERTED ) then printlog( CFN & "Macro has been written successfully" ) else warnlog( CFN & "Failed to insert macro" ) @@ -64,7 +66,7 @@ testcase tBasicIdeModuleHide endif ' hTestMacro is expected to fail, so we jump to the catch statement - if ( hTestMacro( RAISE_MESSAGEBOX ) = RC_SUCCESS ) then + if ( hInsertMacroFromFile( TESTMACRO ) > ERR_NO_LINES_INSERTED ) then warnlog( "For some reason the original module is still visible" ) else warnlog( "There should not be any editingwindow visible" ) @@ -78,14 +80,12 @@ testcase tBasicIdeModuleHide goto endsub endif - if ( hTestMacro( RAISE_MESSAGEBOX ) = RAISE_MESSAGEBOX ) then - printlog( " * the correct macro-module is open. Good." ) - else - warnlog( "The open macro-module is not the one that was expected" ) + if ( not hBasicIDERunMacro( TESTMACRO ) ) then + warnlog( "Incorrect macro executed/macro missing" ) endif - + hCloseBasicIDE() - hCloseDocument() + hFileCloseAll() else warnlog( "restarting the office to recover from errors" ) |