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 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : gregor.hartmann@oracle.com
30 '* short description : Updatetest for the first time wizard
32 '\******************************************************************************
34 testcase tUpdtWizardFirsttime
36 printlog( "Resource test for the first start wizard" )
39 dim cFirstName as string
40 dim cLastName as string
41 dim cInitials as string
47 dim cQuickstarterPath as string
48 cQuickStarterPath = gNetzOfficePath & "program\quickstart.exe"
53 printlog( "Open the Wizard" )
56 ' give the wizard a maximum of 2 seconds to open, it's a serve-url and
57 ' should open almost instantly
58 kontext "WelcomeDialog"
59 if ( WelcomeDialog.exists( 2 ) ) then
60 printlog( "The Wizard is open" )
61 call dialogtest( WelcomeDialog )
63 printlog( "click 'next'")
67 printlog( "Check the license page" )
68 kontext "TabFirstStartLicense"
69 if ( TabFirstStartLicense.exists( 2 ) ) then
70 printlog( "License page is visible" )
71 call dialogtest( TabFirstStartLicense )
74 printlog( "scroll down (button!) the licensetext to enable the >>-button" )
77 kontext "TabFirstStartLicense"
78 if ( ScrollDown.isEnabled( 1 ) ) then
81 kontext "WelcomeDialog"
82 if ( NextBtn.isEnabled() ) then
83 printlog( "Needed " & iClick & " clicks on 'scroll down' " )
86 warnlog( "Both Scroll-button and Next-button are disabled" )
94 kontext "WelcomeDialog"
95 if ( WelcomeDialog.exists( 2 ) ) then
98 warnlog( "Cannot access welcome dialog" )
104 printlog( "Handle Data-Migration page" )
105 kontext "TabPersonalDataMigration"
106 if ( TabPersonalDataMigration.exists( 2 ) ) then
107 call dialogtest( TabPersonalDataMigration )
108 printlog( "The data migration page is visible" )
109 TransferPersonalData.uncheck()
110 kontext "WelcomeDialog"
116 printlog( "The personal data page should show up" )
117 Kontext "TabFirstStartUser"
118 if ( TabFirstStartUser.exists( 2 ) ) then
120 call dialogtest( TabFirstStartUser )
122 Kontext "TabFirstStartUser"
123 printlog( "Enter lastname, name and initials" )
124 FirstName.setText( cFirstname )
125 LastName.setText( cLastName )
126 Initials.setText( cInitials )
128 kontext "WelcomeDialog"
131 warnlog( "Could not access TabFirstStartUser" )
134 if (gAutoUpdate) then
135 kontext "TabFirstStartOnlineUpdate"
136 if ( TabFirstStartOnlineUpdate.exists( 2 ) ) then
137 call dialogtest( TabFirstStartOnlineUpdate )
138 CheckForUpdates.unCheck()
139 kontext "WelcomeDialog"
142 warnlog( "Online Update Page is missing" )
145 qaErrorlog( "Online Update Page is missing" )
149 Kontext "TabFirstStartRegistration"
150 if ( TabFirstStartRegistration.exists( 3 ) ) then
151 printlog( "Registration page visible." )
153 qaerrorlog( "An additional page appears on rerun of wizard" )
154 kontext "WelcomeDialog"
158 printlog( "Registration page: " )
159 Kontext "TabFirstStartRegistration"
160 if ( TabFirstStartRegistration.exists( 2 ) ) then
161 printlog( "Page is present." )
162 call dialogtest( TabFirstStartRegistration )
163 printlog( "Choose not to register" )
164 DoNotWantRegister.check()
166 printlog( "close the wizard" )
167 kontext "WelcomeDialog"
171 printlog( "Verify that the userdata made it to tools/options" )
173 hToolsOptions( "StarOffice" , "UserData" )
175 if ( Vorname.getText() <> cFirstname ) then
176 warnlog( "First name is not transferred to Tools/options/userdata" )
179 if ( ZuName.getText() <> cLastName ) then
180 warnlog( "Last name is not transferred to Tools/options/userdata" )
183 if ( Kuerzel.getText() <> cInitials ) then
184 warnlog( "Initials are not transferred to Tools/options/userdata" )
187 hToolsOptions( "StarOffice", "Memory" )
189 if ( LoadQuickstarter.exists() ) then
190 if ( LoadQuickstarter.isEnabled() ) then
191 printlog( "Quickstarter checkbox is enabled" )
192 if ( LoadQuickstarter.isChecked() ) then
193 printlog( "Quickstart is activated, turning it off." )
194 LoadQuickstarter.unCheck()
195 printlog( "Closing Tools/Options" )
196 Kontext "OptionenDlg"
197 hCloseDialog( OptionenDlg, "cancel" )
198 printlog( "Restarting program" )
199 call ExitRestartTheOffice()
201 printlog( "Quickstarter is not turned on." )
204 printlog( "Quickstarter checkbox is not enabled for this system" )
207 if ( gPlatGroup <> "unx" ) then
208 if ( dir( cQuickStarterPath ) <> "" ) then
209 warnlog( "Quickstarter checkbox is missing on options page" )
211 printlog( "Quickstarter is not installed/no checkbox present" )
216 Kontext "OptionenDlg"
217 hCloseDialog( OptionenDlg, "cancel, optional" )
219 ' due to issue i105248 the Quickstart disabler needs to get called again, because the First Start Wizard resets the veto
220 call hDisableQuickstarterAPI()