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: wiz_QueryWizard.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 07:43:42 $
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 : marc.neumann@sun.com
36 '* short description : Query Autopilot Test
37 '* preconditions : Adabas has to be installed on the test machine
39 '* testpurpose : Test for the query wizard
41 '\***********************************************************************
46 if fCreateDbaseDatasource(gOfficePath + ConvertPath("user/work/tt_dbase-01.odb"),gOfficePath + ConvertPath("user/database/biblio")) then
47 call tQueryAutopilotMain
49 qaerrorlog "can't create dBase datasource. Stop Test"
52 app.FileCopy gTesttoolPath + ConvertPath("dbaccess/optional/input/hsql_datasource/TT_hsqldb.odb"),gOfficePath + ConvertPath("user/work/TT_hsqldb.odb")
53 call tQueryAutopilotTest1
54 call tQueryAutopilotTest2
57 '-------------------------------------------------------------------------
58 testcase tQueryAutopilotMain
60 if not fOpendatabase(gOfficePath + ConvertPath("user/work/tt_dbase-01.odb")) then
61 warnlog "Database " +gOfficePath + ConvertPath("user/work/tt_dbase-01.odb") + " could not be open."
65 if not fStartQueryWizard() then
66 warnlog "The Query Wizard could not be start."
71 '/// select the first table (biblio)
72 printlog "select the first table (biblio)"
75 '/// add the third field
76 printlog "add the third field"
77 AvailableFields.select 3
98 printlog "click FINISH"
102 Kontext "DatabaseBeamer"
103 DatabaseBeamer.UseMenu
104 call hMenuSelectnr(1)
105 call hMenuSelectnr(4)
108 call fCloseDatabase(true)
111 '----------------------------------------------------------
112 testcase tQueryAutopilotTest1
114 if not fOpendatabase(gOfficePath + ConvertPath("user/work/TT_hsqldb.odb")) then
115 warnlog "Database " + gOfficePath + ConvertPath("user/work/TT_hsqldb.odb") + " could not be open."
119 if not fStartQueryWizard() then
120 warnlog "The Query Wizard could not be start."
124 Kontext "QueryWizard"
125 '/// select the table TT_QueryAutopilot
126 printlog "select the table TT_QueryAutopilot"
129 '/// add the third field
130 printlog "add the 1. and 4. field"
131 AvailableFields.select 1
135 AvailableFields.select 4
140 printlog "click NEXT"
144 printlog "click NEXT"
148 printlog "click NEXT"
152 printlog "click NEXT"
156 printlog "click FINISH"
160 Kontext "DatabaseBeamer"
163 call fClosedatabase(true)
166 '----------------------------------------------------------
167 testcase tQueryAutopilotTest2
169 if not fOpendatabase(gOfficePath + ConvertPath("user/work/TT_hsqldb.odb")) then
170 warnlog "Database " + gOfficePath + ConvertPath("user/work/TT_hsqldb.odb") + " could not be open."
174 if not fStartQueryWizard() then
175 warnlog "The Query Wizard could not be start."
179 Kontext "QueryWizard"
180 '/// select the table TT_QueryAutopilot
181 printlog "select the table TT_QueryAutopilot"
184 '/// add the third field
185 printlog "add the 1. field"
186 AvailableFields.select 1
190 '/// click NEXT to Sorting page
191 printlog "click NEXT to Sorting page"
194 '/// click NEXT to Search page
195 printlog "click NEXT to Search page"
198 '/// click NEXT to summary query page
199 printlog "click NEXT to summary query page"
205 'AggregatFunction1.select 1
207 'AggregatField1.select 1
210 QueryWizard.TypeKeys "<SHIFT TAB>" , true
212 QueryWizard.TypeKeys "<SHIFT TAB>" , true
214 QueryWizard.TypeKeys "<DOWN>" , true
216 QueryWizard.TypeKeys "<TAB>" , true
218 QueryWizard.TypeKeys "<DOWN>" , true
221 '/// click NEXT to alias page
222 printlog "click NEXT to group alias page"
225 '/// click NEXT to final page
226 printlog "click NEXT to final page"
230 printlog "click FINISH"
234 Kontext "DatabaseBeamer"
237 call fClosedatabase(true)