[Libreoffice-commits] .: 6 commits - testautomation/dbaccess testautomation/global testautomation/graphics

René Engelhard rene at kemper.freedesktop.org
Sat Jan 1 17:21:58 PST 2011


 testautomation/dbaccess/tools/querytools.inc                          |   11 ---
 testautomation/dbaccess/tools/tabletools.inc                          |    9 +-
 testautomation/global/sid/e_all.sid                                   |    3 
 testautomation/global/tools/includes/optional/t_security_tools.inc    |   13 ----
 testautomation/graphics/optional/includes/global/export_graphic_2.inc |   32 ----------
 testautomation/graphics/optional/includes/impress/i_slideshow2.inc    |    4 -
 testautomation/graphics/optional/includes/impress/i_slideshow3.inc    |    2 
 7 files changed, 14 insertions(+), 60 deletions(-)

New commits:
commit 3f0b05e5bd48a578100311548482bf4f66e7770b
Merge: b1bc3a2... 38750af...
Author: Rene Engelhard <rene at debian.org>
Date:   Sun Jan 2 01:13:29 2011 +0100

    Merge remote branch 'origin/libreoffice-3-3'

commit 38750afca83fabcb8ed54a9a4ddffc43b00bb8aa
Author: Yifan J <yfjiang at novell.com>
Date:   Fri Dec 24 16:31:00 2010 +0800

    slideshow test case update.
    
    influenced case:
    i_sildeshow.bas
    
    1. give more safe coordination for drawing rectangle
    
    otherwise the testtool may 'click insert chart
    icon in the slide page' by accident when trying
    to 'drawing a rectangle'
    
    2. use uno slot to Call Slide Show -> Custom Slide Show...
    
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/testautomation/global/sid/e_all.sid b/testautomation/global/sid/e_all.sid
index 1a8a0b7..d7215aa 100644
--- a/testautomation/global/sid/e_all.sid
+++ b/testautomation/global/sid/e_all.sid
@@ -790,7 +790,7 @@ SlideShowAnimation .uno:CustomAnimation
 SlideShowSlideTransition .uno:SlideChangeWindow
 SlideShowHideSlide SID_HIDE_SLIDE
 SlideShowShowSlide SID_SHOW_SLIDE 
-SlideShowCustomSlideshow SID_CUSTOMSHOW_DLG
+SlideShowCustomSlideshow .uno:CustomShowDialog
 SlideShowCustomAnimation .uno:CustomAnimation
 
 ' ***********************************
diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow3.inc b/testautomation/graphics/optional/includes/impress/i_slideshow3.inc
index 63a04aa..e2fe410 100644
--- a/testautomation/graphics/optional/includes/impress/i_slideshow3.inc
+++ b/testautomation/graphics/optional/includes/impress/i_slideshow3.inc
@@ -582,7 +582,7 @@ testcase tExtrasIndividuellePraesentation
       Kontext "NavigatorDraw"
       Naechste.Click						'/// switch to next slide ///'
       Kontext "DocumentImpress"
-      hRechteckErstellen (50,50,60,60)		'/// create rectangle ///'
+      hRechteckErstellen (30,30,40,40)		'/// create rectangle ///'
       Printlog "  - Created rectangles on all slides"
    else
       Warnlog "  No Navigator"
commit f76964c45155a0ad352bda87d208d732eed27851
Author: Yifan J <yfjiang at novell.com>
Date:   Fri Dec 24 15:38:42 2010 +0800

    use uno slot to click File->Save(as) in Base.
    
    influenced case:
    testautomation/dbaccess/optional/dba_db_hsqldb.bas
    
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/testautomation/dbaccess/tools/querytools.inc b/testautomation/dbaccess/tools/querytools.inc
index 29416da..7dc3d72 100755
--- a/testautomation/dbaccess/tools/querytools.inc
+++ b/testautomation/dbaccess/tools/querytools.inc
@@ -258,10 +258,7 @@ function fSaveQueryDesign(sName as String)
     
     sleep(1)
     Kontext "QueryDesignTable"
-        QueryDesignTable.UseMenu
-        
-        hMenuSelectNr(1) ' the file menu
-        hMenuSelectNr(6) ' the save
+        DatabaseSave
                 
     Kontext "DatabaseTableSaveAs"
         TableName.setText(sName)
@@ -278,11 +275,9 @@ function fSaveSQLQueryDesign(sName as String)
     '/// <u>parameter:</u>  the name of query   
     
     sleep(1)
+
     Kontext "QueryEditWindow"
-        QueryEditWindow.UseMenu
-        
-        hMenuSelectNr(1) ' the file menu
-        hMenuSelectNr(6) ' the save
+        DatabaseSaveAs
                 
     Kontext "DatabaseTableSaveAs"
         TableName.setText(sName)
diff --git a/testautomation/dbaccess/tools/tabletools.inc b/testautomation/dbaccess/tools/tabletools.inc
index 99c4abf..1f6dd23 100755
--- a/testautomation/dbaccess/tools/tabletools.inc
+++ b/testautomation/dbaccess/tools/tabletools.inc
@@ -342,13 +342,12 @@ function fCreateTable(aFieldTypeContent(),sTableName,optional sCatalog,optional
         Description.TypeKeys "<RETURN>" , TRUE
         printlog "-------------------------------"
     next 
+
     sleep(1)    
+
     Kontext "TableDesignTable"         
-        TableDesignTable.usemenu
-        MenuSelect MenuGetItemId (1)
-        sleep(1)
-        menuselect MenuGetItemId (7)
-        sleep(1)	
+        DatabaseSaveas
+
     Kontext "DatabaseTableSaveAs"
         printlog "save table as "+ sTableName
         TableName.setText sTableName
commit f33f12d1df45316d2289ccdf0b1fd3109666bd67
Author: Yifan J <yfjiang at novell.com>
Date:   Fri Dec 24 15:33:22 2010 +0800

    more stable export graphic test.
    
    influenced cases:
    /testautomation/graphics/optional/d_export_graphic_a.bas
    /testautomation/graphics/optional/d_export_graphic_b.bas
    
    1. do not verify exported SVG xml content, just verify
    the exported file is existed. Because SVG will be rendered
    by Draw directly instead of ASCII import mode (which was
    used by the old script to verify the content).
    
    2. replace an inexisted testing picture to an
    existed one
    
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/testautomation/graphics/optional/includes/global/export_graphic_2.inc b/testautomation/graphics/optional/includes/global/export_graphic_2.inc
index 5e0a2f3..be5ed49 100644
--- a/testautomation/graphics/optional/includes/global/export_graphic_2.inc
+++ b/testautomation/graphics/optional/includes/global/export_graphic_2.inc
@@ -613,38 +613,6 @@ testcase tSVG
         '------------------------\
         if ( dir(OutputGrafikTBO+sExt) <> "") then
             Printlog "Ok :-) Saved as: '" & OutputGrafikTBO+sExt & "'"
-            '------------------------\
-            if (iSprache <> 82) then
-                hCloseDocument ()
-                sleep 5
-                sTextFilter = "Text"
-
-                hFileOpenWithFilter (OutputGrafikTBO+sExt, sTextFiltername, FALSE)
-                printlog "if dialog 'AsciiFilterOptionen' comes up, say OK"
-                Kontext "AsciiFilterOptionen"
-                '-------------------------------\
-                If AsciiFilterOptionen.Exists(3) then
-                    AsciiFilterOptionen.OK
-                else
-                    warnlog "No ASCII filter Options Dialog?"
-                endif
-                '-------------------------------/
-                sTemp = gApplication
-                gApplication = "WRITER"
-                sleep 5 ' wait for document to be loaded
-                bTemp = hFindeImDokument ("<!DOCTYPE svg PUBLIC " & chr(34)& "-//W3C//DTD SVG 1.1//EN" & chr(34)&" " & chr(34)&"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" & chr(34)&">",true)
-                '-------------------------------\
-                if (bTemp = TRUE) then
-                    Printlog "OK"
-                else
-                    warnlog "DOCTYPE not found in svg file :-("
-                endif
-                '-------------------------------/
-                gApplication = sTemp
-            else
-                qaerrorlog "disabled for 82: #111017#"
-            endif
-            '--------------------------/
         else
             warnlog "File didn't get saved :-("
         endif
diff --git a/testautomation/graphics/optional/includes/impress/i_slideshow2.inc b/testautomation/graphics/optional/includes/impress/i_slideshow2.inc
index b15beb2..4de68a2 100644
--- a/testautomation/graphics/optional/includes/impress/i_slideshow2.inc
+++ b/testautomation/graphics/optional/includes/impress/i_slideshow2.inc
@@ -909,7 +909,7 @@ testcase tSlideshowBackgroundAllSlides
     Dim Background$ as string
     Dim i as integer
     Dim Zaehler as integer
-    Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\emoticons\grin.gif")
+    Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\www-back\chocolate.jpg")
     Datei$ = ConvertPath (gOfficePath + "user\work\background.odp")
 
     '/// Create a new document ///'
@@ -962,7 +962,7 @@ testcase tSlideshowBackgroundSelectedSlide
     Dim Background$ as string
     Dim i as integer
     Dim Zaehler as integer
-    Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\emoticons\grin.gif")
+    Background$ = ConvertPath(gOfficeBasisPath + "share\gallery\www-back\chocolate.jpg")
     Datei$ = ConvertPath (gOfficePath + "user\work\background.odp")
 
     '/// Create a new document ///'
commit 821b2e4b9a24e404a6f40714481765c58850bb0d
Author: Yifan J <yfjiang at novell.com>
Date:   Mon Dec 20 13:37:10 2010 +0800

    use uno to invoke File->Digital Signature dialog.
    
    influenced case:
    f_security_dialogs.bas
    f_security_certified_docs.bas
    
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/testautomation/global/sid/e_all.sid b/testautomation/global/sid/e_all.sid
index 4c7800b..1a8a0b7 100644
--- a/testautomation/global/sid/e_all.sid
+++ b/testautomation/global/sid/e_all.sid
@@ -35,6 +35,7 @@ FileSendDocumentAsPDF SID_MAIL_SENDDOCASPDF
 FileVersions SID_VERSION
 FileReload SID_RELOAD SID_LASTVERSIONDOC
 FileProperties SID_DOCINFO
+FileDigitalSignatures .uno:Signature
 FileTemplatesOrganize SID_ORGANIZER
 FileTemplatesSave SID_DOCTEMPLATE
 FileTemplatesEdit SID_OPENTEMPLATE
diff --git a/testautomation/global/tools/includes/optional/t_security_tools.inc b/testautomation/global/tools/includes/optional/t_security_tools.inc
index 28625be..6952f7e 100755
--- a/testautomation/global/tools/includes/optional/t_security_tools.inc
+++ b/testautomation/global/tools/includes/optional/t_security_tools.inc
@@ -144,17 +144,8 @@ function hOpenDigitalSignaturesDialog() as boolean
     '///+<li>Open the file-menu</li>
     call hUseMenu()
     call hMenuSelectNr( FILE_MENU_POSITION )
-                                                                                
-    '///+<li>Select &quot;Digital signatures...&quot;</li>
-    try
-        if ( gApplication = "MATH" ) then
-            call hMenuSelectNr( SIGNATURES_MENU_POSITION_MATH )
-        else
-            call hMenuSelectNr( SIGNATURES_MENU_POSITION_OTHER )
-        endif
-    catch
-        warnlog( CFN & "Failed to execute menuitem <Digital Signature...>" )
-    endcatch
+
+    FileDigitalSignatures
 
     ' At this stage either the digital signatures dialog or the messagebox
     ' <The document needs to be saved> is open. In the latter case the function
commit e28cc4c4a2d8d7f8cdae8b9731597c397b2480ea
Author: Yifan J <yfjiang at novell.com>
Date:   Thu Dec 16 16:31:08 2010 +0800

    set small icon theme at beginning of testing
    
    also replaced tabs characters in source
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/testautomation/global/system/includes/master.inc b/testautomation/global/system/includes/master.inc
index 562e9a9..3496d11 100755
--- a/testautomation/global/system/includes/master.inc
+++ b/testautomation/global/system/includes/master.inc
@@ -61,7 +61,8 @@
 sub GetUseFiles
 '///<i>GetUseFiles</i>: The first routine which will be called automatically by starting a testscript.
 '/// Include all important libraries (.inc) for the startup.
-    Dim bQuickstarterStatus as boolean
+    Dim bQuickstarterStatus as Boolean
+    Dim bSmallIconTheme As Boolean
     Dim sTemp as string
     Dim sPrivateEnvironmentLocation as string
     Dim sEnvironmentVersion as string
@@ -96,7 +97,12 @@ sub GetUseFiles
    '///+<li>Disabling the Quickstarter.
         'This can't be done via API right now.
         bQuickstarterStatus = hDisableQuickstarter
-        printlog "**  Quickstarter disabled         : " & bQuickstarterStatus      
+        printlog "**  Quickstarter disabled         : " & bQuickstarterStatus
+
+        'Small icon theme set
+        bSmallIconTheme = hSetSmallIconTheme
+        printlog "**  Small icon theme set          : " & bSmallIconTheme
+
     printlog    "----------------------------------------------------------------------------------------------------"
     printlog    ""
 
@@ -113,22 +119,22 @@ sub GetUseFiles
 '/// The checking can be disabled, by using  Current=HEAD, or removing the file version.txt
     sPrivateEnvironmentLocation = ConvertPath (gTestToolPath + "global\version.txt")
     if fileExists(sPrivateEnvironmentLocation) then
-	sEnvironmentVersion = getIniValue(sPrivateEnvironmentLocation, "EnvironmentVersion", "Current")
-	sEnvironmentDisplayVersion = getIniValue(sPrivateEnvironmentLocation, "EnvironmentVersion", "DisplayName")
-	sEnvironmentVersionMinor =  getIniValue(sPrivateEnvironmentLocation, "EnvironmentVersion", "Minor")
+        sEnvironmentVersion = getIniValue(sPrivateEnvironmentLocation, "EnvironmentVersion", "Current")
+        sEnvironmentDisplayVersion = getIniValue(sPrivateEnvironmentLocation, "EnvironmentVersion", "DisplayName")
+        sEnvironmentVersionMinor =  getIniValue(sPrivateEnvironmentLocation, "EnvironmentVersion", "Minor")
     else
         sEnvironmentVersion = "HEAD"
         sEnvironmentDisplayVersion = "Developer"
     end if
     if sEnvironmentVersion <> "HEAD" then
         if (len(gMajor) > 5) then
-	    if lCase(left(gMajor,6)) <> lCase(left(sEnvironmentVersion,6)) OR (lCase(gMinor) <> lCase(sEnvironmentVersionMinor)) then
+            if lCase(left(gMajor,6)) <> lCase(left(sEnvironmentVersion,6)) OR (lCase(gMinor) <> lCase(sEnvironmentVersionMinor)) then
                 warnlog "This environment '" + sEnvironmentVersion + sEnvironmentVersionMinor + "' is not suitable for this OOo version '" + left(gMajor,6) + gMinor + "'!"+chr(13)+"Please get the environment suitable for this OOo version!"+chr(13)+"This Environment only works with OOo " + sEnvironmentDisplayVersion + "!"
                 if MsgBox ("This environment '" + sEnvironmentVersion + sEnvironmentVersionMinor +"' is not suitable for this OOo version '" + left(gMajor,6) + gMinor + "'! Please get the environment suitable for this OOo version! This Environment only works with OOo " + sEnvironmentDisplayVersion + "!", 16, "Error at startup") = 1 then 
-		    end
-	        end if
-	    end if
-	end if
+                    end
+                end if
+            end if
+        end if
     end if
 end sub
 
@@ -477,10 +483,10 @@ sub hStartTheOffice (optional sProfPath as String, optional sProfParameter as St
             end if
             Kontext "TabFirstStartOnlineUpdate"
             if TabFirstStartOnlineUpdate.Exists(1) then
-	        try
-		    checkForUpdates.uncheck
-		catch
-		endcatch
+                try
+                    checkForUpdates.uncheck
+                catch
+                endcatch
                 Kontext "WelcomeDialog"
                 '///+<li>If the next tabpage will be visible clicking on 'Next'-button.</li>
                 NextBtn.Click
@@ -719,7 +725,7 @@ sub hFirstOutput
         printlog "**  Build type                    : CWS"
     end if
     if isStatusEnabled() then
-	'http://wiki.services.openoffice.org/wiki/QUASTe
+        'http://wiki.services.openoffice.org/wiki/QUASTe
         printlog "**  Status feature (QUASTe)       : Enabled " + gLocalStatusDatabase  
     end if
     printlog    "**  HID.LST based on milestone    : " + sHidVersion
@@ -895,7 +901,7 @@ sub mMakeGeneralOptionsAPI
         else
             gOOoImprovementIsEnabled = FALSE
         endif
-	    
+
         '///+<li>Setting the <i>work</i> directory in Tools / Options,
         sTempPath = ConvertPath (gOfficePath + "user\work")
         '///+<li>If the temp-path does not exist it will be created. 
@@ -1012,19 +1018,19 @@ sub hDetectStatusDatabase as Boolean
         if fileExists(sPrivateEnvironmentLocation) then
             gStatusFeatureLevel = getIniValue(sPrivateEnvironmentLocation, "StatusFeatureLevel", "Current")
         else
-	    ' manual submitting status from errorlog directory
+            ' manual submitting status from errorlog directory
             gStatusFeatureLevel = 2
         end if
     else
         gStatusFeatureLevel = sTemp
     end if
     if gStatusFeatureLevel = 0 then
-	' automatical submitting status; filespace location defined in privateenvironment.inc
+        ' automatical submitting status; filespace location defined in privateenvironment.inc
         hDetectStatusDatabase = TRUE
         gLocalStatusDatabase = ""
     else
         if gStatusFeatureLevel = 1 then
-	    ' automatical submitting status; filespace location defined in testtoolrc
+            ' automatical submitting status; filespace location defined in testtoolrc
             hDetectStatusDatabase = TRUE
             sOOoLocalStatusDatabase = GetIniValue ( gTesttoolIni, "OOoLocalStatusDatabase" , "Current" )
             if sOOoLocalStatusDatabase <> "" then
@@ -1084,28 +1090,28 @@ function hDisableQuickstarter as boolean
         ' if quickstart.exe exists, it might run, else no need to open options UI
         bVeto = fileExists(gNetzOfficePath + "program\quickstart.exe")
     else
-	if  (lcase(gPlatform) = "osx") then
-	    bVeto = FALSE
+        if  (lcase(gPlatform) = "osx") then
+            bVeto = FALSE
         else
             ' Not needed if StarOffice/Suite
-	    bVeto = gOOo
+            bVeto = gOOo
         end if
     end if
     bVeto = FALSE ' For now LibreOffice struggles with some hid/whatever mismatch here
     if bVeto then
-	    'First, disabling the Quickstarter via UI
-	    ToolsOptions
-	    call hToolsOptions ("STAROFFICE", "MEMORY")
-	    try        
-		bTemp = LoadQuickstarter.isChecked
-		if bTemp then
-		    LoadQuickstarter.uncheck                
-		end if                   
-	    catch
-		bResult = FALSE
-	    endcatch
-	    Kontext "ExtrasOptionenDlg"
-	    ExtrasOptionenDlg.OK
+            'First, disabling the Quickstarter via UI
+            ToolsOptions
+            call hToolsOptions ("STAROFFICE", "MEMORY")
+            try
+                bTemp = LoadQuickstarter.isChecked
+                if bTemp then
+                    LoadQuickstarter.uncheck
+                end if
+            catch
+                bResult = FALSE
+            endcatch
+            Kontext "ExtrasOptionenDlg"
+            ExtrasOptionenDlg.OK
     else
         bResult = FALSE
     end if
@@ -1215,3 +1221,26 @@ sub StartTheOffice
     gStartTheOffice = TRUE
 end sub
 
+function hSetSmallIconTheme as Boolean
+    ' Set default icon theme to small
+
+    Dim bResult as Boolean
+
+    bResult = FALSE
+
+    ToolsOptions
+
+    call hToolsOptions ("STAROFFICE", "View")
+    IconScale.Select(2)
+    ' Verify the icon scale has been set
+    If (IconScale.GetSelIndex = 2) Then
+        bResult = TRUE
+    End If
+
+    Kontext "ExtrasOptionenDlg"
+    ExtrasOptionenDlg.OK
+    Sleep (2)
+
+    hSetSmallIconTheme = bResult
+
+end function


More information about the Libreoffice-commits mailing list