Anonymous avatar Anonymous committed 3b0b54b

printerpullpages: Removed warnings and errors from update test g_printing.

Comments (0)

Files changed (2)

testautomation/global/required/includes/g_printing.inc

                 warnlog( "Pages setting disabled" )
             endif
             
-            Selection.check()
-            AllPages.check()
+            'Selection.check()
+            'AllPages.check()
             
         case "CALC"
         
         case "WRITER", "HTML", "MASTERDOCUMENT"
         
             cb_test( PrintPageBackground, true, "" )
-            cb_test( PrintGraphicsAndDiagrams, true, "" )
+            'cb_test( PrintGraphicsAndDiagrams, true, "" )
+            cb_test( PrintPicturesAndObjects, true, "" )
             cb_test( PrintTextInBlack, false, "" )
             cb_test( PrintBlankPages, true, "" )
 
     
     kontext "Printing"
     if ( Printing.exists( 2 ) ) then
-    
-        PrintingTabControl.setPage( TabLayout )
+
+        ' Math does not have a layout page as it does not have any layout options
+        if ( gApplication <> "MATH" ) then    
         
-        kontext "TabLayout"
-        call DialogTest( TabLayout )
-        
-        printlog( "Controls common for all applications" )
-        if ( NOT PagesPerSheet.isChecked() ) then
-            warnlog( MSG1 & "<Pages per sheet> should be selected" )
-        endif
+            PrintingTabControl.setPage( TabLayout )
+            
+            kontext "TabLayout"
+            call DialogTest( TabLayout )
+            
+            printlog( "Controls common for (almost) all applications" )
+            if ( gApplication <> "CALC" ) then
+                if ( NOT PagesPerSheet.isChecked()) then
+                    warnlog( MSG1 & "<Pages per sheet> should be selected" )
+                endif
 
-        lb_test( NumberOfPages, 7, 1, "" )
-        NumberOfPages.select( 7 )
-       
-        if ( NumberOfColumns.getText() <> "1" ) then
-            warnlog( MSG1 & "<Pages> has incorrect default: " & NumberOfColumns.getText() )
-        endif
-        
-        if ( NumberOfRows.getText() <> "1" ) then
-            warnlog( MSG1 & "<by> has incorrect default: " & NumberOfRows.getText() )
-        endif
-        
-        NumberOfColumns.typeKeys( "<UP>" )
-        NumberOfRows.typeKeys( "<UP>" )
-        DistanceBetweenPages.typeKeys( "<UP>" )
-        MarginToSheetBorder.typeKeys( "<UP>" )
-        
-        lb_test( PaperOrientation, 3, 1, "" )
-        lb_test( PrintOrder, 2, 1, "" )
-        cb_test( BorderAroundPages, false, "" )
-        
-        select case( gApplication )
-        case "WRITER", "HTML", "MASTERDOCUMENT"
-
-            if ( NOT PrintBrochureRTL.isEnabled() ) then
-                warnlog( "<Brochure> listbox should be enabled" )
+                lb_test( NumberOfPages, 7, 1, "" )
+                NumberOfPages.select( 7 )
+               
+                if ( NumberOfColumns.getText() <> "1" ) then
+                    warnlog( MSG1 & "<Pages> has incorrect default: " & NumberOfColumns.getText() )
+                endif
+                
+                if ( NumberOfRows.getText() <> "1" ) then
+                    warnlog( MSG1 & "<by> has incorrect default: " & NumberOfRows.getText() )
+                endif
+                
+                NumberOfColumns.typeKeys( "<UP>" )
+                NumberOfRows.typeKeys( "<UP>" )
+                DistanceBetweenPages.typeKeys( "<UP>" )
+                MarginToSheetBorder.typeKeys( "<UP>" )
+            
+                lb_test( PaperOrientation, 3, 1, "" )
+            else
+                if ( PagesPerSheet.isVisible() ) then
+                    warnlog( "<Pages per Sheet> should not be visible for spreadsheet documents" )
+                endif
             endif
             
-            Brochure.check()
+            lb_test( PrintOrder, 2, 1, "" )
+            cb_test( BorderAroundPages, false, "" )
             
-            lb_test( PrintBrochureRTL, 2, 1, "#i105265#" )
-        
-        case "CALC"
-        
-            printlog( "Calc does not have any options in this section" )
+            select case( gApplication )
+            case "WRITER", "HTML", "MASTERDOCUMENT"
+
+                'if ( NOT PrintBrochureRTL.isEnabled() ) then
+                '    warnlog( "<Brochure> listbox should be enabled" )
+                'endif
+                
+                Brochure.check()
+                
+                'lb_test( PrintBrochureRTL, 2, 1, "#i105265#" )
             
-        case "IMPRESS", "DRAW"
+            case "CALC"
+            
+                printlog( "Calc does not have any options in this section" )
+                
+            case "IMPRESS", "DRAW"
 
-            if ( Not BrochurePageSides.isEnabled() ) then
-                warnlog( "#i106426# <Page sides> listbox should be enabled" )
-            endif
-            Brochure.check()
-            lb_test( BrochurePageSides, 3, 1, "" )
+                if ( BrochurePageSides.isEnabled() ) then
+                    warnlog( "<Page sides> listbox should be disabled" )
+                endif
+                Brochure.check()
+                lb_test( BrochurePageSides, 3, 1, "" )
 
-        case "MATH"
-        
-            printlog( "Math does not have any options in the section" )
+            case default
             
-        case default
-        
-            warnlog( "Invalid gApplication: " & gApplication )
+                warnlog( "Invalid gApplication: " & gApplication )
+                
+            end select
             
-        end select
+        else ' What we do if gApplication = MATH
+            try
+                PrintingTabControl.setPage( TabLayout )
+                warnlog( "Math should not have a layout page as no layout options exist" )
+            catch
+                printlog( "Math has no layout page. Good." )
+            endcatch
+        endif
         
         kontext "Printing"
         printlog( "Close print dialog" )
 
         case "CALC", "MATH"
         
-            printlog( "Calc and Math do not have any options in this section" )
+            printlog( "Calc does not have any program specific options." )
             
         case default
         
     endif
     
     printlog( "Close document" )
-    hDestroyDocument()        
+    hDestroyDocument()
             
 endcase
 

testautomation/global/win/edia_p_s.win

 *TabApplication .HelpId:vcl:PrintDialog:TabPage:10
 PrintPageBackground .HelpId:vcl:PrintDialog:PrintPageBackground:CheckBox
 PrintGraphicsAndDiagrams .HelpId:vcl:PrintDialog:PrintTablesGraphicsAndDiagrams:CheckBox
+PrintPicturesAndObjects .HelpId:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox
 PrintHiddenText .HelpId:vcl:PrintDialog:PrintHiddenText:CheckBox
 PrintTextPlaceholder .HelpId:vcl:PrintDialog:PrintTextPlaceholder:CheckBox
 PrintFormControls .HelpId:vcl:PrintDialog:PrintControls:CheckBox
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.