diff options
Diffstat (limited to 'testautomation/graphics/optional/includes/global/g_spellcheck.inc')
-rw-r--r-- | testautomation/graphics/optional/includes/global/g_spellcheck.inc | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/testautomation/graphics/optional/includes/global/g_spellcheck.inc b/testautomation/graphics/optional/includes/global/g_spellcheck.inc index e1f02de039cc..bd9cf36bb814 100644 --- a/testautomation/graphics/optional/includes/global/g_spellcheck.inc +++ b/testautomation/graphics/optional/includes/global/g_spellcheck.inc @@ -100,6 +100,133 @@ testcase tiToolsSpellcheckCheck_AlwaysIgnore kill (convertPath(gOfficePath+"user/work/"+"recht_"+iSprache+sExt)) 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 + Kontext "ExtrasOptionenDlg" + printlog "Close the Option dialog." + ExtrasOptionenDlg.OK + + printlog "Close document" + Call hCloseDocument + + ' remove the word again from the dictionary + delete_word_from_dictionary(sWrongWord,"IgnoreAllList") + + kill (convertPath(gOfficePath+"user/work/"+"recht_"+iSprache+sExt)) +endcase 'tiToolsSpellcheckCorrect + '------------------------------------------------------------------------------- testcase tiToolsSpellcheckCheck_Change |