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_macroassignment.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 some dialogs in Basic-IDE
38 '\******************************************************************************
40 testcase tUpdtMacroAssignment
42 '///<H1>Update test for some dialogs in Basic-IDE</H1>
47 '///+<li>Create a new document</li>
50 printlog( "Create a new BASIC-module for this document" )
52 '///+<li>Open the Basic organizer</li>
53 brc = hOpenBasicOrganizerFromDoc()
55 '///+<li>Create a new module for the current document -> Basic IDE</li>
56 brc = hCreateModuleForDoc( "tUpdtBasicIde" )
58 warnlog( "Failed to create a new BASIC module for this document" )
59 brc = hDestroyDocument()
63 '///+<li>Create a new Basic dialog</li>
64 printlog( "Create a new BASIC-dialog" )
67 warnlog( "Failed to create a new BASIC-dialog" )
69 brc = hDestroyDocument()
73 '///+<li>Select the empty dialogpane in the dialog editor</li>
74 printlog( "Select the Dialog-Pane from the DialogWindow" )
75 brc = hSelectDialogPane()
77 warnlog( "Selecting failed: ToolsCollectionBar is in the way." )
81 '///+<li>Open the ToolsCollectionBar (Basic controls)</li>
82 printlog( "Show ToolsCollectionBar" )
83 brc = hShowMacroControls()
85 warnlog( "ToolsCollectionBar is not open" )
88 '///+<li>Open the Property Browser (Properties page)</li>
89 printlog( "Open the Property-Browser: TabGeneralControl" )
90 brc = hOpenPropertyBrowser()
92 call dialogtest( TabGeneralControl )
94 warnlog( "Property-Browser is not open, skipping further testing" )
97 '///+<li>Switch to the Events Page</li>
99 brc = hSetPBTabPage( 2 )
104 printlog( "Current Dialog: Property-Browser / Events-Page" )
105 call dialogtest( TabEventsControl )
107 '///+<li>Click on the button for the Focus-Gained event</li>
108 Kontext "TabEventsControl"
109 printlog( "Click the button for the FocusGained-Event" )
111 PBFocusGained.click()
113 warnlog( "#i64196# - Events missing on properties tab-page" )
117 '///+<li>Click the Assign button on the Assign Macro dialog</li>
118 Kontext "AssignMacro"
119 printlog( "Current Dialog: Assign Macro" )
120 call dialogtest( AssignMacro )
121 printlog( "Click the Assign-Button on the Macro-Assignment-Dialog" )
124 '///+<li>Close the ScriptSelector with Cancel</li>
125 Kontext "ScriptSelector"
126 printlog( "Current Dialog: ScriptSelector" )
127 call dialogtest( ScriptSelector )
128 printlog( "Cancel the scriptselector" )
129 ScriptSelector.cancel()
131 '///+<li>Close the Assign Macro dialog with Cacnel</li>
132 Kontext "AssignMacro"
133 printlog( "Current Dialog: Assign Macro" )
134 printlog( "Cancel the Script-Assignement-Dialog" )
141 '///+<li>Close the Property Browser</li>
142 printlog( "Current Dialog: Property-Browser" )
143 printlog( "Close the Property-Browser, return to the document" )
144 brc = hClosePropertyBrowser()
146 '///+<li>Close the Basic IDE</li>
147 brc = hCloseBasicIde()
151 '///+<li>Close the document</li>
152 brc = hDestroyDocument()