blob: 63c79966b41ecfac0238fb806c668c0242c329f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' Copyright 2000, 2010 Oracle and/or its affiliates.
'
' OpenOffice.org - a multi-platform office productivity suite
'
' This file is part of OpenOffice.org.
'
' OpenOffice.org is free software: you can redistribute it and/or modify
' it under the terms of the GNU Lesser General Public License version 3
' only, as published by the Free Software Foundation.
'
' OpenOffice.org is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU Lesser General Public License version 3 for more details
' (a copy is included in the LICENSE file that accompanied this code).
'
' You should have received a copy of the GNU Lesser General Public License
' version 3 along with OpenOffice.org. If not, see
' <http://www.openoffice.org/license.html>
' for a copy of the LGPLv3 License.
'
'/************************************************************************
'*
'* owner : joerg.skottke@oracle.com
'*
'* short description : Updatetest for the first time wizard
'*
'\******************************************************************************
testcase tUpdtWizardFirsttime
printlog( "Resource test for the first start wizard" )
dim iClick as integer
dim cFirstName as string
dim cLastName as string
dim cInitials as string
cFirstName = "Tom"
cLastName = "Cat"
cInitials = "TC"
dim cQuickstarterPath as string
cQuickStarterPath = gNetzOfficePath & "program\quickstart.exe"
hInitSingleDoc()
printlog( "Open the Wizard" )
FirstTimeWizard
' give the wizard a maximum of 2 seconds to open, it's a serve-url and
' should open almost instantly
kontext "WelcomeDialog"
if ( WelcomeDialog.exists( 2 ) ) then
printlog( "The Wizard is open" )
call dialogtest( WelcomeDialog )
printlog( "click 'next'")
NextBtn.click()
endif
printlog( "Check the license page" )
kontext "TabFirstStartLicense"
if ( TabFirstStartLicense.exists( 2 ) ) then
printlog( "License page is visible" )
call dialogtest( TabFirstStartLicense )
printlog( "scroll down (button!) the licensetext to enable the >>-button" )
for iClick = 1 to 50
kontext "TabFirstStartLicense"
if ( ScrollDown.isEnabled( 1 ) ) then
ScrollDown.click()
else
kontext "WelcomeDialog"
if ( NextBtn.isEnabled() ) then
printlog( "Needed " & iClick & " clicks on 'scroll down' " )
exit for
else
warnlog( "Both Scroll-button and Next-button are disabled" )
goto endsub
endif
endif
next iClick
sleep( 1 )
kontext "WelcomeDialog"
if ( WelcomeDialog.exists( 2 ) ) then
NextBtn.click()
else
warnlog( "Cannot access welcome dialog" )
endif
endif
printlog( "Handle Data-Migration page" )
kontext "TabPersonalDataMigration"
if ( TabPersonalDataMigration.exists( 2 ) ) then
call dialogtest( TabPersonalDataMigration )
printlog( "The data migration page is visible" )
TransferPersonalData.uncheck()
kontext "WelcomeDialog"
NextBtn.click()
endif
printlog( "The personal data page should show up" )
Kontext "TabFirstStartUser"
if ( TabFirstStartUser.exists( 2 ) ) then
call dialogtest( TabFirstStartUser )
Kontext "TabFirstStartUser"
printlog( "Enter lastname, name and initials" )
FirstName.setText( cFirstname )
LastName.setText( cLastName )
Initials.setText( cInitials )
kontext "WelcomeDialog"
NextBtn.click()
else
warnlog( "Could not access TabFirstStartUser" )
endif
if (gAutoUpdate) then
kontext "TabFirstStartOnlineUpdate"
if ( TabFirstStartOnlineUpdate.exists( 2 ) ) then
call dialogtest( TabFirstStartOnlineUpdate )
CheckForUpdates.unCheck()
kontext "WelcomeDialog"
NextBtn.click()
else
warnlog( "Online Update Page is missing" )
endif
else
qaErrorlog( "Online Update Page is missing" )
endif
Kontext "TabFirstStartRegistration"
if ( TabFirstStartRegistration.exists( 3 ) ) then
printlog( "Registration page visible." )
else
qaerrorlog( "An additional page appears on rerun of wizard" )
kontext "WelcomeDialog"
NextBtn.click()
endif
printlog( "Registration page: " )
Kontext "TabFirstStartRegistration"
if ( TabFirstStartRegistration.exists( 2 ) ) then
printlog( "Page is present." )
call dialogtest( TabFirstStartRegistration )
printlog( "Choose not to register" )
DoNotWantRegister.check()
printlog( "close the wizard" )
kontext "WelcomeDialog"
WelcomeDialog.ok()
endif
printlog( "Verify that the userdata made it to tools/options" )
ToolsOptions
hToolsOptions( "StarOffice" , "UserData" )
if ( Vorname.getText() <> cFirstname ) then
warnlog( "First name is not transferred to Tools/options/userdata" )
endif
if ( ZuName.getText() <> cLastName ) then
warnlog( "Last name is not transferred to Tools/options/userdata" )
endif
if ( Kuerzel.getText() <> cInitials ) then
warnlog( "Initials are not transferred to Tools/options/userdata" )
endif
hToolsOptions( "StarOffice", "Memory" )
if ( LoadQuickstarter.exists() ) then
if ( LoadQuickstarter.isEnabled() ) then
printlog( "Quickstarter checkbox is enabled" )
if ( LoadQuickstarter.isChecked() ) then
printlog( "Quickstart is activated, turning it off." )
LoadQuickstarter.unCheck()
printlog( "Closing Tools/Options" )
Kontext "OptionenDlg"
OptionenDlg.cancel()
printlog( "Restarting program" )
call ExitRestartTheOffice()
else
printlog( "Quickstarter is not turned on." )
endif
else
printlog( "Quickstarter checkbox is not enabled for this system" )
endif
else
if ( gPlatGroup <> "unx" ) then
if ( dir( cQuickStarterPath ) <> "" ) then
warnlog( "Quickstarter checkbox is missing on options page" )
else
printlog( "Quickstarter is not installed/no checkbox present" )
endif
endif
endif
Kontext "OptionenDlg"
if ( OptionenDlg.exists() ) then
OptionenDlg.cancel()
endif
' due to issue i105248 the Quickstart disabler needs to get called again, because the First Start Wizard resets the veto
call hDisableQuickstarterAPI()
do while( getDocumentCount() > 0 )
call hCloseDocument()
loop
endcase
|