diff options
Diffstat (limited to 'testautomation/graphics/tools')
-rw-r--r-- | testautomation/graphics/tools/id_tools.inc | 78 | ||||
-rw-r--r-- | testautomation/graphics/tools/id_tools_2.inc | 258 |
2 files changed, 38 insertions, 298 deletions
diff --git a/testautomation/graphics/tools/id_tools.inc b/testautomation/graphics/tools/id_tools.inc index c774710c89fa..4f919dfe36fe 100644 --- a/testautomation/graphics/tools/id_tools.inc +++ b/testautomation/graphics/tools/id_tools.inc @@ -264,53 +264,47 @@ function fMakeDocumentWritable() as boolean printlog "Document is already writable." fMakeDocumentWritable = true endif - + sleep(1) end function '------------------------------------------------------------------------------- -function fGetSizeXY (sX as string, sY as string, bRetrieveOnly as boolean) as Boolean - - const RC_FAILURE = -1 - - dim sTx as string - dim sTy as string - - fGetSizeXY() = True - - if ( hUseAsyncSlot( "ContextPositionAndSize" ) <> RC_FAILURE ) then - - kontext - active.SetPage TabPositionAndSize - - kontext "TabPositionAndSize" - if ( TabPositionAndSize.exists( 2 ) ) then - sTx = Width.GetText() - sTy = Height.GetText() - hCloseDialog( TabPositionAndSize, "ok" ) - else - warnlog "Couldn't switch tab page :-( " - endif - - if ( bRetrieveOnly ) then ' Get the Values only - sY = sTy - sX = sTx - else ' Get the Values and compare them - if ( not LiberalMeasurement (sX,sTx) ) then - warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519" - fGetSizeXY() = False - endif - if (not LiberalMeasurement (sY,sTy) ) then - warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519" - fGetSizeXY() = False - endif - endif - else - warnlog( "Failed to open <Position And Size> dialog" ) - endif - +function fGetSizeXY (sX as string, sY as string, bGet as boolean) as Boolean + dim sTx as string + dim sTy as string + dim bReturn as boolean + + bReturn = True + try + ContextPositionAndSize + catch + warnlog "couldn't call 'ContextPositionAndSize' no object selected ?" + endcatch + kontext + active.SetPage TabPositionAndSize + kontext "TabPositionAndSize" + if TabPositionAndSize.exists (5) then + sTx = Width.GetText + sTy = Height.GetText + TabPositionAndSize.OK + else + warnlog "Couldn't switch tab page :-( " + endif + if bGet then ' Get the Values only + sY = sTy + sX = sTx + else ' Get the Values and COMPARE them + if (LiberalMeasurement (sX,sTx) <> TRUE) then + warnlog "width is different :-( should: '"+sX+"' is: '"+sTx+"'" + "eventually a result of i35519" + bReturn = False + endif + if (LiberalMeasurement (sY,sTy) <> TRUE) then + warnlog "hight is different :-( should: '"+sY+"' is: '"+sTy+"'" + "eventually a result of i35519" + bReturn = False + endif + bGet = bReturn + endif end function - '------------------------------------------------------------------------- function hCallExport ( cFileName as String , sFilter as String, optional bSelection as boolean ) as Boolean diff --git a/testautomation/graphics/tools/id_tools_2.inc b/testautomation/graphics/tools/id_tools_2.inc index 6c5ca705f8c4..60836bdb274a 100644 --- a/testautomation/graphics/tools/id_tools_2.inc +++ b/testautomation/graphics/tools/id_tools_2.inc @@ -181,56 +181,6 @@ sub sPrintCheckOrder (optional bcheck as boolean) Printlog "-----------------------------------" end sub -'--------------------------- Tests for Writer ---------------------------------- -sub writertest - - try - call Make_And_Check_Formatted_Text_Line_From_Application - catch - warnlog "Something went wrong with testing writertest" - endcatch - - try - call Make_Rectangle_From_Application - call Full_test_Draw - call Full_test_Impress - call Full_test_Writer - call Full_test_Calc - catch - warnlog "something wrong with testing writertest" - endcatch -end sub ' big one - -'---------------------------- Tests for Calc ----------------------------------- -sub calctest - - try - call Make_Rectangle_From_Application - call Full_test_Draw - call Full_test_Impress - call Full_test_Writer - call Full_test_Calc - catch - warnlog "something wrong with calctest" - endcatch - printlog "currently no specific tests from Calc" -end sub - -'------------------------------------------------------------------------------- -sub tClipboardFromDrawTest - - EnableQAErrors = false - FromApp2 = gApplication - printlog "gApplication = " + gApplication - - select case( gApplication ) - case "WRITER" : call writertest() - case "CALC" : call calctest() - case else : warnlog( "Unsupported gApplication provided: " & gApplication ) - end select - -end sub - '------------------------------------------------------------------------------- sub Select_Copy @@ -572,6 +522,7 @@ sub LoadGraphic ( sFile as String, bOK as Boolean ) as boolean Dim iHMax if app.FileLen(sFile) = "0" then warnlog " the file (" + (sFile) + ") seems to be zero bytes large." call hGrafikEinfuegen ( sFile ) + sleep (1) FormatGraphics Kontext Active.SetPage TabType @@ -620,212 +571,7 @@ sub GetOnlyGraphics ( OldList() as String, NewList() as String ) end if next i end sub - -'------------------------------------------------------------------------- -sub id_001 - - printLog Chr(13) + "--------- id_001 ----------" - - qaerrorlog "#74988# tiFilePassword outcommented due to bug. -FHA" - call tiFilePassword - call tiFileSaveAs - call tiFileReload - call tiFileVersion - printlog " File->Send not possible to test, because extrnal prg get's called!" - call tiFileTemplates - ' Call tiFileNew instead i call: - call tmFileNewFromTemplate - call tmFileOpen - call tmFileClose - call tmFileSave - call tmFileSaveAs - call tmFileExit - - call tmFileSaveAll - call tmFileProperties - call tdFileExport - call tmFilePrinterSetting - ' special cases - ' Call AutoPilot 'inc\desktop\autopilo.inc - call tmFileExit ' don't test because unpredictable behaviour -end sub - -'------------------------------------------------------------------------------ -sub id_002 - - printLog Chr(13) + "--------- id_002 ----------" - - call tiEditUndoRedo - call tiEditRepeat - call tiEditCutPasteCopySelectall - call tiEditPasteSpecial - call tiEditSearchAndReplace - call tiEditDuplicate - call tEditPoints - call tiEditFields - call tdEditDeleteSlide - call tiEditLinks - call tiEditImageMap - call tiEditObjectProperties - call tiEditObjectEdit - call tiEditPlugIn - call tiEditHyperlink -end sub - -'------------------------------------------------------------------------- -sub id_003 - - printLog Chr(13) + "--------- id_003 ----------" - - call tiViewNavigator - call tiViewZoom - call tiViewToolbar - Call tToolsCustomize 'global\required\include - call tiViewDisplayQuality - call tiViewLayer - call tViewSnapLines - call tViewGrid -end sub - -'------------------------------------------------------------------------- -sub id_004 - - printLog Chr(13) + "--------- id_004 ----------" - - call tiInsertSlide - call tiInsertDuplicateSlide - ' v expand slide - ' v summary slide - call tiInsertField - call tiInsertSpecialCharacter - call tiInsertHyperlink - call tiInsertScan - call tiInsertGraphic - call tiInsertObjectSound - call tiInsertObjectVideo - call tiInsertObjectSound - call tiInsertObjectVideo - call tiInsertChart - call tiInsertObjectOLEObjects - call tiInsertSpreadsheet - call tiInsertFormula - call tiInsertFloatingFrame - call tiInsertFile - call tiInsertPlugin - call tiInsertSnappointLine - call tdInsertLayer ' IMPRESS: Edit->Layer->Insert -end sub - -'------------------------------------------------------------------------------ -sub id_005 - - printLog Chr(13) + "--------- id_005 ----------" - - call tiFormatDefault - call tiFormatLine - call tdFormatArea - call tiFormatText - call tiFormatPositionAndSize - call tiFormatCharacter - call tiFormatControlForm - ' ^ Form - call tiFormatDimensions - call tiFormatConnector - call tiFormat3D_Effects - call tiFormatNumberingBullets - call tiFormatCaseCharacter - call tiFormatParagraph - call tiFormatPage - call tiFormatStylesAndFormatting - call tiFormatStylesSlideDesign - call tiFormatFontwork - call tiFormatGroup - printlog " format->group is also modify->group " - ' tiFormatLayer ' not in impress -end sub - -'------------------------------------------------------------------------------ -sub id_006 - - printLog Chr(13) + "--------- id_006 ----------" - - call tiToolsSpellchecking - call tiToolsSpellcheckingAutomatic - call tiToolsThesaurus - call tiToolsHyphenation - call tiToolsAutoCorrect - call tChineseTranslation - call tiToolsMacro - call tiToolsGallery - call tiToolsEyedropper - call tiToolsOptions ' get just called one time here... - Call tToolsOptionsTest ' global one -end sub - '------------------------------------------------------------------------------- -sub id_007 - - printLog Chr(13) + "--------- id_007 ----------" - ' in imp available via context menu, in draw via modify menu - - call tdModifyFlipVertikal - call tdModifyFlipHorizontal - call tdContextConvertIntoCurve - call tdContextConvertIntoPolygon - call tdContextConvertIntoContour - call tdContextConvertInto3D - call tdContextConvertIntoRotationObject - call tdContextConvertIntoBitmap - call tdContextConvertIntoMetaFile - call tdModifyArrange - call tdModifyArrangeObjects - call tdModifyAlignment - call tdContextDistribution - call tdContextDescriptionObject - call tdContextNameObject - call tdModifyConnectBreak - call tdModifyShapes - call tdModifyCombineSplit -end sub - -'------------------------------------------------------------------------------- -sub id_008 - - printLog Chr(13) + "--------- id_008 ----------" - - Call tiWindowNewWindow - call tidWindow123 -end sub - -'------------------------------------------------------------------------------ -sub id_009 - - printLog Chr(13) + "--------- id_009 ----------" - - call tCheckIfTheHelpExists - Call tmHelpContents - Call tmHelpHelpAgent - Call tmHelpTips - Call tmHelpExtendedTips - Call tmHelpAboutStarOffice - -end sub - -'------------------------------------------------------------------------------ -sub id_011 - - printLog Chr(13) + "--------- id_011 ----------" - - call tdBezierToolbar - call tiDrawObjectBar - call tiTextToolbar - call tiGraphicsObjectBar - call tiGluepointToolbar - -end sub - -'-------------------------------------------------------------------------------' - sub hWalkTheStyles (optional a as integer,optional b as integer) dim i as integer @@ -991,4 +737,4 @@ sub sSelectEmptyLayout else printlog "No change of Layout needed." endif -end sub
\ No newline at end of file +end sub |