diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-09-28 16:59:46 +0200 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-09-28 16:59:46 +0200 |
commit | 78df694e68b567965111e9446711aab1be6300ed (patch) | |
tree | eb1fccc30e62870669e837b8c7090aa0cf0a241c /testautomation/graphics | |
parent | 78f4c0b79d80cae6561dd919571d1f9eead2f4bc (diff) | |
parent | 11c892b46764590938f73a42862eb50b99438d9c (diff) |
#i10000# changes from OOO330 m9
Diffstat (limited to 'testautomation/graphics')
6 files changed, 215 insertions, 45 deletions
diff --git a/testautomation/graphics/optional/includes/global/g_demoguide.inc b/testautomation/graphics/optional/includes/global/g_demoguide.inc index 54a3a67c58d0..d733c878aeb4 100644 --- a/testautomation/graphics/optional/includes/global/g_demoguide.inc +++ b/testautomation/graphics/optional/includes/global/g_demoguide.inc @@ -247,7 +247,8 @@ testcase t_Interoperability MenuSelect(MenuGetItemID(3)) View.OpenMenu MenuSelect(MenuGetItemID(2)) - sleep 2 + printlog "needing a longer wait here for first start of the master page previews" + wait(20000) Kontext "AvailableForUsePreview" AvailableForUsePreview.TypeKeys "<HOME> <RIGHT> <RETURN>" sleep (5) diff --git a/testautomation/graphics/optional/includes/global/g_spellcheck.inc b/testautomation/graphics/optional/includes/global/g_spellcheck.inc index 7f0993d09df5..f46c75f3e497 100644 --- a/testautomation/graphics/optional/includes/global/g_spellcheck.inc +++ b/testautomation/graphics/optional/includes/global/g_spellcheck.inc @@ -84,6 +84,165 @@ testcase tiToolsSpellcheckCheck_AlwaysIgnore else printlog " added word is in dictionary: '" + Buch.getSelText + "'" end if + sleep 2 + + PrintLog "- Spellcheck with correct text" + select case iSprache + case 01 : hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20) + case 33 : hTextrahmenErstellen ("Il nous faut donc un de temps pour examiner avec soin tous les dossiers.<Return>",10,10,70,20) + case 34 : hTextrahmenErstellen ("Este es un chico muy importante.",10,10,50,20) + case 36 : hTextrahmenErstellen ("akit a b�r�s�g vagy a szab�lys�rt�si hat�s�g a eltiltott",10,10,70,20) + case 39 : hTextrahmenErstellen ("La ringraziamo per l'interesse mostrato a collaborare con la firma.<Return>",10,10,70,20) + case 46 : hTextrahmenErstellen ("Det varierar vad som behandlas och ur vilket perspektiv.<Return>",10,10,50,20) + case 49 : hTextrahmenErstellen ("Dies ist ein Text ohne Fehler.<Return>",10,10,50,20) + case 50 : hTextrahmenErstellen ("To je besedilo brez napake.<Return>",10,10,50,20) + case 55 : hTextrahmenErstellen ("Esta poderia ser a resposta para suas preces?<Return>",10,10,50,20) + case else : + if bAsianLan then + printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-) will use english instaed" + ' there was smth wrong, try to find out : + kontext + if active.exists then + printlog "ERROR: active: '"+active.gettext+"'" + active.ok + end if + hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20) + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" + hTextrahmenErstellen ("This is a text without any error.<Return>",10,10,50,20) + end if + end select + ToolsSpellcheck + WaitSlot (2000) + Kontext "Active" + if active.exists(5) then + printlog "Message: spellchecking has finished?: '" + active.gettext + "'" + Active.OK + else + errorLog "Spellcheck started :" + Kontext "Spellcheck" + if Spellcheck.exists then + errorlog " - spellcheck came up and will be closed now" + Spellcheck.Close + else + printlog "spellcheck didn't come up" + end if + end if + WaitSlot (2000) + Call hCloseDocument +endcase 'tiToolsSpellcheckCorrect + +'------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +testcase tiToolsSpellcheckError + if iSprache = 48 then + qaerrorlog "This test is not adapted for polish, 48." + got endsub + endif + Dim Fehler$ + Dim Sprachenname$ + Dim Dummy$ + Dim FehlerText$ + Dim i as integer + + printlog "New document" + Call hNewDocument + printlog "Selecting language case: " & iSprache + select case iSprache + case 01 : FehlerText$ = "Thatt is a failure test." : Fehler$ = "Thatt" : Sprachenname$ = "English (US)" + case 34 : FehlerText$ = "Ezte es un chico muy importante." : Fehler$ = "Ezte" : Sprachenname$ = "Niederlaendisch" + case 33 : FehlerText$ = "Ler nous faut donc un de temps pour examiner." : Fehler$ = "Ler" : Sprachenname$ = "Franzoesisch" + case 36 : FehlerText$ = "Boszniai americkai kontingens háromnegyedesek – mintegy négyezer katona – magyarországi telepítése egy éven belül megtörténhet" : Fehler$ = "tellepítésel" : Sprachenname$ = "Ungarisch" + case 39 : FehlerText$ = "Ringrarziamo per l'interessa mostrato a collaborare con la firma." : Fehler$ = "Ringrarziamo" : Sprachenname$ = "Italienisch" + case 46 : FehlerText$ = "Detd varierar vad som behandlas och ur vilket perspektiv." : Fehler$ = "Detd" : Sprachenname$ = "Schwedisch" + case 49 : FehlerText$ = "Diees ist ein Fehler." : Fehler$ = "Diees" : Sprachenname$ = "Deutsch" + case 50 : FehlerText$ = "Toje napaka, ker manjka presledek." : Fehler$ = "Toje" : Sprachenname$ = "Slovenš?ina" + case 55 : FehlerText$ = "Eesta poderia ser a resposta para suas preces?": Fehler$ = "Eesta" : Sprachenname$ = "Portugiesisch" + case else : + if bAsianLan then + printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-) using english" + FehlerText$ = "Thatt is a failure test." + Fehler$ = "Thatt" + Sprachenname$ = "English (US)" + call hSetSpellHypLanguage + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" + end if + end select + printlog "Error Text taken for testing is: " & FehlerText$ + sleep 2 + + printlog "Delete ignore word list" + if (not wIgnorierenlisteLoeschen) then + qaErrorLog "Can't get into Dictionary lists" + goto endsub + end if + printlog "Setting doc language to english" + ToolsOptions + Kontext "ExtrasOptionenDlg" + hToolsOptions("LANGUAGESETTINGS","Languages") + Westlich.Select 34 + Kontext "ExtrasOptionenDlg" + ExtrasOptionenDlg.OK + printlog "Create 1 textbox with 1 spelling error (test replace always)" + hTextrahmenErstellen (FehlerText$,30,30,90,40) + + hTypeKeys "<HOME>" + printlog "Call 'Tools->Spellcheck->Check'" + ToolsSpellcheck + printlog "Spellcheck dialog has to come up, wrong word is selected." + Kontext "Spellcheck" + if Spellcheck.Exists then + printlog "There has to be at least ONE suggestion." + if (Suggestions.GetItemCount < 1) then + printlog "If no suggestion avilable:" + warnlog " - no suggestion for the language: "+DictionaryLanguage.GetSelIndex+" '"+DictionaryLanguage.GetSelText+"' , press check button..." + printlog "+ press button 'Check word'" + Pruefen.click + if (Suggestions.GetItemCount < 1) then + warnlog " STILL no suggestions :-( errors will follow " + else + printlog " - now suggestion for the language: "+DictionaryLanguage.GetSelIndex+" '"+DictionaryLanguage.GetSelText+"'" + Suggestions.GetItemCount + end if + end if + Dummy$=Suggestions.GetItemText (1) + printlog "Select first spellcheck suggestion (click it!)." + Suggestions.Select (1) + printlog "Check if textfield 'word' has changed to selected word." + if (Suggestions.GetSelText <> Dummy$) Then + Warnlog "Suggestion not used" + else + Printlog "Suggestion is used" + end if + sleep 1 + kontext "Spellcheck" + printlog "click button 'Always replace'" + ChangeAll.Click + printlog "spellcheck dialog has to disappear and" + printlog "There has to come up only one active: 'Spellcheck of entire document has been completed [OK]'" + Kontext "Active" + if Active.Exists(5) then + Printlog "Message: Spellchecking has finished?: '" + active.gettext + "'" + Active.OK + else + Printlog "'Change All' seems to have worked correctly." + Kontext "Spellcheck" + Spellcheck.Close + Kontext "Active" + if active.exists(5) then + Printlog "Spellcheck dialog closed'" + active.gettext + "'" + Active.OK + else + Printlog "Spellcheck dialog closed'" + end if + end if + else + Warnlog " Error not recognized by the Spellchecker" + if active.exists(5) then + Kontext "Active" + printlog "Message: spellchecking has finished?: '" + active.gettext + "'" + Active.OK + end if + end if printlog "Close dialog 'Edit Custom Dictionary'." BenutzerwoerterbuchBearbeiten.Close @@ -173,8 +332,6 @@ endcase '------------------------------------------------------------------------------- testcase tiToolsSpellcheckCheck_ChangeAll - - Dim sExt as string Dim sRightWord as String Dim sWrongWord as string @@ -218,11 +375,6 @@ testcase tiToolsSpellcheckCheck_ChangeAll Call hCloseDocument endcase - - - - - '------------------------------------------------------------------------------- function delete_all_added_words(aWords) @@ -232,7 +384,44 @@ function delete_all_added_words(aWords) Dim iWordCounter as integer Dim iBooks as integer - Printlog "Delete the given words from dictionaries." + Select Case Ucase(gApplication) + case "DRAW" : sExt = ".odg" + case "IMPRESS" : sExt = ".odp" + end select + + printlog "Load prepared document containing 4 errors : graphics\\required\\input\\recht_" & iSprache & sExt + if (not bAsianLan) then + printlog "Check if the document is writable." + Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_"+iSprache+sExt) + else + Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_1"+sExt) + end if + if fIsDocumentWritable = false then + printlog "Make the document writable and check if it's succesfull." + if fMakeDocumentWritable = false then + warnlog "The document can't be make writeable. Test stopped." + goto endsub + end if + end if + select case iSprache ' sWord(1)=red : sWord(2)=turquoise + case 01 : sWord(1) = "documente" : sWord(2) = "expriss" + case 33 : sWord(1) = "intercu" : sWord(2) = "Lees" + case 34 : sWord(1) = "afekto" : sWord(2) = "fratternal" + case 36 : sWord(1) = "szeerint" : sWord(2) = "tervvezi" + case 39 : sWord(1) = "Millano" : sWord(2) = "tarrget" + case 46 : sWord(1) = "desa" : sWord(2) = "occh" + case 49 : sWord(1) = "Texxt" : sWord(2) = "reichtt" + case 50 : sWord(1) = "Bsedilo" : sWord(2) = "zados?a" + case 55 : sWord(1) = "esktava" : sWord(2) = "noitee" + case else : + if bAsianLan then + sWord(1) = "documente" : sWord(2) = "expriss" + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here and create the file" + end if + end select + sleep 2 + printlog "Call Tools->Options." ToolsOptions printlog "Select in category 'Languagesettings' entry 'Writing Aids.'" diff --git a/testautomation/graphics/optional/includes/global/g_tables.inc b/testautomation/graphics/optional/includes/global/g_tables.inc index 94a76349e948..410ed8ca0fc6 100644 --- a/testautomation/graphics/optional/includes/global/g_tables.inc +++ b/testautomation/graphics/optional/includes/global/g_tables.inc @@ -218,8 +218,12 @@ testcase tiTableObjectBar Kontext "InsertTableImpress" printlog "Inserting table." - InsertTableImpress.OK - + if InsertTableImpress.Exists(1) then + InsertTableImpress.OK + else + sleep (1) + InsertTableImpress.OK + endif printlog "Selecting table for geeting the TableObjectBar." printlog "Switching between Draw/Impress" if ( gApplication = "IMPRESS" )then diff --git a/testautomation/graphics/optional/includes/global/g_tools.inc b/testautomation/graphics/optional/includes/global/g_tools.inc index c54881a0b68e..04fc0b92d4b2 100644 --- a/testautomation/graphics/optional/includes/global/g_tools.inc +++ b/testautomation/graphics/optional/includes/global/g_tools.inc @@ -280,16 +280,7 @@ testcase tiToolsThesaurusContextMenu PrintLog "Thesaurus with 1 word: " + sWord - if( Ucase(gApplication) = "DRAW" ) then - sExt = ".odg" - Kontext "DrawDocument" - elseif( Ucase(gApplication) = "IMPRESS" ) then - sExt = ".odp" - Kontext "ImpressDocument" - endif - - Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt) - Call sMakeReadOnlyDocumentEditable + Call hNewDocument Call hTextrahmenErstellen (sWord,20,20,50,30) sleep 1 @@ -349,7 +340,7 @@ testcase tiToolsHyphenation1 case 46 : hTextrahmenErstellen ("Detta är en text utan delade ord",10,10,40,40) case 48 : hTextrahmenErstellen (" Jeoli jednak zechcesz",10,10,40,40) case 49 : hTextrahmenErstellen ("Dies ist ein Text ohne eine Moeglichkeit Woerter zu trennen",10,10,40,40) - case 50 : hTextrahmenErstellen ("Zato ves čas iščemo nove člane: sodelujte",10,10,40,40) + case 50 : hTextrahmenErstellen ("Zato ves ?as iš?emo nove ?lane: sodelujte",10,10,40,40) case 55 : hTextrahmenErstellen ("a Sun tentou adquirir a Apple",10,10,40,40) case else : if bAsianLan then printlog "For the language " + iSprache +" nothing is prepared yet, but is AsianLan, so OK :-)" diff --git a/testautomation/graphics/optional/includes/impress/i_us_present.inc b/testautomation/graphics/optional/includes/impress/i_us_present.inc index 41ccd13660d5..599f89abe4f1 100644 --- a/testautomation/graphics/optional/includes/impress/i_us_present.inc +++ b/testautomation/graphics/optional/includes/impress/i_us_present.inc @@ -52,13 +52,12 @@ testcase i_us_presentation1 printlog "New master" MenuSelect(MenuGetItemID(1)) sleep (1) - printlog " Inserted second Master-Slide" - + printlog "Inserted second Master-Slide" printlog "set background to picture(Gallery)" Kontext "Gallery" if Gallery.Exists(2) then - warnlog " The Gallery was already visible. Check earlier ran tests for inconsistency." + warnlog "The Gallery was already visible. Check earlier ran tests for inconsistency." sleep (2) else ToolsGallery @@ -112,7 +111,7 @@ testcase i_us_presentation1 sleep (2) Kontext "ExportierenDlg" if ExportierenDlg.IsVisible(5) then - printlog " Gallery-object correctly copied into Slide." + printlog "Gallery-object correctly copied into Slide." ExportierenDlg.Close WaitSlot (2000) end if @@ -134,15 +133,6 @@ testcase i_us_presentation1 sleep (1) kontext "GraphicFilterBar" Mosaic.Click - WaitSlot (2000) - kontext "Mosaic" - Width.SetText "16" - Height.SetText "16" - Mosaic.OK - - kontext "GraphicFilterBar" - Mosaic.Click - kontext "Mosaic" if ( Mosaic.exists( 2 ) ) then Width.SetText "16" @@ -151,25 +141,21 @@ testcase i_us_presentation1 else warnlog( "Dialog <Mosaic> did not open" ) endif - kontext "GraphicFilterBar" GraphicFilterBar.Close - ToolsGallery WaitSlot (1000) - kontext "DocumentImpress" gMouseClick 50,50 sleep (1) - FormatPositionAndSize kontext if ( Active.exists( 2 ) ) then active.setPage(TabPositionAndSize) kontext "TabPositionAndSize" - Width.SetText "800" - Height.SetText "600" + Width.SetText "15" + Height.SetText "11" SizePosition.TypeKeys "<RIGHT><DOWN>" TabPositionAndSize.OK else @@ -199,13 +185,13 @@ testcase i_us_presentation2 PresentationFile1 = ConvertPath( gOfficePath + "user\work\PowerPes1.odp" ) PresentationFile2 = ConvertPath( gOfficePath + "user\work\PowerPes2.odp" ) - if ( FileExists( PresentationFile1 ) ) then 'if file exists... + if ( FileExists( PresentationFile1 ) ) then 'if file exists... hFileOpen (PresentationFile1) else warnlog " This test is supposed to run after the previous testcase has been run. Notify the Automatic-tester." goto endsub end if - + sleep (2) printlog "New Slide" kontext "slides" SlidesControl.TypeKeys( "<PAGEDOWN>", 3 ) @@ -235,7 +221,6 @@ testcase i_us_presentation2 printlog " Did the 'mistake' to FadeIn/Out the Slidepane" - InsertGraphicsFromFile Kontext "GrafikEinfuegenDlg" if GrafikEinfuegenDlg.exists(5) then @@ -245,7 +230,6 @@ else warnlog " The Insertgraphics-dialogue didn't show up." endif - printlog "Graphics-Import-dialogue. Select i_us_large.jpg" Kontext "GrafikEinfuegenDlg" if ( GrafikEinfuegenDlg.exists( 2 ) ) then diff --git a/testautomation/graphics/required/includes/global/id_002.inc b/testautomation/graphics/required/includes/global/id_002.inc index 8f4e7cf1bffc..0b2a91818cda 100644 --- a/testautomation/graphics/required/includes/global/id_002.inc +++ b/testautomation/graphics/required/includes/global/id_002.inc @@ -225,6 +225,7 @@ testcase tiEditFields printlog " open application " Call hNewDocument WaitSlot (2000) + call sSelectEmptyLayout() printlog " insert something to be able to use this function" printlog "+ Insert->Fields->Date (fixed)" printlog "+ deselect object, select, editmode " |