Commits

Anonymous committed 7ce4ecd Merge

CWS-TOOLING: integrate CWS automationooo330m1

  • Participants
  • Parent commits b727f1b, f94d508

Comments (0)

Files changed (9)

File testautomation/chart2/optional/includes/loadsave/ch2_xml_format.inc

     SAXSeekElement("chart:plot-area")
     '/// If the attribute value of 'table:cell-range-address' is 'Sheet1.A1:Sheet1.B2'
     '///+ the second characteristics validation has been passed.
-    if SAXGetAttributeValue("table:cell-range-address") = "Sheet1.A1:B2" then
+    if SAXGetAttributeValue("table:cell-range-address") = "Sheet1.A1:Sheet1.B2" then
         printlog "The cell range for chart:plot-area is correct"
     else
-        warnlog "#i100780#: The cell range is not Sheet1.A1:B2, it is " & SaxGetAttributeValue("table:cell-range-address")
+        warnlog "The cell range is not Sheet1.A1:Sheet1.B2, it is " & SaxGetAttributeValue("table:cell-range-address")
     endif
     printlog "Seek for chart:series"
     printlog "               |-chart:series"
     SAXSeekElement("chart:series")
     '/// If the attribute valie of 'chart:values-cell-range-address' is Sheet1.A1:Sheet1.A2''
     '///+ the hird characteristics validation has been passed.
-    if SAXGetAttributeValue("chart:values-cell-range-address") = "Sheet1.A1:A2" then
+    if SAXGetAttributeValue("chart:values-cell-range-address") = "Sheet1.A1:Sheet1.A2" then
         printlog "The cell range for chart:series is correct"
     else
-        warnlog "#i100780#: The cell range is not Sheet1.A1:A2, it is " & SaxGetAttributeValue("chart:values-cell-range-address")
+        warnlog "The cell range is not Sheet1.A1:Sheet1.A2, it is " & SaxGetAttributeValue("chart:values-cell-range-address")
     endif
     ' DEBUG: printlog "I'm here: " & SAXGetElementName
     '/// Close the XML editor.

File testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard.inc

     endif    
     printlog "Check that 3D look is 'simple' (=default)"
     if Scheme3D.GetSelIndex <> 1 then
-        warnlog "#i112522# - Default 3D Look ('simple') has not been preserved after save and reload."
+        qaerrorlog "#i112522# - Default 3D Look ('simple') has not been preserved after save and reload."
     endif    
     printlog "Check that 3D shape 'cone' is selected"
     if BarColumnShape.GetSelIndex <> 3 Then

File testautomation/dbaccess/optional/includes/wiz_DatabaseWizard.inc

 '-------------------------------------------------------------------------
 testcase tMozilla
 
-    if ( fCreateMozillaAddressbookDatasource(gOfficePath + "user/work/tt_mozilla.odb") = true) then
-        if ( fOpendatabase(gOfficePath + "user/work/tt_mozilla.odb") = true) then        
-            Kontext "ContainerView"
-                ViewTables
+    if(gPlatform = "osx") then
+        qaerrorlog "Mozilla address book not supported under Mac."
+    else
+        if ( fCreateMozillaAddressbookDatasource(gOfficePath + "user/work/tt_mozilla.odb") = true) then
+            if ( fOpendatabase(gOfficePath + "user/work/tt_mozilla.odb") = true) then
+                Kontext "ContainerView"
+                    ViewTables
+            else
+                warnlog "mozilla database could not be open."
+
+            endif
         else
-            warnlog "mozilla database could not be open."
-
+            qaerrorlog "mozilla database could not be created. Maybe you have no mozilla installed."
+            Kontext "MessageBox"
+                    if (MessageBox.exists(1)) then
+                            MessageBox.OK
+                    endif
         endif
-    else
-        qaerrorlog "mozilla database could not be created. Maybe you have no mozilla installed."
-    	Kontext "MessageBox"
-    		if (MessageBox.exists(1)) then
-    			MessageBox.OK
-    		endif
+            ' try to close the database
+        call fCloseDatabase(false)
     endif
-	' try to close the database    
-    call fCloseDatabase(false)
     
 endcase
 '-------------------------------------------------------------------------

File testautomation/framework/optional/f_basic_gridcontrol.bas

 '\******************************************************************************
 
 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

File testautomation/framework/optional/includes/basic_gridcontrol.inc

 '\******************************************************************************
 
 testcase tGridcontrolLoad
+    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
+    
+    sLocation = "framework/optional/include/basic_gridcontrol.inc::"
 
-    const MACRO_NAME = "VclTestTool"
-    const MACRO_NOT_FOUND = 0
-    const FILE_NAME  = "framework/optional/input/gridcontrol.odt"
+    hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_LOW )
 
-    dim iPos as integer
-    
-    printlog( "Open the test document: " & FILE_NAME )
-    call hFileOpen( gTestToolPath & FILE_NAME )
-
-    printlog( "Open the <Run Macro> dialog" )
-    ToolsMacrosRunMacro
-
-    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"
         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
 
 

File testautomation/framework/optional/includes/security_macrosecurity.inc

 testcase tMacroSecurityLevels( cFileFormat )
 
     printlog( "Check macro execution behavior for all macro security levels" )
+    warnlog( "#i110184# - Documentbound macros not executed when loaded via API" )
+    goto endsub
 
     dim cWorkFile as string
         cWorkFile = gTesttoolPath & "framework\optional\input\BasicDocs\"

File testautomation/framework/optional/input/gridcontrol.odt

Binary file modified.

File testautomation/graphics/optional/includes/global/export_graphic.inc

 '\******************************************************************************
 
 testcase tEPS
-
     dim x as integer
     dim i as integer
-
     const sFilter = "EPS - Encapsulated PostScript (.eps)"
     const sExt = ".eps"
 
     printlog "open the document"
     hFileOpen( gTesttoolPath + "graphics\required\input\graphicexport." + ExtensionString )
-
     if ( hCallExport ( OutputGrafikTBO , sFilter ) ) then
         Kontext "EPSOptionen"
         if ( EPSOptionen.Exists( 2 ) ) then
             ' next i
             printlog "leave dialog with cancel -> there has to be no file created!"
             hCloseDialog( EPSOptionen, "cancel" )
-
             if ( FileExists( OutputGrafikTBO+sExt ) ) then ' inspired by bug #99932 Graphic is exported though cancel is pressed
                 warnlog "Dialog was canceled, but file got saved, too :-(  - i35177"
             endif
         else
             warnlog( "No export options dialog was displayed" )
         end if
-
         Kontext "Active"
         if Active.Exists(2) then
             Warnlog "'" + sFilter + "' has a problem"
             Active.OK
         end if
     end if
-
     printlog( "Save the file" )
     if ( hCallExport( OutputGrafikTBO, sFilter ) ) then
 
         else
             warnlog( "No export options dialog was displayed" )
         endif
-
         printlog( "Close file and re-insert graphics into new document" )
-        hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+        if ( lcase( gPlatform ) <> "osx" ) then
+            hInsertGraphicsToNewFile( OutputGrafikTBO + sExt ) ' local helper function, see bottom of this file
+        else
+            qaErrorLog "#i100253# crash on MacOS X 10.4"
+        endif
     endif
-
     call hCloseDocument
-
 endcase 'tEPS
 '-------------------------------------------------------------------------
 testcase tPCT
 '*******************************************************************************
 
 function hWaitForOutputFile( sOutputFile as string ) as boolean
-
     const FILE_WRITE_TIMEOUT = 30
     dim iWait as integer : iWait = 0
 
     for iWait = 1 to FILE_WRITE_TIMEOUT
-
         ' File found
         if ( FileExists( sOutputFile ) ) then
             hWaitForOutputFile() = true
             exit function
         endif
-
         ' Timeout
         if ( iWait = FILE_WRITE_TIMEOUT ) then
             hWaitForOutputFile() = false
             exit function
         endif
+        wait( 1000 )
+    next iWait
+end function
 
-        wait( 1000 )
-
-    next iWait
-
-end function

File testautomation/spreadsheet/required/includes/c_upd_filemenu.inc

 testcase tFileRecentDocuments
 
 if gPlatform = "lin" then
-    warnlog "#110649# Due to bug this testcase is not available"
+    qaerrorlog "#110649# Due to bug this testcase is not available"
     goto endsub
 end if