1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: m_005_.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 11:51:23 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* Owner : thorsten.bosbach@sun.com
36 '* short description :
38 '\*****************************************************************
41 printlog Chr(13) + "-- Tools Menu m_005_ --"
44 Call tToolsImportFormula
46 Call tToolsExtensionManager
48 Call tToolsCustomize 'global one ! TBO
49 Call tToolsOptionstest ' global one ! TZ
52 testcase tToolsCatalog
53 '/// open application ///'
55 '/// Tools->Catalog ///'
58 Call Dialogtest (SymboleMath)
59 printlog "count of 'Symbol set' :" + Symbolset.GetItemCount
60 '/// click button 'Edit...' ///'
63 Call DialogTest (EditSymbols)
64 OldSymbol.GetItemCount
65 OldSymbolSet.GetItemCount
67 SymbolSet.GetItemCount
70 '/// select last item in listbox 'Font' ///'
71 Font.Select (Font.GetItemCount)
73 '/// Click Button 'Modify' ///'
76 '/// Click Button 'Delete' ///'
79 '/// Click Button 'Add' ///'
82 '/// cancel dialog 'Edit Symbols' ///'
85 '/// click button 'Insert' ///'
88 '/// close dialog 'Symbols' ///'
90 '/// close application ///'
94 testcase tToolsImportFormula
95 '/// open application ///'
98 '/// Tools->Import->Formula ///'
102 UebergeordneterOrdner.Click
104 Call DialogTest ( OeffnenDlg )
105 '/// cancel dialog 'Insert' ///'
108 '/// close application ///'
112 testcase tiToolsMacro
113 '/// open application ///'
116 '/// try to call Tools->Macros...->Record Macro => this has to fail, it is only aloowed from writer and Calc ///'
118 ToolsMacroRecordMacro
119 Warnlog "I can record macros in this application :-("
121 Printlog "i can't record macros in this application :-)"
123 '/// Tools->Macro ///'
126 Call DialogTest ( Makro )
127 '/// click button 'organizer...' ///'
131 '/// switch to tabpage 'Modules' ///'
132 Messagebox.SetPage TabModule
134 Call DialogTest ( TabModule )
137 '/// switch to tabpage 'Libraries' ///'
138 Messagebox.SetPage TabBibliotheken
139 Kontext "TabBibliotheken"
140 Call DialogTest ( TabBibliotheken )
141 '/// click lbutton 'append' ///'
144 if Messagebox.Exists (5) then
145 if Messagebox.GetRT = 304 then
146 Warnlog Messagebox.Gettext
151 '/// cancel dialog 'append libraries' ///'
153 Kontext "TabBibliotheken"
154 '/// click button 'new' ///'
156 kontext "NeueBibliothek"
157 sleep 1 'Bibliotheksname
158 '/// cancel dialog 'new library' ///'
159 NeueBibliothek.cancel
160 Kontext "TabBibliotheken"
161 '/// close dialog 'macro organizer' ///'
162 TabBibliotheken.Close
165 '/// close dialog 'macro' ///'
167 '/// close application ///'
171 testcase tToolsExtensionManager
177 sPath = convertPath(gTestToolPath+"math/required/input/")
178 '/// open application ///'
181 '/// call Tools - Package/Extension manager ///'
183 kontext "PackageManager"
184 If PackageManager.exists(10) then
185 DialogTest(PackageManager)
186 '/// going to top of package list and explode every line, until the button 'Add' is enabled ///'
187 '/// should be 'My Packages' ///'
188 BrowsePackages.typeKeys("<home>")
189 if (Not Add.isEnabled) then
190 warnlog "Couldn't find a way to enable the Add button - aborting"
193 '/// click button 'Add' ///'
195 '/// Add Package(s)... dialg comes up ///'
197 if OeffnenDlg.exists(5) then
198 '/// put filename into field ///'
199 Dateiname.setText (sPath + "unknown-dependency.oxt")
200 '/// press button 'Open' ///'
203 warnlog "Add Package(s)... dialog didn't came up"
206 'Asking for whom to install; All: YES, Me: NO, nobody: Cancel
208 if active.exists(5) then
209 sTemp = active.getText
217 '/// Progress dialog comes up ///'
218 Kontext "AddingPackages"
219 if AddingPackages.exists(1) then
220 printlog " - AddingPackages dialog exists"
221 DialogTest(AddingPackages)
224 '/// If any error happens, an active comes up, telling what is wrong ///'
226 if active.exists(5) then
227 sTemp = active.getText
232 '/// If there are any unsatisfied dependencies, they are shown now ///'
233 Kontext "UnsatisfiedDependencies"
234 if UnsatisfiedDependencies.exists(10) then
235 printlog " - UnsatisfiedDependencies dialog exists"
236 DialogTest(UnsatisfiedDependencies)
237 '/// close dialog if available, extension will not be installed ///'
238 UnsatisfiedDependencies.ok
241 Kontext "AddingPackages"
243 while AddingPackages.exists(1) AND (x<6)
244 printlog "AddingPackages..."
249 kontext "PackageManager"
251 '/// Add Package(s)... dialg comes up ///'
253 if OeffnenDlg.exists(5) then
254 '/// put filename into field ///'
255 Dateiname.setText (sPath + "ShortLicense.oxt")
256 '/// press button 'Open' ///'
259 warnlog "Add Package(s)... dialog didn't came up"
262 'Asking for whom to install; All: YES, Me: NO, nobody: Cancel
264 if active.exists(5) then
265 sTemp = active.getText
273 '/// Progress dialog comes up ///'
274 Kontext "AddingPackages"
275 if AddingPackages.exists(1) then
276 printlog " - AddingPackages dialog exists"
279 '/// If any error happens, an active comes up, telling what is wrong ///'
281 if active.exists(5) then
282 sTemp = active.getText
287 '/// If there is a license, it is shown now ///'
288 Kontext "ExtensionSoftwareLicenseAgreement"
289 if ExtensionSoftwareLicenseAgreement.exists(10) then
290 DialogTest (ExtensionSoftwareLicenseAgreement)
291 printlog " - ExtensionSoftwareLicenseAgreement dialog exists"
292 ExtensionSoftwareLicenseAgreement.CANCEL
294 if active.exists(5) then
295 qaerrorlog "#i73307# Alzheimer feature extension licensing '" + active.getText + "'"
300 Kontext "AddingPackages"
302 while AddingPackages.exists(1) AND (x<6)
303 printlog "AddingPackages..."
308 '/// Close extension manager ///'
309 kontext "PackageManager"
312 warnlog "Couldn't call Tools -> Package manager - aborting test"