summaryrefslogtreecommitdiff
path: root/testautomation/framework/optional/includes/basic_documents.inc
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/framework/optional/includes/basic_documents.inc')
-rw-r--r--testautomation/framework/optional/includes/basic_documents.inc59
1 files changed, 27 insertions, 32 deletions
diff --git a/testautomation/framework/optional/includes/basic_documents.inc b/testautomation/framework/optional/includes/basic_documents.inc
index 47173efb8ef5..d5d12b1aa12f 100644
--- a/testautomation/framework/optional/includes/basic_documents.inc
+++ b/testautomation/framework/optional/includes/basic_documents.inc
@@ -35,12 +35,8 @@ private const IDOCS = 5
testcase tBasicDocuments
- qaerrorlog( "#i90435# Untitled documents unnumbered in BASIC organizer" )
- goto endsub
-
const CFN = "tBasicDocuments::"
-
dim brc as boolean
dim sFileWriter as string
dim sFileCalc as string
@@ -55,61 +51,66 @@ testcase tBasicDocuments
' in the Macro Organizer
const DOC_NAME = "basic"
- printlog( "" )
+ printlog( "Set macro security level to medium" )
iSecLevel = hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_MEDIUM )
-
+
+ printlog( "Open one single unchanged Writer document" )
hInitSingleDoc()
kontext "DocumentWriter"
DocumentWriter.typeKeys( "tBasicDocuments - initial document - discard after test" )
gApplication = "WRITER"
- printlog( "" )
+ printlog( "Create a Writer workfilename (build path and filename)" )
brc = hCreateBasicWorkFiles()
sFileWriter = hGetBasicWorkFile( "current" )
gApplication = "CALC"
- printlog( "" )
+ printlog( "Create a Calc workfilename (build path and filename)" )
brc = hCreateBasicWorkFiles()
sFileCalc = hGetBasicWorkFile( "current" )
- printlog( "" )
+ printlog( "Open the writer file" )
brc = hFileOpen( sFileWriter )
brc = hAllowMacroExecution()
if ( not brc ) then
warnlog( "Missing Macro execution dialog. Please check the file/security settings" )
endif
+
+ printlog( "Open the Calc file" )
brc = hFileOpen( sFileCalc )
brc = hAllowMacroExecution()
if ( not brc ) then
warnlog( "Missing Macro execution dialog. Please check the file/security settings" )
endif
- printlog( "" )
+ printlog( "Open the BASIC organizer" )
brc = hOpenBasicOrganizerFromDoc()
+ printlog( "Retreive the names of all nodes from the treelist" )
hGetVisibleNodeNames( MakroAus , cNodeListA() )
- printlog( "" )
+ printlog( "Verify that both documents are listed - one Writer, one Calc with identical names" )
iHitCount = hCountMatchesInList( cNodeListA() , DOC_NAME )
if ( iHitCount <> 2 ) then
warnlog( "There should be two documents with the name " & DOC_NAME & "listed." )
endif
-
+
+ printlog( "Click Manage..." )
verwalten.click()
- printlog( "" )
+ printlog( "Get the nodes list from the object organizer tabs - first tab" )
brc = hSelectBasicObjectOrganizerTab( 1 )
ListAllDelete( cNodeListB() )
hGetVisibleNodeNames( ModulListe , cNodeListB() )
- printlog( "" )
+ printlog( "Verify that both documents are listed on both relevant tabpages" )
iHitCount = hCountMatchesInList( cNodeListA() , DOC_NAME )
if ( iHitCount <> 2 ) then
warnlog( "There should be two documents with the name " & DOC_NAME & "listed." )
endif
- printlog( "" )
+ printlog( "Switch to second tab" )
brc = hSelectBasicObjectOrganizerTab( 2 )
ListAllDelete( cNodeListB() )
hGetVisibleNodeNames( ModuleList , cNodeListB() )
@@ -118,34 +119,33 @@ testcase tBasicDocuments
hListPrint( cNodeListB() , "List of objects found in treelist" )
endif
- printlog( "" )
+ printlog( "Verify" )
iHitCount = hCountMatchesInList( cNodeListB() , DOC_NAME )
if ( iHitCount <> 2 ) then
warnlog( "There should be two documents with the name " & DOC_NAME & "listed." )
endif
- printlog( "" )
+ printlog( "Third tab (should not list the document" )
brc = hSelectBasicObjectOrganizerTab( 3 )
brc = hTestLibraryListBox( cNodeListA() )
- printlog( "" )
printlog( CFN & "Closing dialogs..." )
TabBibliotheken.cancel()
-
+
+ printlog( "Cleanup: Close macro organizer" )
Kontext "Makro"
Makro.cancel()
- brc = hDestroyDocument()
- brc = hDestroyDocument()
-
+ printlog( "Cleanup: Close all files" )
+ hFileCloseAll()
+
+ printlog( "Cleanup: Remove workfiles" )
brc = hDeleteFile( sFileWriter )
brc = hDeleteFile( sFileCalc )
-
+
+ printlog( "Rest macro security level" )
hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT )
- hDestroyDocument()
-
-
endcase
'*******************************************************************************
@@ -154,15 +154,11 @@ function hTestLibraryListBox( cNodeList() ) as boolean
const CFN = "hTestLibraryListBox::"
-
-
dim iEntry as integer
dim cEntry as string
- dim brc as boolean
+ dim brc as boolean : brc = true
dim irc as integer
- brc = true
-
if ( bibliothek.getItemCount() <> IDOCS ) then
warnlog( CFN & "Incorrect number of items in listbox" )
printlog( CFN & "Expected: " & bibliothek.getItemCount() )
@@ -186,5 +182,4 @@ function hTestLibraryListBox( cNodeList() ) as boolean
next iEntry
-
end function