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 : Update test for the Euroconverter
32 '\******************************************************************************
34 testcase tUpdtWizardEuroconverter
36 printlog( "Resource test for the euro-converter" )
42 dim iKnownCurrencies as integer
43 const KNOWN_CURRENCIES = 16
44 const TARGET_FILE = "barfly.ods"
47 dim cSourceDir as string
48 cSourceDir = gTesttoolPath & "framework\required\input"
49 cSourceDir = convertpath( cSourceDir )
51 dim cTargetDir as string
52 cTargetDir = hGetWorkPath()
56 FileWizardEuroConverter
58 kontext "AutopilotEuroKonverter"
59 call DialogTest( AutopilotEuroKonverter , 1 )
61 Kontext "AutopilotEuroKonverter"
62 iKnownCurrencies = Waehrungen.getItemCount()
63 if ( iKnownCurrencies <> KNOWN_CURRENCIES ) then
64 warnlog( "The number of currencies in the currencies listbox is incorrect." )
65 printlog( "Found...: " & iKnownCurrencies )
66 printlog( "Expected: " & KNOWN_CURRENCIES )
69 if ( not Verzeichnis.isChecked() ) then
70 warnlog( "Converting entire directories should be default" )
74 kontext "AutopilotEuroKonverter"
78 EFFilename.setText( cSourceDir )
81 kontext "AutopilotEuroKonverter"
85 EFFilename.setText( cTargetDir )
89 kontext "AutopilotEuroKonverter"
90 Waehrungen.Select(1) 'Setting to first entry of listbox
95 do while( not Konvertieren.isEnabled() )
98 printlog( "Waiting for document to get converted..." )
100 if ( iWait = 20000 ) then
101 warnlog( "Document(s) were not converted within 20 seconds, aborting" )
105 ' If the target file already exists we get an overwrite warning
107 if ( Active.exists() ) then
108 cMsg = active.getText()
109 cMsg = hRemoveLineBreaks( cMsg )
110 warnlog( "Unexpected message: " & cMsg )
115 kontext "AutopilotEuroKonverter"
119 kontext "AutopilotEuroKonverter"
120 call DialogTest( AutopilotEuroKonverter , 2 )
122 hClickButton( Konvertieren )
124 hDeleteFile( cTargetDir & TARGET_FILE )