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: c_so7_pp1_ibis.inc,v $
13 '* last change: $Author: rt $ $Date: 2008-07-31 19:03:38 $
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 : oliver.craemer@Sun.COM
36 '** short description : Test IBIS bug fixes
38 '************************************************************************
40 ' #1 tIBIS111099 ' Disable design mode of form controls after loading excel file
41 ' #1 tIBIS111158 ' Lost properties of form controls
42 ' #1 tIBIS111711 ' Crash when deleting chart in Menu->Window->New Window
44 '\***********************************************************************
49 testdoc = convertpath(gOfficePath & "user/work/111099.xls")
50 Printlog "Copy testdocument locally"
51 app.FileCopy convertpath(gTesttoolpath & "spreadsheet\optional\input\111099.xls"),gOfficePath + ConvertPath("user/work/111099.xls")
52 printlog " Open the test document"
53 Call hFileOpen(testdoc)
54 Call sMakeReadOnlyDocumentEditable
55 '/// Invoke Control Toolbar
56 '///+ Try to click control 'Push Button'
57 '///+> <ul><li>Click successful - BUG #111099#</li>
58 '///+ <li>Click fails - document opened as expected in non-design mode</li>
59 Call hToolbarSelect("CONTROLS", true)
61 Kontext "FormControls"
62 if SwitchControlDesignMode.IsEnabled then
63 if SwitchControlDesignMode.getState(2) = 0 then
64 printlog "OK, design mode is disabled"
66 warnlog "Document is opened in design mode -> #111099#"
69 printlog "Form controls toolbar was not enabled."
74 '-------------------------------------------------------------------------
79 Dim testString as string
80 testdoc = convertpath(gOfficePath & "user/work/111158.xls")
82 Printlog "Copy testdocument locally"
83 app.FileCopy convertpath(gTesttoolpath & "spreadsheet\optional\input\111158.xls"),gOfficePath + ConvertPath("user/work/111158.xls")
84 printlog " Open the test document"
85 Call hFileOpen(testdoc)
86 Call sMakeReadOnlyDocumentEditable
88 '/// If 'Form Controls' toolbar is not visible: View / Toolbars / Form Controls
89 Call hToolbarSelect("CONTROLS", true)
91 Kontext "FormControls"
93 if SwitchControlDesignMode.IsEnabled then
94 '/// Click on 'Design Mode on/off' button on 'Form Controls'-toolbar
95 SwitchControlDesignMode.click
97 '/// Click on 'Form Design' button on 'Form Controls'-toolbar
101 printlog "Form controls toolbar was not enabled."
104 QAErrorlog "Document is opened in design mode -> #111099#"
105 QAErrorlog "No need to test if that one isn't fixed -> aborted"
110 Kontext "FormDesignTools"
111 if FormDesignTools.Exists(2) then
112 If ShowFmExplorer.IsEnabled then
113 '/// Show Form Navigator
116 warnlog "Button was not enabled!"
119 warnlog "'Form Design'-toolbar did not come up."
124 '/// Select the first 'ComboxBox' (9th entry from the top)
125 '/// Open context menu
126 Kontext "FormularNavigator"
127 Liste.TypeKeys "<HOME>" , true
129 Liste.TypeKeys "<DOWN>" , 9 , true
131 Liste.OpenContextmenu
133 '/// Open 'Properties' (last entry)
136 Kontext "ControlPropertiesDialog"
137 Kontext "ControlPropertiesTabControl"
138 ControlPropertiesTabControl.SetPage TabGeneralControl
139 Kontext "TabGeneralControl"
140 '/// Enter in 'Help URL' as value exactly 'HID:123456'
141 TabGeneralControl.TypeKeys "<TAB>" , true
142 HelpURL.setText "HID:123456"
143 HelpURL.TypeKeys "<RETURN>",true
144 if HelpURL.GetText <> "HID:123456" then
145 warnlog "'HID:123456' has not been accepted as 'Help URL' value."
147 '/// Close all disturbing menus
148 Kontext "ControlPropertiesDialog"
150 ControlPropertiesDialog.close
152 Kontext "FormularNavigator"
153 FormularNavigator.close
154 Kontext "FormDesignTools"
155 FormDesignTools.close
156 Kontext "FormControls"
157 '/// Switch back from the design mode
158 SwitchControlDesignMode.click
161 '/// Check for right initial string ('Please select one:')in control
162 Kontext "MSC_Special_Dialog"
163 if MSC_Special_Dialog.Exists(3) then
164 testString = MSC_Special_Dialog.getSelText
165 if testString = "Please select one:" then
166 printlog "OK, the right string was found in control"
168 warnlog "Wrong string found in Control: " & testString
171 warnlog "The control seems to be not named in the document?! Verify! If Solaris: #i100870#"
176 '-------------------------------------------------------------------------
179 printlog "iBIS Task 111711"
181 printlog " Create a new document"
183 printlog " Enter some numbers as content"
184 Kontext "DocumentCalc"
185 DocumentCalc.typekeys "1<RETURN>2<RETURN><UP>"
188 '/// create a chart from the content
189 '/// + NOTE: Do NOT leave the Implace mode
191 '/// The Chart wizard occours
192 Kontext "ChartWizard"
193 '/// On the chart wizard press OK button
194 if ChartWizard.Exists(2) then
195 printlog "Create chart"
199 warnlog "Chart wizard did not occour! Exiting test case."
203 '/// Call slot Window->New Window
204 Kontext "DocumentCalc"
205 DocumentCalc.typekeys "<ESCAPE>"
208 call gMouseClick(95,95)
210 '/// Select chart in new window
211 Kontext "DocumentCalc"
215 '/// Delete chart in new window ...
216 '/// ... and check for crash
217 Kontext "DocumentCalc"
219 DocumentCalc.typekeys "<DELETE>"
221 printlog "OK, there are still " & GetDocumentCount & " documents open"
223 warnlog "Probably the office did crash -> #111711#"