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: basic_organizer.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:19:03 $
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 : joerg.skottke@sun.com
36 '* short description : Update test for the Basic Organizer dialog
38 '\******************************************************************************
40 testcase tUpdtBasicOrganizer
42 '///<H1>Update test for the Basic organizer and its dialogs</H1>
45 dim cTempString as string
46 const TESTLIB = "zzzz"
48 '///+<li>Open a new document</li>
49 printlog( "Open a new document" )
52 '///+<li>Open the Basic Macro-Organizer</li>
53 printlog( "Open the Basic Macro Organizer" )
57 if ( not makro.exists() ) then
58 warnlog( "Macro Organizer is not open, aborting test" )
59 brc = hDestroyDocument()
62 printlog( "Successfully opened the MacroOrganizer" )
65 '///+<li>Open the Libraries/Modules/Dialogs-Organizer</li>
67 printlog( "Click <Organizer> to open the library/modules organizer" )
68 if ( Verwalten.isEnabled() ) then
71 warnlog( "Cannot click the <Organize...> button" )
74 ' Try to recover from previous error
76 if ( not TabModule.exists() ) then
77 printlog( "TabModule is not open, the test cannot continue" )
80 brc = hDestroyDocument()
84 '///+<li>Open all dialogs on the Modules-Page</li>
87 active.setPage TabModule
90 printlog( "Modules Tab" )
91 call DialogTest( TabModule )
93 '///+<li>Select first item in modules list</li>
94 Modulliste.typeKeys( "<HOME>" )
96 '///+<li>Click to add a new module, cancel the dialog</li>
97 printlog( "New Modules-dialog" )
100 call DialogTest( NeuesModul )
103 warnlog( "There is a problem accessing the NewModule-dialog" )
107 '///+<li>Open all dialogs on the Dialogs-Page</li>
110 active.setPage( TabDialogs )
113 printlog( "Dialogs Tab" )
114 call DialogTest( TabDialogs )
116 '///+<li>Select first item in dialogs list</li>
117 ModuleList.typeKeys( "<HOME>" )
120 '///+<li>Click to add a new dialog, cancel the dialog</li>
121 printlog( "New Libraries-dialog" )
123 kontext "NeuerDialog"
124 call DialogTest( NeuerDialog )
127 warnlog( "There is a problem accessing the NewModule-dialog" )
131 '///+<li>Open all dialogs on the Libraries-Page</li>
134 active.setPage( TabBibliotheken )
136 Kontext "TabBibliotheken"
137 printlog( "Libraries Tab" )
138 call DialogTest( TabBibliotheken )
140 '///+<li>Select first item in libraries list</li>
141 Bibliotheksliste.typeKeys( "<HOME>" )
143 kontext "TabBibliotheken"
144 '///+<li>Click to add a new library, name it "zzzz", click OK<br>
145 '/// Note that the library should be selected (the last in the list)</li>
147 if ( neu.isEnabled() ) then
148 printlog( "New Library dialog" )
150 kontext "NeueBibliothek"
151 call DialogTest( NeueBibliothek )
152 Bibliotheksname.setText( "zzzz" )
155 warnlog( "There is a problem accessing the New Libraries dialog" )
158 kontext "TabBibliotheken"
159 '///+<li>Try to create a library of same name again:<br>
160 '///+ Click to add a new library, name it "zzzz", click OK<br>
161 '///+ Click away the messagebox (A library of same name already exists)</li>
162 if ( neu.isEnabled() ) then
164 printlog( "New Library dialog" )
166 kontext "NeueBibliothek"
167 call DialogTest( NeueBibliothek )
168 Bibliotheksname.setText( "zzzz" )
171 warnlog( "There is a problem accessing the New Libraries dialog" )
175 if ( active.exists() ) then
176 printlog( "Closing warning" )
179 warnlog( "Warning missing for duplicate library name" )
182 kontext "TabBibliotheken"
183 '///+<li>Click "Export..."</li>
184 printlog( "Export the package" )
187 kontext "ExportBasicLibraryDlg"
188 '///+<li>Check "Export as package", click OK</li>
189 printlog( "Export as package, click OK" )
190 ExportAsPackage.check()
191 ExportBasicLibraryDlg.ok()
193 kontext "SpeichernDlg"
194 '///+<li>Cancel the FileSave dialog</li>
195 printlog( "Cancel FileSave dialog" )
196 SpeichernDlg.cancel()
198 kontext "TabBibliotheken"
199 '///+<li>Click "Export..."</li>
200 printlog( "Export the package" )
203 kontext "ExportBasicLibraryDlg"
204 '///+<li>Check "Export as library", click OK</li>
205 printlog( "Export as library, click OK" )
206 ExportAsLibrary.check()
207 ExportBasicLibraryDlg.ok()
210 '///+<li>Cancel the FileOpen dialog</li>
211 printlog( "Cancel FileOpen dialog" )
214 kontext "TabBibliotheken"
215 if ( passwort.isEnabled() ) then
216 '///+<li>Click to set a password, cancel the dialog</li>
217 printlog( "Password-Dialog" )
222 warnlog( "There is a problem accessing the Passwords-dialog" )
225 kontext "TabBibliotheken"
226 '///+<li>Click "Delete", accept with yes</li>
227 printlog( "Try to delete the library" )
229 cTempString = BibliotheksListe.getSelText()
230 if ( cTempString = "zzzz" ) then
236 warnlog( "Could not delete the library, name is incorrect: " & cTempString )
239 Kontext "TabBibliotheken"
242 '///+<li>Click "Append", cancel dialog</li>
243 printlog( "Append a new library" )
246 call DialogTest( OeffnenDlg )
249 warnlog( "There is a problem appending a new library" )
252 Kontext "TabBibliotheken"
255 '///+<li>Close the Library/Modules/Dialogs-Organizer</li>
256 printlog( "Cancel library/modules/dialogs organizer" )
257 TabBibliotheken.cancel()
259 '///+<li>Close the Macro-Organizer</li>
260 printlog( "Cancel Macro Organizer" )
264 '///+<li>Close the document</li>
265 printlog( "Close the document" )
266 brc = hDestroyDocument()