diff options
Diffstat (limited to 'testautomation/math/required')
-rwxr-xr-x | testautomation/math/required/includes/m_001_.inc | 687 | ||||
-rwxr-xr-x | testautomation/math/required/includes/m_002_.inc | 132 | ||||
-rwxr-xr-x | testautomation/math/required/includes/m_003_.inc | 177 | ||||
-rwxr-xr-x | testautomation/math/required/includes/m_004_.inc | 286 | ||||
-rwxr-xr-x | testautomation/math/required/includes/m_005_.inc | 313 | ||||
-rwxr-xr-x | testautomation/math/required/includes/m_006_.inc | 53 | ||||
-rwxr-xr-x | testautomation/math/required/includes/m_007_.inc | 274 | ||||
-rwxr-xr-x | testautomation/math/required/includes/m_010_.inc | 670 | ||||
-rwxr-xr-x | testautomation/math/required/includes/m_020_.inc | 72 | ||||
-rwxr-xr-x | testautomation/math/required/input/ShortLicense.oxt | bin | 0 -> 9406 bytes | |||
-rw-r--r-- | testautomation/math/required/input/test.odt | bin | 0 -> 6725 bytes | |||
-rwxr-xr-x | testautomation/math/required/input/unknown-dependency.oxt | bin | 0 -> 1633 bytes | |||
-rwxr-xr-x | testautomation/math/required/m_updt.bas | 81 |
13 files changed, 2745 insertions, 0 deletions
diff --git a/testautomation/math/required/includes/m_001_.inc b/testautomation/math/required/includes/m_001_.inc new file mode 100755 index 000000000000..7ddffee84d29 --- /dev/null +++ b/testautomation/math/required/includes/m_001_.inc @@ -0,0 +1,687 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* Owner : thorsten.bosbach@oracle.com +'* +'* short description : +'* +'\***************************************************************** + +global cActFilter as string ' used filter for save +Const cActFilterExt = ".odf" ' used filter for save (extension) + +' "StarMath 5.0" ".smf" +' Datei$ = convertpath( gOfficePath + "user\work\killme" + cActFilterExt) +' Datei$ = convertpath( gOfficePath + "user\work\Erwin2"+cActFilterExt) +' Datei = convertpath(gofficepath + "user\work\test"+cActFilterExt) + +sub M_001_ + Printlog Chr(13) + "-- File Menu m_001_ --" + + cActFilter = gMathFilter + + Call tmFileNew + Call tmFileOpen + ' Call Autopilot 'in Inc\desktop\autopilo.inc + Call tmFileClose + Call tmFileSave + Call tmFileSaveAs + Call tmFileSaveAll + Call tmFileReload + Call tmFileVersions + Call tmExportAsPDF + Call tExportAsPDFButton + Call tmFileProperties + Call tmFilePrinterSetting + Call tmFilePassword +end sub + +testcase tmFileNew + '/// open application ///' + Call hNewDocument + '/// File->New->Templates and Documents ///' + FileNewFromTemplate + sleep 3 + Kontext "TemplateAndDocuments" + if TemplateAndDocuments.exists (5) then + try + '/// klick button 'Organize' ///' + Organize.click + kontext "DVVerwalten" + if DVVerwalten.exists (5) then + Call DialogTest (DVVerwalten) + sleep 1 + '/// close dialog 'Template Management' ///' + DVVerwalten.close + else + warnlog "DVVerwalten didn't exist :-(" + endif + catch + warnlog "error ;-) - 1" + endcatch + else + warnlog "templates and dokuments didn't exist :-(" + endif + try + sleep 1 + kontext "TemplateAndDocuments" + sleep 1 + Call DialogTest ( TemplateAndDocuments ) + catch + warnlog "no dialogtest possibele :-(" + endcatch + + ' TBO i don't get in deep here, because it is not math specific + ' and IMHO it doesn't make that sense here! + ' should be enoug in writer... + '/// close dialog 'Templates and Documents' ///' + TemplateAndDocuments.Cancel + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmFilePassword + + Dim DokumentPfad$ + Dim Datei$ + '/// open application ///' + hFileCloseAll() + hNewDocument + '/// type a formula ///' + SchreibenInMathdok "a over b" : WaitSlot() + + printlog "'/// - save doc as "+cActFilter+" with passwd - ///'" + hUseAsyncSlot( "FileSaveAs" ) + + Kontext "SpeichernDlg" + if ( SpeichernDlg.exists( 2 ) ) then + Datei$ = convertpath( gOfficePath + "user\work\killme" + cActFilterExt) + hDeleteFile( Datei$ ) + + printlog " Testfile: "+Datei$ + Passwort.Check + Dateiname.SetText Datei$ + Speichern.Click + Kontext "Active" + if Active.Exists (5) then + ' TBO: ??? what will be ??! + Printlog "(1/5) " + Active.GetText + hCloseDialog( Active, "yes" ) + end if + else + warnlog( "File Save As dialog did not open" ) + endif + + printlog "'/// Try wrong passwd confirmation ///'" + Kontext "PasswordFileSave" + if ( PasswordFileSave.exists( 2 ) ) then + Password.SetText "12345" + PasswordConfirm.Settext "54321" + hCloseDialog( PasswordFileSave, "ok" ) + else + warnlog( "Password dialog on File Save is missing" ) + endif + + Kontext + if ( Active.Exists ( 5 ) ) then + Printlog "(2/5) " + Active.GetText + hCloseDialog( Active, "ok" ) + else + Warnlog "Wrong passwordinput not detected" + end if + + printlog "'/// Now do it right ///'" + Kontext "PasswordFileSave" + if ( PasswordFileSave.exists( 3 ) ) then + Password.SetText "12345" + PasswordConfirm.Settext "12345" + hCloseDialog( PasswordFileSave, "ok" ) + else + warnlog( "Password dialog on File Save is missing" ) + endif + + printlog "'/// Gotcha & Close file/window ///'" + hUseAsyncSlot( "FileClose" ) + + printlog "'/// load again with wrong passwd ///'" + Call hFileOpen( Datei$ ) + + Kontext "PasswordFileOpen" + if ( PasswordFileOpen.exists( 3 ) ) then + Passwortname.SetText "34567" + hCloseDialog( PasswordFileOpen, "ok" ) + else + warnlog( "Password dialog on File Open is missing" ) + endif + + Kontext "Active" + if Active.Exists(5) then + Printlog "(3/5) " + Active.GetText + Active.Ok + else + Warnlog "Wrong passwordinput not detected by loading the document" + end if + + printlog "'///load now with right passwd ///'" + Kontext "PasswordFileOpen" + if ( PasswordFileOpen.exists( 3 ) ) then + Passwortname.SetText "12345" + hCloseDialog( PasswordFileOpen, "ok" ) + else + warnlog( "Password dialog on File Open is missing" ) + endif + + printlog "'/// - save doc with new name under 6.... (has to be automagical selected by loading this doc!) w/o passwd - ///'" + Datei$ = convertpath( gOfficePath + "user\work\Erwin2"+cActFilterExt) + hDeleteFile( Datei$ ) + + hUseAsyncSlot( "FileSaveAs" ) + + Kontext "SpeichernDlg" + if ( SpeichernDlg.exists( 2 ) ) then + Dateiname.SetText Datei$ + if (Passwort.IsChecked <> TRUE) then + Warnlog "#i36015# Password has to be checked! :-(" + Passwort.Check + printlog "will be forced checked no!" + endif + Speichern.Click + else + warnlog( "File Save dialog is missing" ) + endif + + Kontext "Messagebox" + '/// (if messagebox comes up, say YES) ///' + if Messagebox.Exists(2) then + Messagebox.Yes + endif + '/// password dialog has to show up! ///' + Kontext "PasswordFileSave" + if ( PasswordFileSave.exists( 2 ) ) then + '/// type password "a12345", confirm password: "a12345" -> RIGHT ///' + Password.SetText "a12345" + PasswordConfirm.SetText "a12345" + hCloseDialog( PasswordFileSave, "ok" ) + else + warnlog( "Password dialog on FileSave is missing" ) + endif + '/// close document ///' + hUseAsyncSlot( "FileClose" ) + '/// open document ///' + hUseAsyncSlot( "FileOpen" ) + + Kontext "OeffnenDlg" + if ( OeffnenDlg.exists( 2 ) ) then + Dateiname.SetText Datei$ + Oeffnen.Click + Kontext "PasswordFileOpen" + if ( PasswordFileOpen.exists( 2 ) ) then + '/// type password: "a12345" -> RIGHT ///' + PasswortName.SetText "a12345" + hCloseDialog( PasswordFileOpen, "ok" ) + else + warnlog( "Password dialog on FileOpen is missing" ) + endif + else + warnlog( "Failed to open File Open dialog" ) + endif + +'/// File->SaveAs ///' + hUseAsyncSlot( "FileSaveAs" ) + Kontext "SpeichernDlg" + Dateiname.SetText Datei$ + if (Passwort.IsChecked <> TRUE) then + Warnlog "#i36015# Password has to be checked! :-(" + Passwort.Check + printlog "will be forced checked no!" + endif + Passwort.UnCheck + '/// press 'save', without changing any checkbox! -> file has to be saved WITH password protection ///' + Speichern.Click + Kontext "Messagebox" + '/// (if messagebox comes up, say YES) ///' + if Messagebox.Exists(2) then Messagebox.Yes + '/// password dialog needn't to show up! ///' + Kontext "PasswordFileSave" + if (PasswordFileSave.Exists(5))then + Warnlog "- Password dialog neeedn't popped up after pressing save" + Kontext "PasswordFileSave" + hCloseDialog( passwordFileSave, "cancel" ) + '/// close document ///' + hUseAsyncSlot( "FileClose" ) + else + '/// close document ///' + hCloseDocument + end if +endcase + +testcase tmFileReload + Dim Datei as String + dim sFilterName as string + dim sFilter as string + dim sFilterExt() as string + + Datei = convertpath(gofficepath + "user\work\test"+cActFilterExt) + hDeleteFile( Datei ) + + ' make sure saving in latest math filter works, checking global filtername and if necessary change it + sFilter = hGetUIFiltername("math8") + + '/// open application ///' + hNewDocument + '/// type a formula ///' + call SchreibenInMathdok "a over b" + '/// File->Save As ///' + hUseAsyncSlot( "FileSaveAs" ) + Kontext "SpeichernDlg" + if ( SpeichernDlg.exists( 2 ) ) then + '/// select the actual default file format ///' + Dateityp.Select (hFindFilterPosition( sFilter )) + '/// type a file name ///' + Dateiname.SetText Datei + '/// click button 'save' ///' + Speichern.Click + Kontext "Active" + + if Active.Exists(2) then hCloseDialog( Active, "yes" ) + else + warnlog( "File Save dialog did not open" ) + endif + + '/// File->Close ///' + hUseAsyncSlot( "FileClose" ) + Kontext + if MessageBox.Exists (1) then + WarnLog "After Saving and Closing the following MessageBox appears: " + MessageBox.GetText + MessageBox.Yes + end if + + '/// open just saved file ///' + Call hFileOpen( Datei ) + '/// type a formula ///' + sleep( 2 ) + call SchreibenInMathdok "a over b" + sleep( 2 ) +'/// File->Reload ///' + hUseAsyncSlot( "FileReload" ) + Kontext + if Active.Exists ( 3 ) then + PrintLog "Say no to: " + Active.GetText + '/// say NO to active ///' + active.No + else + WarnLog "Missing smth to say no to! " + end if + + + '/// File->Reload ///' + hUseAsyncSlot( "FileReload" ) + Kontext + if Active.Exists (1) then + PrintLog "Said yes to: " + Active.GetText + '/// say YES to active ///' + active.Yes + end if + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmFileVersions + Dim Datei as String + + Datei = ConvertPath (gOfficePath & "user/work/test"+cActFilterExt) + if app.Dir (Datei) <> "" then app.kill (Datei) + + '/// open application ///' + Call hNewDocument + sleep 2 + '/// type a formula ///' + SchreibenInMathdok "a over b" + '/// save file ///' + Call hFileSaveAs(Datei) + Sleep 3 + try + '/// File->Versions ///' + FileVersions + catch + Warnlog "- File / Versions not accessible!" + goto endsub + endcatch + + Kontext "Versionen" + Call DialogTest ( Versionen ) + '/// click button 'Save New Version' ///' + Speichern.Click + Kontext "VersionskommentarEingeben" + Call DialogTest ( VersionskommentarEingeben ) + '/// cancel dialog 'Insert Version Comment' ///' + VersionskommentarEingeben.Cancel + Kontext "Versionen" + '/// close dialog 'Version of ...' ///' + Versionen.Close + '/// close application ///' + Call hCloseDocument + if app.Dir (Datei) <> "" then app.kill Datei +endcase + +'----------------------------------------------------------- +'******************* I D dito ************************* +'----------------------------------------------------------- + +testcase tmFileOpen + '/// open application ///' + call hNewDocument + '/// File->Open ///' + FileOpen + Kontext "OeffnenDlg" + if ( OeffnenDlg.exists( 2 ) ) then + '/// klick button 'Up one level' ///' + UebergeordneterOrdner.Click + '/// klick button 'Default Directory' ///' + Standard.Click + '/// check checkbox 'Read Only' ///' + NurLesen.check + Call DialogTest ( OeffnenDlg ) + '/// cancel dialog 'Open' ///' + hCloseDialog( OeffnenDlg, "cancel" ) + endif + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmFileClose + '/// open application ///' + hNewDocument ' just for the records: i open ONE document + '/// type a formula ///' + sleep( 2 ) + call SchreibenInMathdok "a over b" + sleep( 2 ) +'/// File->Close ///' + hUseAsyncSlot( "FileClose" ) + Kontext ' expecting 'modified, do you want to close?' + if active.exists (5) then + printlog " ok, active came up: " + active.gettext + '/// say NO to active about 'modified stuff :-)' ///' + Active.Cancel ' no, not this time + else + warnlog "active missing (1)" + endif + + '/// File->Close ///' + hUseAsyncSlot( "FileClose" ) + Kontext + '/// say YES to active about 'modified stuff :-)' ///' + hCloseDialog( Active, "yes" ) + + Kontext "SpeichernDlg" + if ( SpeichernDlg.exists( 2 ) ) then + Call DialogTest ( SpeichernDlg ) + '/// cancel dialog 'Save As' ///' + hCloseDialog( SpeichernDlg, "cancel" ) + else + warnlog( "File Save dialog did not open" ) + endif + + '/// File->Close ///' + hUseAsyncSlot( "FileClose" ) ' now the office gets closed! (if there were no modifications!) + Kontext + if active.exists (5) then hCloseDialog( Active, "No" ) + +endcase + +testcase tmFileSave + '/// open application ///' + hNewDocument + '/// type a formula ///' + call SchreibenInMathdok "a over b" + '/// File->Save ///' + hUseAsyncSlot( "FileSave" ) + + Kontext "SpeichernDlg" + if ( SpeichernDlg.exists( 2 ) ) then + UebergeordneterOrdner.click + Standard.Click + ' NeuerOrdner.Click + ' DateiAuswahl.TypeKeys "Hallo<Return>" + ' DateiLoeschen + ' Kontext "Messagebox" + ' MessageBox.Yes + Call DialogTest (SpeichernDlg) + '/// cancel dialog 'Save' ///' + hCloseDialog( SpeichernDlg, "cancel" ) + else + warnlog( "File Save dialog did not open" ) + endif + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmFileSaveAs + '/// open application ///' + hNewDocument + sleep (2) + '/// type a formula ///' + call SchreibenInMathdok "a over b" + '/// File->Save As ///' + hUseAsyncSlot( "FileSaveAs" ) + + Kontext "SpeichernDlg" + if (SpeichernDlg.exists ( 5 ) ) then + + '/// check ceckbox 'save with Password' ///' + Passwort.check + '/// UNcheck ceckbox 'save with Password' ///' + Passwort.uncheck + '/// click button 'up one level' ///' + UebergeordneterOrdner.click + '/// click button 'default directory' ///' + Standard.Click + '/// click button 'create new directory' ///' + NeuerOrdner.click + kontext "NeuerOrdner" + '/// cancel dialog 'create new folder' ///' + NeuerOrdner.cancel + Kontext "SpeichernDlg" + Call DialogTest (SpeichernDlg) + '/// cancel dialog 'Save As' ///' + hCloseDialog( SpeichernDlg, "cancel" ) + else + warnlog( "File Save dialog did not open" ) + endif + + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmFileSaveAll + '/// open application ///' + hNewDocument + '/// type a formula ///' + call SchreibenInMathdok "a over b" + Printlog " '/// open 2. window ///" + hNewDocument + '/// type a formula ///' + call SchreibenInMathdok "a over b" + + Printlog " call save all" + '/// File->Save All ///' + FileSaveAll + Printlog " cancel 1. save" + Kontext "SpeichernDlg" + if SpeichernDlg.exists(5) then + '/// cancel dialog 'save as' ///' + SpeichernDlg.Cancel + else + qaErrorlog "First File save dialog did not show up." + endif + Printlog " cancel 2. save" + Kontext "SpeichernDlg" + if SpeichernDlg.exists(5) then + '/// cancel dialog 'save as' ///' + SpeichernDlg.Cancel + else + qaErrorlog "Second File save dialog did not show up." + endif + + try + Kontext "SpeichernDlg" + SpeichernDlg.Cancel + printlog "smth had been typed in the starting window (just a hint ;-) )" + catch + printlog "--------- no other window want's to get saved. :-)" + endcatch + + Sleep 2 + Printlog " hCloseDocument both" + '/// close document ///' + Call hCloseDocument + sleep 2 + Printlog " first closed" + '/// close application ///' + try + Call hCloseDocument + catch + printlog "any catching?" + endcatch + sleep 1 + Printlog " second closed" + sleep (5) +endcase + +testcase tmExportAsPDF + dim sPDF as string + dim sTemp as string + + sPDF = "PDF - Portable Document Format (.pdf)" + + '/// open application ///' + Call hNewDocument + + '/// click the button 'Export Directly as PDF' on the Functionbar ///' + kontext "Standardbar" + Sleep 5 + ExportAsPDF.click + ' the 'Export as PDF' dialog has to come up, with the only 'File type' 'PDF - Portable Document Format (.pdf)' + kontext "ExportierenDlg" + sTemp = Dateityp.GetSelText + if (sTemp <> sPDF) then + Warnlog "filter for PDF export is missing :-( should: '" + sPDF + "'; is: '" + + "'" + endif + '///+ - set Textbox 'File name' to "abc" ///' + Dateiname.SetText "abc" + '///+ - use the cursor keys in the filebrowser ///' + DateiAuswahl.TypeKeys "<home><down>" + '///+ - click on the button 'Up one level' ///' + UebergeordneterOrdner.Click + '///+ - click on the button 'Create New Directory' ///' + NeuerOrdner.Click + kontext "NeuerOrdner" + '///+ - - in the dialog $Foldername set textfield 'New' to 'abc' ///' + OrdnerName.SetText "abc" + '///+ - - cancel dialog $Foldername ///' + NeuerOrdner.cancel + kontext "ExportierenDlg" + '///+ - click on the button 'Default Directory' ///' + Standard.Click + '///+ - cancel dialog ///' + Kontext "ExportierenDlg" + hCloseDialog( ExportierenDlg, "cancel" ) + + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmFileProperties + '/// open application ///' + Call hNewDocument + '/// File->Properties... ///' + hUseAsyncSlot( "FileProperties" ) + + Kontext + '/// select tabpage 'General' ///' + active.SetPage TabDokument + Kontext "TabDokument" + Call DialogTest ( TabDokument ) + + Kontext + '/// select tabpage 'Description' ///' + active.SetPage TabDokumentInfo + Kontext "TabDokumentInfo" + Call DialogTest ( TabDokumentInfo ) + + Kontext + '/// select tabpage 'Internet' ///' + active.SetPage TabInternet + Kontext "TabInternet" + Call DialogTest (TabInternet) + hCloseDialog( TabInternet, "cancel" ) + '/// close application ///' + Call hCloseDocument + + qaerrorlog "#i95523# Custom Properties is not controlable by VCL TestTool Application" + goto endsub + + Kontext + '/// select tabpage 'User defined' ///' + active.SetPage TabBenutzer + Kontext "TabBenutzer" + Call DialogTest ( TabBenutzer ) + '/// click button 'info fields' ///' + Infofelder.Click + Kontext "InfonamenBearbeiten" + Call DialogTest (InfonamenBearbeiten) + '/// close dialog 'edit field names' ///' + hCloseDialog( InfoNamenBearbeiten, "cancel" ) +endcase + +testcase tmFilePrinterSetting + '/// open application ///' + Call hNewDocument + +'/// File->Printer Settings ///' + hUseAsyncSlot( "FilePrintersettings" ) + kontext + if active.exists(2) then + active.ok + qaerrorlog "There is no printer available - please install one on your system!" + endif + + Kontext "DruckerEinrichten" + if ( DruckerEinrichten.exists( 2 ) ) then + Call DialogTest (DruckerEinrichten) + + '/// cancel dialog 'printer setup' ///' + hCloseDialog( DruckerEinrichten, "cancel" ) + else + warnlog( "Printer Configuration dialog did not open" ) + endif + + '/// close application ///' + Call hCloseDocument +endcase + + diff --git a/testautomation/math/required/includes/m_002_.inc b/testautomation/math/required/includes/m_002_.inc new file mode 100755 index 000000000000..eff8ba5b82a8 --- /dev/null +++ b/testautomation/math/required/includes/m_002_.inc @@ -0,0 +1,132 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* Owner : thorsten.bosbach@oracle.com +'* +'* short description : +'* +'\***************************************************************** + +sub M_002_ + printlog Chr(13) + "-- Edit Menu m_002_ --" + + Call tmEditUndoRedo + Call tmEditAllClipboard + Call tmEditMarker + Call tmEditFailure +end sub + +testcase tmEditUndoRedo + '/// Edit / Undo and Edit / Redo /// + '/// open application ///' + hNewDocument + kontext "DocumentMath" + '/// type something into the document ///' + call SchreibenInMathdok "a over b" + try + '/// Edit->Undo ///' + EditUndo + catch + warnlog "edit->undo doesn't work :-(" + endcatch + Sleep 2 + '/// Edit->Redo ///' + EditRedo + Sleep 2 + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmEditAllClipboard + '/// open application ///' + hNewDocument + kontext "DocumentMath" +' DocumentMath.TypeKeys Eingabe not working +' kontext "Commands" also not working -- only way to type smth is clippboard +' Commands.TypeKeys Eingabe + + '/// type something into the document ///' + call SchreibenInMathdok "a over b" + '/// Edit->Select All ///' + EditSelectAllMath + Sleep 2 + '/// Edit->Cut ///' + EditCut + Sleep 2 + '/// Edit->Paste ///' + EditPaste + Sleep 2 + '/// Edit->Paste ///' + EditPaste + Sleep 2 + '/// Edit->Select All ///' + EditSelectAllMath + Sleep 2 + '/// Edit->Copy ///' + EditCopy + Sleep 2 + '/// Edit->Paste ///' + EditPaste + Sleep 2 + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmEditMarker + '/// open application ///' + hNewDocument + '/// type something into the document ///' + SchreibenInMathdok "Nonsense" + '/// Edit->Previous Marker ///' + EditPreviousMarker + '/// Edit->Previous Marker ///' + EditPreviousMarker + Sleep 2 + '/// Edit->Next Marker ///' + EditNextMarker + Sleep 2 + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmEditFailure + '/// open application ///' + hNewDocument + '/// type something into the document ///' + SchreibenInMathdok "Nonsense" + '/// Edit->Next Error ///' + EditNextError + '/// Edit->Next Error ///' + EditNextError + Sleep 2 + '/// Edit->Previous Error ///' + EditPreviousError + Sleep 2 + '/// close application ///' + Call hCloseDocument +endcase + diff --git a/testautomation/math/required/includes/m_003_.inc b/testautomation/math/required/includes/m_003_.inc new file mode 100755 index 000000000000..152fd1429849 --- /dev/null +++ b/testautomation/math/required/includes/m_003_.inc @@ -0,0 +1,177 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* Owner : thorsten.bosbach@oracle.com +'* +'* short description : +'* +'\***************************************************************** + +sub M_003_ + printlog Chr(13)+"-- File_View m_003_ --" + + Call tViewZoom + Call tViewUpdate + Call tViewAutomaticRepaint + Call tViewBars + ' ^ View->Status bar + Call tViewOperators + Call tViewEntireDesktop +end sub + +testcase tViewZoom +'/// open application ///' + Call hNewDocument + '/// type something into the document ///' + Call SchreibenInMathdok "What's the matter?" + sleep 2 + UseBindings + '/// View -> Zoom ///' + ViewZoom + Kontext "Massstab" + DialogTest ( Massstab ) + '/// check checkbox 'Entire Page' ///' + GanzeSeite.check + '/// check checkbox 'Page Width' ///' + Seitenbreite.check + '/// check checkbox 'Optmal' ///' + Optimal.check + '/// check checkbox 'Variable' ///' + VergroesserungStufenlos.check + '/// cancel dialog 'Zoom' ///' + Massstab.Cancel + '///View -> Zoom In /// + ViewZoomIn + sleep (2) + '///View -> Zoom Out /// + ViewZoomAll + sleep (2) + '///View -> Show All /// + ViewShowAll + sleep (2) + '/// close application ///' + Call hCloseDocument +endcase + +testcase tViewUpdate +'/// open application ///' + Call hNewDocument + '/// type something into the document ///' + Call SchreibenInMathdok "a sup b" + '/// Edit->Paste ///' + EditPaste + '/// View->Update ///' + ViewUpdate + sleep (2) + '/// close application ///' + Call hCloseDocument +endcase + +testcase tViewAutomaticRepaint +'/// open application ///' + Call hNewDocument + '/// type something into the document ///' + Call SchreibenInMathdok "a sup b" + '/// View->AutoUpdate Display ///' + ViewAutoUpdateDisplay + '/// Edit->Paste ///' + EditPaste + sleep (2) + '/// View->AutoUpdate Display ///' + ViewAutoUpdateDisplay + sleep (2) + '/// close application ///' + Call hCloseDocument +endcase + +testcase tViewBars +'/// open application ///' + Call hNewDocument + '/// type something into the document ///' + SchreibenInMathdok "a sup b" + try + '/// View->Toolbars->Function bar ///' + ViewToolbarsStandard + sleep (2) + '/// View->Toolbars->Function bar ///' + ViewToolbarsStandard + sleep (1) + '/// View->Toolbars->Main Toolbar ///' + ViewToolbarsTools + sleep (2) + '/// View->Toolbars->Main Toolbar ///' + ViewToolbarsTools + sleep (1) + '/// View->Status bar ///' + ViewToolbarsStatusbar + sleep (1) + '/// View->Status bar ///' + ViewToolbarsStatusbar + sleep (1) + catch + warnlog "toolbar slots not accessible" + endcatch + '/// close application ///' + Call hCloseDocument +endcase + +testcase tViewOperators +'/// open application ///' + Call hNewDocument + '/// type something into the document ///' + Call SchreibenInMathdok "a over b" + '/// View->Selection ///' + ViewSelection + sleep (2) + '/// View->Selection ///' + ViewSelection + Kontext "OperatorenMath" + if (NOT OperatorenMath.Exists (2)) then + ViewSelection + printlog "View Selection wasn't visible :-( now is!" + endif + Call DialogTest ( OperatorenMath ) + '/// close application ///' + Call hCloseDocument +endcase + +testcase tViewEntireDesktop +'/// open application ///' + Call hNewDocument + '/// type something into the document ///' + Call SchreibenInMathdok "(a over ba) over (a + 1/2 * b )" + '/// View->Full Screen ///' + ViewFullScreen + sleep 2 + '/// View->Full Screen ///' + ViewFullScreen + sleep 1 + '/// close application ///' + Call hCloseDocument +endcase + + diff --git a/testautomation/math/required/includes/m_004_.inc b/testautomation/math/required/includes/m_004_.inc new file mode 100755 index 000000000000..8f49d5633c4f --- /dev/null +++ b/testautomation/math/required/includes/m_004_.inc @@ -0,0 +1,286 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* Owner : thorsten.bosbach@oracle.com +'* +'* short description : +'* +'\***************************************************************** + +sub M_004_ + Printlog Chr(13)+"-- Format Menu m_004_ --" + + Call tFormatFonts + Call tFormatFontsize + Call tFormatDistance + Call tFormatAlignment + Call tFormatTextmode +end sub + +testcase tFormatFonts + Dim i as integer + dim iCount as integer + '/// open application ///' + Call hNewDocument + sleep (5) + '/// Format->Fonts ///' + FormatFonts + Kontext "Schriftarten" + Call DialogTest (Schriftarten) + '/// select every entry from 'Modify' and do ///' + Aendern.OpenMenu + iCount = hMenuItemGetCount + if (iCount <> 7) then + warnlog "There are Entries missing; expected: '7'; found: '" + iCount +"'" + endif + for i=1 to iCount + sleep 2 + printlog " Font for Menuitem Nr. " & i + sleep 2 + hMenuSelectNr ( i ) + Sleep 2 + Kontext "Schriften" + Call DialogTest (Schriften) + if (i<5) then + try + '/// check checkbox 'bold' ///' + fett.check + '/// check checkbox 'italic' ///' + kursiv.check + catch + warnlog "fett and/or kursiv checkbox doesn't exist" + endcatch + else + if (fett.isvisible OR kursiv.isVisible) then + warnlog "fett and/or kursiv checkbox exists" + endif + endif + sleep 1 + '/// cancel dialog 'fonts' ///' + Schriften.Cancel + Sleep 2 + Kontext "Schriftarten" + Aendern.OpenMenu + next i + Kontext "Schriftarten" + hMenuClose + '/// cklick button 'default' ///' + Standard.Click + Kontext "Active" + if active.exists (5) then + Active.No ' should changes ybe saved as default (yes/no) + else + warnlog "should changes be saved as default (yes/no) failed :-(" + endif + Kontext "Schriftarten" + '/// cancel dialog 'fonts' ///' + Schriftarten.Cancel + '/// close document ///' + Call hCloseDocument +endcase + +testcase tFormatFontsize + '/// open application ///' + Call hNewDocument + '/// Format->FontSize ///' + FormatFontSize + Kontext "Schriftgroessen" + Call DialogTest (Schriftgroessen) + '/// press button MORE on 'Base size' ///' + BasisGroesse.more + '/// press button MORE on 'Text' ///' + TextGroesse.more + '/// press button MORE on 'Indexes' ///' + Indizes.more + '/// press button MORE on 'Functions' ///' + Funktionen.more + '/// press button MORE on 'Operators' ///' + Operatoren.more + '/// press button MORE on 'Limits' ///' + Grenzen.more + sleep 1 + '/// press button 'default' ///' + Standard.Click + kontext "active" + if active.exists (5) then + Active.No ' should changes ybe saved as default (yes/no) + else + warnlog "should changes be saved as default (yes/no) failed :-(" + endif + Kontext "Schriftgroessen" + '/// cancel dialog 'Font Sizes' ///' + Schriftgroessen.Cancel + sleep 2 +'/// close document ///' + Call hCloseDocument +endcase + +testcase tFormatDistance + Dim i as integer + '/// open application ///' + Call hNewDocument + '/// Format->Spacing ///' + FormatSpacing + Kontext "Spacing" + Call DialogTest (Spacing) + Category.Open + sleep 1 + for i=1 to hMenuItemGetCount + hMenuSelectNr (i) + Sleep 1 + Call DialogTest (Spacing,i) + Select Case i + Case 1 + '/// select 'Spacing' from Category menu ///' + '///+ click MORE button on '' ///' + SpacingSpacing.More + '///+ click MORE button on '' ///' + LineSpacing.More + '///+ click MORE button on '' ///' + RootSpacing.More + Case 2 + '/// select 'Indexing' from Category menu ///' + '///+ click MORE button on '' ///' + Superscript.More + '///+ click MORE button on '' ///' + Subscript.More + Case 3 + '/// select 'Fractions' from Category menu ///' + '///+ click MORE button on '' ///' + Numerator.More + '///+ click MORE button on '' ///' + Denominator.More + Case 4 + '/// select 'Fraction bars' from Category menu ///' + '///+ click MORE button on '' ///' + ExcessLength.More + '///+ click MORE button on '' ///' + Weight.More + Case 5 + '/// select 'Limits' from Category menu ///' + '///+ click MORE button on '' ///' + UpperLimit.More + '///+ click MORE button on '' ///' + LowerLimit.More + Case 6 + '/// select 'Brackets' from Category menu ///' + '///+ click MORE button on '' ///' + ExcessSize.More + '///+ click MORE button on '' ///' + BracketSpacing.More + ScaleAllBrackets.Check + '///+ click MORE button on '' ///' + ExcessSizeAll.More + Case 7 + '/// select 'Matrixes' from Category menu ///' + '///+ click MORE button on '' ///' + MatrixLineSpacing.More + '///+ click MORE button on '' ///' + ColumnSpacing.More + Case 8 + '/// select 'Symbols' from Category menu ///' + '///+ click MORE button on '' ///' + PrimaryHeight.More + '///+ click MORE button on '' ///' + MinimunSpacing.More + Case 9 + '/// select 'Operators' from Category menu ///' + '///+ click MORE button on '' ///' + OperatorsExcessSize.More + '///+ click MORE button on '' ///' + OperatorsSpacing.More + Case 10 + '/// select 'Borders' from Category menu ///' + '///+ click MORE button on '' ///' + BordersLeft.More + '///+ click MORE button on '' ///' + BordersRight.More + '///+ click MORE button on '' ///' + BordersTop.More + '///+ click MORE button on '' ///' + BordersBottom.More + Case Else + warnlog "More items than expected :-(" + End Select + Category.Click + next i + hMenuClose + Sleep 1 + Default.Click + kontext "active" + if active.exists (5) then + Active.No ' should changes ybe saved as default (yes/no) + else + warnlog "should changes be saved as default (yes/no) failed :-(" + endif + Kontext "Spacing" + '/// cancel dialog 'Spacing' ///' + Spacing.Cancel + Sleep 2 +'/// close document ///' + Call hCloseDocument +endcase + +testcase tFormatAlignment + '/// open application ///' + Call hNewDocument + '/// Format->Alignment ///' + FormatAlignment + Kontext "Ausrichtung" + Call DialogTest (Ausrichtung) + '/// check Radiobutton 'Left' ///' + Links.Check + '/// check Radiobutton 'Centered' ///' + Zentriert.Check + '/// check Radiobutton 'Right' ///' + Rechts.Check + '/// check Button 'Default' ///' + Standard.Click + kontext "active" + if active.exists (5) then + Active.No ' should changes ybe saved as default (yes/no) + else + warnlog "should changes be saved as default (yes/no) failed :-(" + endif + Kontext "Ausrichtung" + Ausrichtung.Cancel + '/// close document ///' + Call hCloseDocument +endcase + +testcase tFormatTextmode +'/// open application ///' + Call hNewDocument + '/// Format->Text Mode ///' + FormatTextMode + sleep 1 + '/// Format->Text Mode ///' + FormatTextMode +'/// close document ///' + Call hCloseDocument +endcase + diff --git a/testautomation/math/required/includes/m_005_.inc b/testautomation/math/required/includes/m_005_.inc new file mode 100755 index 000000000000..d9c773ef7372 --- /dev/null +++ b/testautomation/math/required/includes/m_005_.inc @@ -0,0 +1,313 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* Owner : thorsten.bosbach@oracle.com +'* +'* short description : +'* +'\***************************************************************** + +sub M_005_ + printlog Chr(13) + "-- Tools Menu m_005_ --" + + Call tToolsCatalog + Call tToolsImportFormula + Call tiToolsMacro + Call tToolsExtensionManager + + Call tToolsCustomize 'global one ! TBO + Call tToolsOptionstest ' global one ! TZ +end sub + +testcase tToolsCatalog + '/// open application ///' + Call hNewDocument + '/// Tools->Catalog ///' + ToolsSymbolsCatalog + Kontext "SymboleMath" + Call Dialogtest (SymboleMath) + printlog "count of 'Symbol set' :" + Symbolset.GetItemCount + '/// click button 'Edit...' ///' + Bearbeiten.Click + Kontext "EditSymbols" + Call DialogTest (EditSymbols) + OldSymbol.GetItemCount + OldSymbolSet.GetItemCount + Symbol.GetItemCount + SymbolSet.GetItemCount + Subset.GetItemCount + Typeface.GetItemCount + '/// select last item in listbox 'Font' ///' + Font.Select (Font.GetItemCount) + sleep 1 + '/// Click Button 'Modify' ///' + Modify.Click + sleep 1 + '/// Click Button 'Delete' ///' + Delete.Click + sleep 1 + '/// Click Button 'Add' ///' + Add.Click + sleep 1 + '/// cancel dialog 'Edit Symbols' ///' + EditSymbols.Cancel + Kontext "SymboleMath" + '/// click button 'Insert' ///' + Uebernehmen.Click + Sleep 2 + '/// close dialog 'Symbols' ///' + SymboleMath.close + '/// close application ///' + Call hCloseDocument +endcase + +testcase tToolsImportFormula + '/// open application ///' + Call hNewDocument + Sleep 3 + '/// Tools->Import->Formula ///' + ToolsImportFormula + Kontext "OeffnenDlg" + Kontext "OeffnenDlg" + UebergeordneterOrdner.Click + Standard.Click + Call DialogTest ( OeffnenDlg ) + '/// cancel dialog 'Insert' ///' + OeffnenDlg.Cancel + Sleep 2 + '/// close application ///' + Call hCloseDocument +endcase + +testcase tiToolsMacro +'/// open application ///' + Call hNewDocument + sleep 2 + '/// try to call Tools->Macros...->Record Macro => this has to fail, it is only aloowed from writer and Calc ///' + try + ToolsMacroRecordMacro + Warnlog "I can record macros in this application :-(" + catch + Printlog "i can't record macros in this application :-)" + endcatch +'/// Tools->Macro ///' + ToolsMacro + Kontext "Makro" + Call DialogTest ( Makro ) +'/// click button 'organizer...' ///' + Verwalten.Click + + Kontext +'/// switch to tabpage 'Modules' ///' + Messagebox.SetPage TabModule + Kontext "TabModule" + Call DialogTest ( TabModule ) + + Kontext +'/// switch to tabpage 'Libraries' ///' + Messagebox.SetPage TabBibliotheken + Kontext "TabBibliotheken" + Call DialogTest ( TabBibliotheken ) +'/// click lbutton 'append' ///' + Hinzufuegen.Click + Kontext "Messagebox" + if Messagebox.Exists (5) then + if Messagebox.GetRT = 304 then + Warnlog Messagebox.Gettext + Messagebox.Ok + endif + end if + Kontext "OeffnenDlg" +'/// cancel dialog 'append libraries' ///' + OeffnenDlg.Cancel + Kontext "TabBibliotheken" +'/// click button 'new' ///' + Neu.Click + kontext "NeueBibliothek" + sleep 1 'Bibliotheksname +'/// cancel dialog 'new library' ///' + NeueBibliothek.cancel + Kontext "TabBibliotheken" +'/// close dialog 'macro organizer' ///' + TabBibliotheken.Close + + Kontext "Makro" +'/// close dialog 'macro' ///' + Makro.Cancel +'/// close application ///' + Call hCloseDocument +endcase + +testcase tToolsExtensionManager + dim sPath as string + dim sTemp as string + dim sTemp2 as string + dim x as integer + + if ( lcase( gPlatform ) <> "osx" ) then + sPath = convertPath(gTestToolPath+"math/required/input/") + '/// open application ///' + Call hNewDocument + sleep 2 + '/// call Tools - Package/Extension manager ///' + ToolsPackageManager + kontext "PackageManager" + If PackageManager.exists(10) then + DialogTest(PackageManager) + '/// going to top of package list and explode every line, until the button 'Add' is enabled ///' + '/// should be 'My Packages' ///' + BrowsePackages.typeKeys("<home>") + if (Not Add.isEnabled) then + warnlog "Couldn't find a way to enable the Add button - aborting" + goto endsub + endif + '/// click button 'Add' ///' + Add.click + '/// Add Package(s)... dialg comes up ///' + Kontext "OeffnenDlg" + if OeffnenDlg.exists(5) then + '/// put filename into field ///' + Dateiname.setText (sPath + "unknown-dependency.oxt") + '/// press button 'Open' ///' + Oeffnen.click + else + warnlog "Add Package(s)... dialog didn't came up" + endif + + 'Asking for whom to install; All: YES, Me: NO, nobody: Cancel + kontext + if active.exists(5) then + sTemp = active.getText + try + active.yes + catch + 'printlog sTemp + endcatch + endif + + '/// Progress dialog comes up ///' + Kontext "AddingPackages" + if AddingPackages.exists(1) then + printlog " - AddingPackages dialog exists" + DialogTest(AddingPackages) + endif + + '/// If any error happens, an active comes up, telling what is wrong ///' + Kontext + if active.exists(5) then + sTemp = active.getText + printlog sTemp + active.ok + endif + + '/// If there are any unsatisfied dependencies, they are shown now ///' + Kontext "UnsatisfiedDependencies" + if UnsatisfiedDependencies.exists(10) then + printlog " - UnsatisfiedDependencies dialog exists" + DialogTest(UnsatisfiedDependencies) + '/// close dialog if available, extension will not be installed ///' + UnsatisfiedDependencies.ok + endif + + Kontext "AddingPackages" + x=0 + while AddingPackages.exists(1) AND (x<6) + printlog "AddingPackages..." + sleep 5 + x=x+1 + wend + + kontext "PackageManager" + Add.click + '/// Add Package(s)... dialg comes up ///' + Kontext "OeffnenDlg" + if OeffnenDlg.exists(5) then + '/// put filename into field ///' + Dateiname.setText (sPath + "ShortLicense.oxt") + '/// press button 'Open' ///' + Oeffnen.click + else + warnlog "Add Package(s)... dialog didn't came up" + endif + + 'Asking for whom to install; All: YES, Me: NO, nobody: Cancel + kontext + if active.exists(5) then + sTemp = active.getText + try + active.yes + catch + 'printlog sTemp + endcatch + endif + + '/// Progress dialog comes up ///' + Kontext "AddingPackages" + if AddingPackages.exists(1) then + printlog " - AddingPackages dialog exists" + endif + + '/// If any error happens, an active comes up, telling what is wrong ///' + Kontext + if active.exists(5) then + sTemp = active.getText + printlog sTemp + active.ok + endif + + '/// If there is a license, it is shown now ///' + Kontext "ExtensionSoftwareLicenseAgreement" + if ExtensionSoftwareLicenseAgreement.exists(10) then + DialogTest (ExtensionSoftwareLicenseAgreement) + printlog " - ExtensionSoftwareLicenseAgreement dialog exists" + ExtensionSoftwareLicenseAgreement.CANCEL + kontext + if active.exists(5) then + qaerrorlog "#i73307# Alzheimer feature extension licensing '" + active.getText + "'" + active.ok + endif + endif + + Kontext "AddingPackages" + x=0 + while AddingPackages.exists(1) AND (x<6) + printlog "AddingPackages..." + sleep 5 + x=x+1 + wend + + '/// Close extension manager ///' + kontext "PackageManager" + PackageManager.OK + else + warnlog "Couldn't call Tools -> Package manager - aborting test" + endif + Call hCloseDocument + else + qaErrorLog "Do not run on macosx - not reproduceable error" + endif +endcase diff --git a/testautomation/math/required/includes/m_006_.inc b/testautomation/math/required/includes/m_006_.inc new file mode 100755 index 000000000000..cea7bb704512 --- /dev/null +++ b/testautomation/math/required/includes/m_006_.inc @@ -0,0 +1,53 @@ +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* Owner : thorsten.bosbach@oracle.com +'* +'* short description : +'* +'\***************************************************************** + +sub m_006_ + + printlog Chr(13) + "-- Window-Menu --" + + Call tWindowNewWindow + +end sub + +'----------------------------------------------------------- +testcase tWindowNewWindow + PrintLog "- Window/NewWindow" + + Call hNewDocument + Call SchreibenInMathdok "f(x) = x sup 2 + 2x" + + WindowNewWindow + Sleep 2 + hCloseDocument +endcase + + diff --git a/testautomation/math/required/includes/m_007_.inc b/testautomation/math/required/includes/m_007_.inc new file mode 100755 index 000000000000..fc8269c05c21 --- /dev/null +++ b/testautomation/math/required/includes/m_007_.inc @@ -0,0 +1,274 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* Owner : thorsten.bosbach@oracle.com +'* +'* short description : Test the Help Menu +'* +'\***************************************************************** + +sub M_007_ + printlog Chr(13)+ "-- Help-Menu m_007_ --" + Call tmHelpHelpAgent + Call tmHelpTips + Call tmHelpExtendedTips + Call tmHelpAboutStarOffice + Call tmHelpContents 'wrn:1 +end sub + +'----------------------------------------------------------- +'******************* I D dito ************************* +'----------------------------------------------------------- + + +testcase tmHelpHelpAgent + '/// open application ///' + Call hNewDocument + + SchreibenInMathdok "a over b" + + HelpHelpAgent ' it's just a switch + sleep 2 + HelpHelpAgent + + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmHelpTips + '/// open application ///' + Call hNewDocument + SchreibenInMathdok "a over b" + + HelpTips + Sleep 2 + HelpTips + + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmHelpExtendedTips + '/// open application ///' + Call hNewDocument + SchreibenInMathdok "a over b" + + HelpEntendedHelp + Sleep (2) + HelpEntendedHelp + + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmHelpAboutStarOffice + '/// open application ///' + Call hNewDocument + SchreibenInMathdok "a over b" + + HelpAboutStarOffice + Kontext "UeberStarMath" + DialogTest (UeberStarMath) + UeberStarMath.OK + + '/// close application ///' + Call hCloseDocument +endcase + +testcase tmHelpContents + dim i as integer + + '/// open application ///' + Call hNewDocument + '/// Help->Contents ///' + sleep 1 + try + HelpContents + catch + qaerrorlog "argh!" + endcatch + sleep(8) + kontext "StarOfficeHelp" + if Not StarOfficeHelp.Exists then + Warnlog "Help is not up!" + else + '/// get the number of entries in the listbox 'select Help modul' ///' + try + Printlog "HelpAbout: '" + HelpAbout.GetItemCount +"'" + catch + Index.Click + qaErrorLog "#i55563# Used Index Button" + Printlog "HelpAbout: '" + HelpAbout.GetItemCount +"'" + endcatch + try + '################ left half ################ + '/// on the left half of the dialog: ///' + '///+ change to the tabpage 'Contents' ///' + TabControl.SetPage ContentPage + '///+ get the number of entries in the listbox 'MAin help themes' ///' + Printlog "SearchContent: '" + SearchContent.GetItemCount + "'" + '///+ change to the tabpage 'Index' ///' + TabControl.SetPage IndexPage + '///+ get the number of entries in the listbox 'Search term' ///' + Printlog "SearchIndex: '" + SearchIndex.GetItemCount + "'" + sleep 5 + '///+ click on button 'Display' ///' + DisplayIndex.Click + sleep 5 + '///+ change to the tabpage 'Find' ///' + TabControl.SetPage FindPage + '///+ get the number of entries in the listbox 'Search term' ///' + Printlog "SearchFind: '" + SearchFind.GetItemCount + "'" + '///+ click on button 'Find' -> It has to be disabled #107880# ///' + try + FindButton.Click + warnlog "Find button is enabled, but no text was enterd to search for: BUG!" + catch + printlog "Find without text entered to search for didn't work: OK" + endcatch + '///+ Enter 'recumbent' in textfield 'Search term' ///' + SearchFind.SetText "recumbent" + '///+ click on button 'Find' ///' + FindButton.Click + kontext + '///+ Messagebox comes up about: 'No topics found.' say OK ///' + if (active.exists (2) )then + Printlog "active came up: '" + active.gettext + "'" + active.ok + endif + kontext "StarOfficeHelp" + '///+ check checkbox 'Complete words only' ///' + FindFullWords.Check + '///+ check checkbox 'Find in headings only' ///' + FindInHeadingsOnly.Check + '///+ get the number of entries in the listbox 'List of headings' ///' + Printlog "Result: '" + Result.GetItemCount + "'" + '///+ click on button 'Display' ///' + DisplayFind.Click + '///+ change to the tabpage 'Bookmarks' ///' + TabControl.SetPage BookmarksPage + '///+ get the number of entries in the listbox 'Bookmark list' ///' + Printlog "Bookmarks: '" + Bookmarks.GetItemCount + "'" + '///+ click on button 'Display' ///' + DisplayBookmarks.Click + '################ right half ################ + '/// on the right half of teh dialog: ///' + '################ toolbar ################ + Kontext "TB_Help" + '///+ click on button 'Hide/Show Navigation Pane' ///' + Index.Click + sleep 1 + '///+ click on button 'Hide/Show Navigation Pane' ///' + Index.Click + '///+ click on button 'First Page' ///' + GoToStart.Click + '///+ click on button 'Previous Page' ///' + Backward.Click + '///+ click on button 'Next Page' ///' + Forward.Click + '///+ click on button 'Print ...' ///' + PrintButton.Click + kontext + if active.exists(2) then + active.ok + qaerrorlog "There is no printer available - please install one on your system!" + endif + sleep 2 + kontext "Printing" + '/// On the dialog 'Print' press the button 'Cancel' ///' + Printing.cancel + Kontext "TB_Help" + '///+ click on button 'Add to Bookmarks ...' ///' + SetBookmarks.Click + Kontext "AddBookmark" + '///+ on the dialog 'Add to Bookmarks ...' get the text from the editfield 'Bookmark' and press button 'Cancel' ///' + Printlog "Bookmarkname: '" + Bookmarkname.GetText + "'" + AddBookmark.Cancel + '################ help display ################ + kontext "HelpContent" + '///+ open the Context Menu of the Frame 'Help Content' and count the entries ///' + HelpContent.OpenContextMenu + Printlog " i: " + hMenuItemGetCount + hMenuClose() + '################ right scroolbar ################ + kontext "HelpContent" + '///+ click on button 'Previous Page' ///' + if HelpContentUP.IsVisible then + HelpContentUP.Click + kontext + if active.exists(5) then + qaerrorlog "Messagebox comes up! ##" + printlog "active: '" + active.getText + "'" + active.no + endif + endif + kontext "HelpContent" + '///+ click on button 'Navigation' ///' + if HelpContentNAVIGATION.IsVisible then + HelpContentNAVIGATION.Click + endif + kontext "NavigationsFenster" + '/// on the toolbox 'Navigation' press the window close button 'X' ///' + NavigationsFenster.Close + kontext "HelpContent" + '///+ click on button 'Next Page' ///' + if HelpContentDOWN.IsVisible then + HelpContentDOWN.Click + kontext + if active.exists(5) then + qaerrorlog "Messagebox comes up! ##" + printlog "active: '" + active.getText + "'" + active.no + endif + endif + catch + warnlog "something is not working in the help-window :-(" + endcatch + kontext "StarOfficeHelp" +' StarOfficeHelp.TypeKeys "<Mod2 F4>" ' alt F4 ' doesn't work +' StarOfficeHelp.TypeKeys "<Mod1 w>" ' strg w ' doesn't work + '/// close the help with the keys [strg]+[F4] ///' + Printlog "trying to close the help now" + try + StarOfficeHelp.TypeKeys "<Mod1 F4>" ' strg F4 supported since bug #103586# + catch + Warnlog "failed to close the help window :-(" + endcatch +' kontext "HelpContent" +' HelpContent.TypeKeys "<Mod1 w>" ' strg w ' doesn't work +' HelpContent.TypeKeys "<Mod2 F4>" ' alt f4 ' doesn't work +' HelpContent.TypeKeys "<Mod1 F4>" ' strg f4 supported since bug #103586# + kontext "StarOfficeHelp" + if StarOfficeHelp.Exists then + warnlog "Help still up!" + endif + endif + '/// close application ///' + Call hCloseDocument +endcase + + diff --git a/testautomation/math/required/includes/m_010_.inc b/testautomation/math/required/includes/m_010_.inc new file mode 100755 index 000000000000..7f3cd8944a50 --- /dev/null +++ b/testautomation/math/required/includes/m_010_.inc @@ -0,0 +1,670 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* Owner : thorsten.bosbach@oracle.com +'* +'* short description : +'* +'\***************************************************************** +'/// If a function button is not visible, the test exists. ///' + +sub M_010_ + + printlog Chr(13) + "-- Operators --" + + Call tAllUnaerBinaer + Call tAllRelations + Call tAllMixOperators + Call tAllFunctions + Call tAllOperators + Call tAllAttributes + Call tAllBrackets + Call tAllFormats + Call tOthers + +end sub + + +'----------------------------------------------------------- +testcase tAllUnaerBinaer + PrintLog "- SelectionWindow : All UnaerBinaer" + Call hNewDocument + + Kontext "AuswahlMath" + If AuswahlMath.notexists(2) then + ViewSelection + endif + ' others don't work ?? OperatorenMAth, SelectionMAth, ViewSelection... + Kontext "OperatorenMath" + + UnaereBinaere.Click + Sleep 1 + Kontext "AuswahlMath" + Call DialogTest ( AuswahlMath, 1 ) + +try + Plus.Click + Call Bereinigen + Minus.Click + Call Bereinigen + PlusMinus.Click + Call Bereinigen + MinusPlus.Click + Call Bereinigen + Additions.Click + Call Bereinigen + Multiplikation.Click + Call Bereinigen + MultiplikationKreuz.Click + Call Bereinigen + MultiplikationStern.Click + Call Bereinigen + Subtraktions.Click + Call Bereinigen + Division.Click + Call Bereinigen + DivisionDoppelpunkt.Click + Call Bereinigen + DivisionSchraegstrich.Click + Call Bereinigen + LogischesNICHT.Click + Call Bereinigen + LogischesUND.Click + Call Bereinigen + LogischesODER.Click + Call Bereinigen + Verkettung.Click +catch + warnlog "failed!" +endcatch + + Call hCloseDocument +endcase +'----------------------------------------------------------- +testcase tAllRelations + PrintLog "- SelectionWindow : All Relations" + Call hNewDocument + + Kontext "AuswahlMath" + If AuswahlMath.notexists(2) then AuswahlMath + Relationen.Click + Sleep 1 + Call DialogTest ( AuswahlMath, 2 ) + +try + IstGleich.Click + Call Bereinigen + IstUngleich.Click + Call Bereinigen + IstKongruentZu.Click + Call Bereinigen + IstOrthogonalZu.Click + Call Bereinigen + IstKleinerAls.Click + Call Bereinigen + IstGroesserAls.Click + Call Bereinigen + IstUngefaehrGleich.Click + Call Bereinigen + IstParallelZu.Click + Call Bereinigen + IstKleinerGleich.Click + Call Bereinigen + IstGroesserGleich.Click + Call Bereinigen + IstAehnlichOderGlech.Click + Call Bereinigen + IstProportionalZu.Click + Call Bereinigen + IstKleinerGleich2.Click + Call Bereinigen + IstGroesserGleich2.Click + Call Bereinigen + IstAehnlichZu.Click + Call Bereinigen + StrebtGegen.Click + Call Bereinigen + DoppelterPfeilNachLinks.Click + Call Bereinigen + DoppelterPfeilNachLinksUndRechts.Click + Call Bereinigen + DoppelterPfeilNachRechts.Click + Call Bereinigen + Teilt.Click + Call Bereinigen + TeiltNicht.Click + +catch + warnlog "failed!" +endcatch + + Call hCloseDocument +endcase +'----------------------------------------------------------- +testcase tAllMixOperators + PrintLog "- SelectionWindow : All SetOperators" + Call hNewDocument + + Kontext "AuswahlMath" + If AuswahlMath.notexists(2) then AuswahlMath + MengenOperatoren.Click + Sleep 1 + Call DialogTest ( AuswahlMath, 3 ) + +try + IstEnthaltenIn.Click + Call Bereinigen + IstNichtEnthaltenIn.Click + Call Bereinigen + Enthaelt.Click + Call Bereinigen + Durchschnitt.Click + Call Bereinigen + Vereinigung.Click + Call Bereinigen + Differenz.Click + Call Bereinigen + Quotientenmenge.Click + Call Bereinigen + Teilmenge.Click + Call Bereinigen + TeilmengeOderGleich.Click + Call Bereinigen + Obermenge.Click + Call Bereinigen + ObermengeOderGleich.Click + Call Bereinigen + NichtTeilmenge.Click + Call Bereinigen + NichtTeilmengeOderGleich.Click + Call Bereinigen + NichtObermenge.Click + Call Bereinigen + NichtObermengeOderGleich.Click + Call Bereinigen + Aleph.Click + Call Bereinigen + LeereMenge.Click + Call Bereinigen + MengeDerGanzenZahlen.Click + Call Bereinigen + MengeDerKomplexenZahlen.Click + Call Bereinigen + MengeDerNatuerlichenZahlen.Click + Call Bereinigen + MengeDerRationalenZahlen.Click + Call Bereinigen + MengeDerReellenZahlen.Click + +catch + warnlog "failed!" +endcatch + + Call hCloseDocument +endcase +'----------------------------------------------------------- +testcase tAllFunctions + PrintLog "- OperatorWindow AllFunctions" + Call hNewDocument + + Kontext "AuswahlMath" + If AuswahlMath.notexists(2) then AuswahlMath + Funktionen.Click + Sleep 1 + Call DialogTest ( AuswahlMath, 4 ) + +try + Absolutwert.Click + Call Bereinigen + Fakultaet.Click + Call Bereinigen + Quadratwurzel.Click + Call Bereinigen + NteWurzel.Click + Call Bereinigen + NatuerlicheExponentialfunktion.Click + Call Bereinigen + NatuerlicherLogarithmus.Click + Call Bereinigen + Exponentialfunktion.Click + Call Bereinigen + Logarithmus.Click + Call Bereinigen + Sinus.Click + Call Bereinigen + Cosinus.Click + Call Bereinigen + Tangens.Click + Call Bereinigen + Cotangens.Click + Call Bereinigen + Hyperbelsinus.Click + Call Bereinigen + Hyperbelcosinus.Click + Call Bereinigen + Hyperbeltangens.Click + Call Bereinigen + Hyperbelcotangens.Click + Call Bereinigen + Arcussinus.Click + Call Bereinigen + Arcuscosinus.Click + Call Bereinigen + Arcustangens.Click + Call Bereinigen + Arcuscotangens.Click + Call Bereinigen + Areahyperbelsinus.Click + Call Bereinigen + Areahyperbelcosinus.Click + Call Bereinigen + Areahyperbeltangens.Click + Call Bereinigen + Areahyperbelcotangens.Click + Call Bereinigen + SuperscriptRechts.Click + +catch + warnlog "failed!" +endcatch + + Call hCloseDocument +endcase +'----------------------------------------------------------- +testcase tAllOperators + PrintLog "- Auwahlfenster : Operators" + Call hNewDocument + + Kontext "AuswahlMath" + If AuswahlMath.notexists(2) then AuswahlMath + Operatoren.Click + Sleep 1 + Call DialogTest ( AuswahlMath, 5 ) + +try + Limes.Click + Call Bereinigen + Summe.Click + Call Bereinigen + Produkt.Click + Call Bereinigen + Coprodukt.Click + Call Bereinigen + Integral.Click + Call Bereinigen + DoppeltesIntegral.Click + Call Bereinigen + DreifachesIntegral.Click + Call Bereinigen + 'EsExistiertEin.Click + ' Call Bereinigen + Kurvenintegral.Click + Call Bereinigen + DoppeltesKurvenintegral.Click + Call Bereinigen + DreifachesKurvenintegral.Click + Call Bereinigen + 'FuerAlle.Click + ' Call Bereinigen + UntereUndObereGrenze.Click + Call Bereinigen + UntereGrenze.Click + Call Bereinigen + ObereGrenze.Click + +catch + warnlog "failed!" +endcatch + + Call hCloseDocument +endcase + +'----------------------------------------------------------- +testcase tAllAttributes + PrintLog "- SelectionWindow : All Attributes" + Call hNewDocument + + Kontext "AuswahlMath" + If AuswahlMath.notexists(2) then AuswahlMath + Attribute.Click + Sleep 1 + Call DialogTest ( AuswahlMath, 6 ) + +try + AccentNachRechts.Click + Call Bereinigen + AccentNachLinks.Click + Call Bereinigen + UmgekehrtesDach.Click + Call Bereinigen + Breve.Click + Call Bereinigen + Ueberstrich.Click + Call Bereinigen + Vektorpfeil.Click + Call Bereinigen + Dach.Click + Call Bereinigen + Tilde.Click + Call Bereinigen + Kreis.Click + Call Bereinigen + Punkt.Click + Call Bereinigen + DoppelterPunkt.Click + Call Bereinigen + DreifacherPunkt.Click + Call Bereinigen + LinieUeber.Click + Call Bereinigen + LinieUnter.Click + Call Bereinigen + LinieDurch.Click + Call Bereinigen + Transparent.Click + Call Bereinigen + Fettschrift.Click + Call Bereinigen + KursiveSchrift.Click + Call Bereinigen + GroesseAendern.Click + Call Bereinigen + FontAendern.Click + Call Bereinigen + BreiterVektorpfeil.Click + Call Bereinigen + BreitesDach.Click + Call Bereinigen + BreiteTilde.Click + +catch + warnlog "failed!" +endcatch + + Call hCloseDocument +endcase + +'----------------------------------------------------------- +testcase tAllBrackets + PrintLog "- SelectionWindow : All Bracketings" + Call hNewDocument + + Kontext "AuswahlMath" + If AuswahlMath.notexists(2) then AuswahlMath + Klammerungen.Click + Sleep 1 + Call DialogTest ( AuswahlMath, 7 ) + +try + RundeKlammern.Click + Call Bereinigen + EckigeKlammern.Click + Call Bereinigen + SpitzeKlammern.Click + Call Bereinigen + GeschweifteKlammern.Click + Call Bereinigen + EinfacheLinien.Click + Call Bereinigen + DoppelteLinien.Click + Call Bereinigen + GruppierungsKlammern.Click + Call Bereinigen + RundeKlammernSkalierbar.Click + Call Bereinigen + EckigeKlammernSkalierbar.Click + Call Bereinigen + SpitzeKlammernSkalierbar.Click + Call Bereinigen + GeschweifteKlammernSkalierbar.Click + Call Bereinigen + EinfacheLinienSkalierbar.Click + Call Bereinigen + DoppelteLinienSkalierbar.Click + Call Bereinigen + DoppelteEckigeKlammern.Click + Call Bereinigen + EckigeKlammernSkalierbar2.Click + Call Bereinigen + GeschweifteKlammerObenSkalierbar.Click + Call Bereinigen + GeschweifteKlammerUntenSkalierbar.Click + Call Bereinigen + OperatorKlammern.Click + Call Bereinigen + OperatorKlammernSkalierbar.Click + +catch + warnlog "failed!" +endcatch + + Call hCloseDocument +endcase + +'----------------------------------------------------------- +testcase tAllFormats + dim i as integer + + PrintLog "- SelectionWindow : All Formattings" + Call hNewDocument + + Kontext "AuswahlMath" + If AuswahlMath.notexists(2) then AuswahlMath + Formatierungen.Click + Sleep 1 + Call DialogTest ( AuswahlMath, 8 ) + + i = 0 +try + NeueZeileBeginnen.Click + inc i + Printlog " i: "+i + Call Bereinigen + KleinerZwischenraum.Click + inc i + Printlog " i: "+i + Call Bereinigen + Zwischenraum.Click + inc i + Printlog " i: "+i + Call Bereinigen + SubscriptRechts.Click + inc i + Printlog " i: "+i + Call Bereinigen + VertikaleAnordnung2Elemente.Click + inc i + Printlog " i: "+i + Call Bereinigen + VertikaleAnordnung.Click + inc i + Printlog " i: "+i + Call Bereinigen + MatrixAnordnung.Click + inc i + Printlog " i: "+i + Call Bereinigen + SuperscriptRechts.Click + inc i + Printlog " i: "+i + Call Bereinigen + LinksbuendigAusrichten.Click + inc i + Printlog " i: "+i + Call Bereinigen + ZentriertHorizontalAusrichten.Click + inc i + Printlog " i: "+i + Call Bereinigen + RechtsbuendigAusrichten.Click + inc i + Printlog " i: "+i + Call Bereinigen + SubscriptLinks.Click + inc i + Printlog " i: "+i + Call Bereinigen + 'NachObenAusrichten.Click + ' Call Bereinigen + 'ZentriertVertikalAusrichten.Click + ' Call Bereinigen +' NachUntenAusrichten.Click + ' Call Bereinigen + SuperscriptLinks.Click + inc i + Printlog " i: "+i + Call Bereinigen + SuperscriptOben.Click + inc i + Printlog " i: "+i + Call Bereinigen + SuperscriptRechts.Click + inc i + Printlog " i: "+i + Call Bereinigen + SubscriptUnten.Click +catch + warnlog "failed!" +endcatch + + Call hCloseDocument +endcase + +testcase tOthers + dim i as integer + + PrintLog "- SelectionWindow : Others" + Call hNewDocument + + Kontext "SelectionMath" + If SelectionMath.notexists(2) then + ViewSelection + endif + Others.Click + Sleep 1 + Kontext "AuswahlMath" + Call DialogTest ( AuswahlMath, 9 ) + Kontext "SelectionMath" + + i = 0 +try +' there might be a problem with the new group .... :TB_Gruppen Sonstiges +' Nope, its the same as Formatierungen... + + ThereExists.Click + inc i + Printlog " i: "+i + Call Bereinigen + ForAll.Click + inc i + Printlog " i: "+i + Call Bereinigen + HBar.Click + inc i + Printlog " i: "+i + Call Bereinigen + Kontext "AuswahlMath" + Imaginaerteil.Click + inc i + Printlog " i: "+i + Call Bereinigen + LambdaQuer.Click + inc i + Printlog " i: "+i + Call Bereinigen + Nabla.Click + inc i + Printlog " i: "+i + Call Bereinigen + Partial.Click + inc i + Printlog " i: "+i + Call Bereinigen + PfeilNachLinks.Click + inc i + Printlog " i: "+i + Call Bereinigen + PfeilNachOben.Click + inc i + Printlog " i: "+i + Call Bereinigen + PfeilNachRechts.Click + inc i + Printlog " i: "+i + Call Bereinigen + PfeilNachUnten.Click + inc i + Printlog " i: "+i + Call Bereinigen + PunkteMittig.Click + inc i + Printlog " i: "+i + Call Bereinigen + PunkteNachOben.Click + inc i + Printlog " i: "+i + Call Bereinigen + PunkteUnten.Click + inc i + Printlog " i: "+i + Call Bereinigen + PunkteVertikal.Click + inc i + Printlog " i: "+i + Call Bereinigen + Realteil.Click + inc i + Printlog " i: "+i + Call Bereinigen + Unendlich.Click + inc i + Printlog " i: "+i + Call Bereinigen + WeierstrassP.Click + inc i + Printlog " i: "+i + Call Bereinigen + PunkteNachUnten.Click + inc i + Printlog " i: "+i +catch + warnlog "failed!" +endcatch + + Call hCloseDocument +endcase + +sub Bereinigen + sleep 2 +' ViewUpdate +' Sleep 2 +' EditSelectAllMath +' Wait 500 +' EditCut + Sleep 1 +end sub + diff --git a/testautomation/math/required/includes/m_020_.inc b/testautomation/math/required/includes/m_020_.inc new file mode 100755 index 000000000000..ae79e24300b2 --- /dev/null +++ b/testautomation/math/required/includes/m_020_.inc @@ -0,0 +1,72 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* Owner : thorsten.bosbach@oracle.com +'* +'* short description : +'* +'\***************************************************************** + +sub m_020_ + printlog Chr(13)+ "-- Toolbar m_020_ --" + call tMainToolbar +end sub + +testcase tMainToolbar + '/// open application ///' + Call hNewDocument + '/// type something into document ///' + SchreibenInMathdok( "a over b" ) + kontext "Toolbar" + '/// click buttons on Main Toolbar ///' + '/// click 'Zoom in' ///' + hClickButton( Vergroessern ) + '/// click 'Zoom out' ///' + hClickButton( Verkleinern ) + '/// click 'Zoom 100%' ///' + hClickButton( ZoomHundertProzent ) + '/// click 'Zoom inEntire Formula' ///' + hClickButton( GanzeFormel ) + '/// click 'Refresh' ///' + hClickButton( FormelAktualisieren ) + '/// click 'Formula Cursor' ///' + hClickButton( FormulaCursor ) + '/// click 'Symbols' ///' + hClickButton( FormelSymbole ) + kontext "SymboleMath" + if ( SymboleMath.exists( 1 ) ) then + '/// close dialog 'Symbols' ///' + hCloseDialog( SymboleMath, "close" ) + else + warnlog( "Dialog <SymboleMath> did not open" ) + endif + kontext "Toolbar" + '/// click 'Formula Cursor' ///' + hClickButton( FormulaCursor ) + '/// close application ///' + Call hCloseDocument +endcase diff --git a/testautomation/math/required/input/ShortLicense.oxt b/testautomation/math/required/input/ShortLicense.oxt Binary files differnew file mode 100755 index 000000000000..7e1998843254 --- /dev/null +++ b/testautomation/math/required/input/ShortLicense.oxt diff --git a/testautomation/math/required/input/test.odt b/testautomation/math/required/input/test.odt Binary files differnew file mode 100644 index 000000000000..6136112b3f85 --- /dev/null +++ b/testautomation/math/required/input/test.odt diff --git a/testautomation/math/required/input/unknown-dependency.oxt b/testautomation/math/required/input/unknown-dependency.oxt Binary files differnew file mode 100755 index 000000000000..7c2a22c6d5da --- /dev/null +++ b/testautomation/math/required/input/unknown-dependency.oxt diff --git a/testautomation/math/required/m_updt.bas b/testautomation/math/required/m_updt.bas new file mode 100755 index 000000000000..13d7f5ef9215 --- /dev/null +++ b/testautomation/math/required/m_updt.bas @@ -0,0 +1,81 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* Owner : thorsten.bosbach@oracle.com +'* +'* short description : Math Update Test +'* +'\***************************************************************** + +sub main + use "math\required\includes\m_001_.inc" + use "math\required\includes\m_002_.inc" + use "math\required\includes\m_003_.inc" + use "math\required\includes\m_004_.inc" + use "math\required\includes\m_005_.inc" + use "math\required\includes\m_006_.inc" + use "math\required\includes\m_007_.inc" ' help + use "math\required\includes\m_010_.inc" + use "math\required\includes\m_020_.inc" ' toolbars + use "global\required\includes\g_009.inc" + + Call hStatusIn ( "Math","m_updt.bas" ) + + PrintLog Chr(13) + " Math_Update Test " + +'/// Duration ca. 30 minutes ///' + Call M_002_ ' EditMenu + Call M_003_ ' View-Menu + Call M_004_ ' Format-Menu + Call M_005_ ' Tools Menu + Call M_006_ ' Window-Menu + Call M_007_ ' Help-Menu + Call tHelpCheckForUpdates + Call m_020_ ' toolbars + Call M_010_ ' Operators + Call M_001_ ' File Menu + Call g_printing() + Call tFileExportAsPDF + + Call hStatusOut +end sub + +'---------------------------------------------- +sub LoadIncludeFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + use "global\required\includes\g_option.inc" + use "global\required\includes\g_customize.inc" + use "global\required\includes\g_001.inc" + use "global\required\includes\g_009.inc" + use "global\required\includes\g_printing.inc" + use "global\tools\includes\optional\t_ui_filters.inc" ' for gMathFilter in m_001_.inc + use "global\tools\includes\optional\t_docfuncs.inc" + use "global\tools\includes\optional\t_control_objects.inc" + gApplication = "MATH" + Call GetUseFiles +end sub |