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: wizard_firsttime.inc,v $
13 '* last change: $Author: rt $ $Date: 2008-08-01 09:48:30 $
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 : Updatetest for the first time wizard
38 '\******************************************************************************
40 testcase tUpdtWizardFirsttime
42 '///<h1>Updatetest for the First-Time / Migration-Wizard</h1>
45 dim cFirstName as string
46 dim cLastName as string
47 dim cInitials as string
53 dim cQuickstarterPath as string
54 cQuickStarterPath = gNetzOfficePath & "program\quickstart.exe"
58 '///+<li>Make sure exactly one single writer document is open</li>
61 '///+<li>Open the wizard</li>
62 printlog( "Open the Wizard" )
65 ' give the wizard a maximum of 2 seconds to open, it's a serve-url and
66 ' should open almost instantly
67 kontext "WelcomeDialog"
68 if ( WelcomeDialog.exists( 2 ) ) then
69 printlog( "The Wizard is open" )
70 call dialogtest( WelcomeDialog )
72 '///+<li>Click the 'next' button to get to the second page</li>
73 printlog( "click 'next'")
81 '///+<li>Check the license page</li>
82 printlog( "Check the license page" )
83 kontext "TabFirstStartLicense"
84 if ( TabFirstStartLicense.exists( 2 ) ) then
85 printlog( "License page is visible" )
86 call dialogtest( TabFirstStartLicense )
89 '///+<li>Enable the next-button by 'reading' the licensetext</li>
90 printlog( "scroll down (button!) the licensetext to enable the >>-button" )
93 kontext "TabFirstStartLicense"
94 if ( ScrollDown.isEnabled( 1 ) ) then
97 kontext "WelcomeDialog"
98 if ( NextBtn.isEnabled() ) then
99 printlog( "Needed " & iClick & " clicks on 'scroll down' " )
102 warnlog( "Both Scroll-button and Next-button are disabled" )
110 kontext "WelcomeDialog"
111 if ( WelcomeDialog.exists( 2 ) ) then
114 warnlog( "Cannot access welcome dialog" )
120 '///+<li>Data Migration Page</li>
121 printlog( "Handle Data-Migration page" )
122 kontext "TabPersonalDataMigration"
123 if ( TabPersonalDataMigration.exists( 2 ) ) then
124 call dialogtest( TabPersonalDataMigration )
125 printlog( "The data migration page is visible" )
126 TransferPersonalData.uncheck()
127 '///+<li>Click the 'next' button to get to the next page</li>
128 kontext "WelcomeDialog"
134 '///+<li>Page to enter personal data</li>
135 printlog( "The personal data page should show up" )
136 Kontext "TabFirstStartUser"
137 if ( TabFirstStartUser.exists( 2 ) ) then
139 call dialogtest( TabFirstStartUser )
141 Kontext "TabFirstStartUser"
142 printlog( "Enter lastname, name and initials" )
143 FirstName.setText( cFirstname )
144 LastName.setText( cLastName )
145 Initials.setText( cInitials )
147 kontext "WelcomeDialog"
150 warnlog( "Could not access TabFirstStartUser" )
153 kontext "TabFirstStartOnlineUpdate"
154 if ( TabFirstStartOnlineUpdate.exists( 2 ) ) then
155 call dialogtest( TabFirstStartOnlineUpdate )
156 CheckForUpdates.unCheck()
157 kontext "WelcomeDialog"
160 warnlog( "Online Update Page is missing" )
164 '///+<li>Handle the welcome Dialog - Internet Update page which should NOT appear</li>
165 Kontext "TabFirstStartRegistration"
166 if ( TabFirstStartRegistration.exists( 3 ) ) then
167 printlog( "Registration page visible." )
169 qaerrorlog( "An additional page appears on rerun of wizard" )
170 kontext "WelcomeDialog"
174 '///+<li>Last page: Registration. Choose not to register</li>
175 printlog( "Registration page: " )
176 Kontext "TabFirstStartRegistration"
177 if ( TabFirstStartRegistration.exists( 2 ) ) then
178 printlog( "Page is present." )
179 call dialogtest( TabFirstStartRegistration )
180 printlog( "Choose not to register" )
181 DoNotWantRegister.check()
183 '///+<li>Finally close the wizard</li>
184 printlog( "close the wizard" )
185 kontext "WelcomeDialog"
189 '///+<li>Verify that the data made it into tools/options instantly</li>
191 printlog( "Verify that the userdata made it to tools/options" )
193 hToolsOptions( "StarOffice" , "UserData" )
195 '///+<li>First name</li>
196 if ( Vorname.getText() <> cFirstname ) then
197 warnlog( "First name is not transferred to Tools/options/userdata" )
200 '///+<li>Last name</li>
201 if ( ZuName.getText() <> cLastName ) then
202 warnlog( "Last name is not transferred to Tools/options/userdata" )
205 '///+<li>Initials</li>
206 if ( Kuerzel.getText() <> cInitials ) then
207 warnlog( "Initials are not transferred to Tools/options/userdata" )
210 '///+<li>Go to the OpenOffice.org / Memory page</li>
211 hToolsOptions( "StarOffice", "Memory" )
213 if ( LoadQuickstarter.exists() ) then
214 if ( LoadQuickstarter.isEnabled() ) then
215 printlog( "Quickstarter checkbox is enabled" )
216 if ( LoadQuickstarter.isChecked() ) then
217 printlog( "Quickstart is activated, turning it off." )
218 LoadQuickstarter.unCheck()
219 printlog( "Closing Tools/Options" )
220 Kontext "OptionenDlg"
222 printlog( "Restarting program" )
223 call ExitRestartTheOffice()
225 printlog( "Quickstarter is not turned on." )
228 printlog( "Quickstarter checkbox is not enabled for this system" )
231 if ( gPlatGroup <> "unx" ) then
232 if ( dir( cQuickStarterPath ) <> "" ) then
233 warnlog( "Quickstarter checkbox is missing on options page" )
235 printlog( "Quickstarter is not installed/no checkbox present" )
241 Kontext "OptionenDlg"
242 if ( OptionenDlg.exists() ) then
246 ' due to issue i105248 the Quickstart disabler needs to get called again, because the First Start Wizard resets the veto
247 call hDisableQuickstarterAPI()
249 do while( getDocumentCount() > 0 )
250 call hCloseDocument()