summaryrefslogtreecommitdiff
path: root/testautomation/framework/optional/includes/basic_delete_modules.inc
diff options
context:
space:
mode:
authorskotti <skotti@buster>2009-12-01 13:13:53 +0100
committerskotti <skotti@buster>2009-12-01 13:13:53 +0100
commita664fcc23a8248208004e8de5ccc60e69d98778d (patch)
tree8e1ccf5935a22c2992c9598c847326c010b6accd /testautomation/framework/optional/includes/basic_delete_modules.inc
parentd839e25d30e4dbb2400ab07eca19b1b4e45d1287 (diff)
sb111: <no issue> Minor, non critical refactoring, done while reviewing test case for this CWS
Diffstat (limited to 'testautomation/framework/optional/includes/basic_delete_modules.inc')
-rwxr-xr-xtestautomation/framework/optional/includes/basic_delete_modules.inc32
1 files changed, 15 insertions, 17 deletions
diff --git a/testautomation/framework/optional/includes/basic_delete_modules.inc b/testautomation/framework/optional/includes/basic_delete_modules.inc
index 7d94c3e9b1e3..8a8d306d4b42 100755
--- a/testautomation/framework/optional/includes/basic_delete_modules.inc
+++ b/testautomation/framework/optional/includes/basic_delete_modules.inc
@@ -1,5 +1,5 @@
'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
+'*******************************************************************************
'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'*
'* Copyright 2008 by Sun Microsystems, Inc.
@@ -29,7 +29,7 @@
'* <http://www.openoffice.org/license.html>
'* for a copy of the LGPLv3 License.
'*
-'/************************************************************************
+'/******************************************************************************
'*
'* owner : joerg.skottke@sun.com
'*
@@ -43,20 +43,20 @@ testcase tDeleteModulesAtRunningBasic
dim brc as boolean
const MAX_WAIT = 3000
-
+ dim iMenuItemCount as integer
printlog( "Open a new writer-doc" )
gApplication = "WRITER"
-
Call hNewDocument()
- printlog( "Create a new module " )
+ printlog( "Open the BASIC Organizer" )
brc = hOpenBasicOrganizerFromDoc()
if ( not brc ) then
warnlog( "Unable to open BASIC organizer for the document" )
goto endsub
endif
-
+
+ printlog( "Create a new module for the current document" )
brc = hCreateModuleForDoc()
if ( not brc ) then
warnlog( "Unable to create a basic module for the document" )
@@ -82,15 +82,14 @@ testcase tDeleteModulesAtRunningBasic
Tabbar.OpenContextMenu()
try
- if ( hMenuItemGetCount() = 5 ) then
- warnlog( "#i101972# - Disabled entries are shown in context menu on tab bar" )
- end if
-
-
- if ( hMenuItemGetCount() = 3 ) then
- warnlog( "Delete is active in context menu for a running macro => BUG!" )
- end if
-
+ iMenuItemCount = hMenuItemGetCount()
+
+ select case ( iMenuItemCount )
+ case 2 : printlog( "Correct number of items in menu: " & iMenuItemCount )
+ case 3 : warnlog ( "Delete is active in context menu for a running macro => BUG!" )
+ case 5 : warnlog ( "#i101972# - Disabled entries are shown in context menu on tab bar" )
+ default : warnlog ( "Incorrect itemcount in context menu: " & iMenuItemCount )
+ end select
catch
warnlog( "Unable to retrieve the number of menuitems" )
endcatch
@@ -104,8 +103,7 @@ testcase tDeleteModulesAtRunningBasic
warnlog( "Slot not finished, timeout reached" )
endif
- Call hCloseDocument()
- Call hCloseDocument()
+ Call hFileCloseAll()
endcase