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_euroconverter.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:19:04 $
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 : Update test for the Euroconverter
38 '\******************************************************************************
40 testcase tUpdtWizardEuroconverter
46 dim iKnownCurrencies as integer
47 const KNOWN_CURRENCIES = 16
48 const TARGET_FILE = "barfly.ods"
51 dim cSourceDir as string
52 cSourceDir = gTesttoolPath & "framework\required\input"
53 cSourceDir = convertpath( cSourceDir )
55 dim cTargetDir as string
56 cTargetDir = hGetWorkPath()
60 irc = hOpenWizardWithMenu( "EUROCONV" )
62 warnlog( "Failed to open the Euroconverter, aborting test" )
67 kontext "AutopilotEuroKonverter"
68 call DialogTest( AutopilotEuroKonverter , 1 )
70 Kontext "AutopilotEuroKonverter"
71 iKnownCurrencies = Waehrungen.getItemCount()
72 if ( iKnownCurrencies <> KNOWN_CURRENCIES ) then
73 warnlog( "The number of currencies in the currencies listbox is incorrect." )
74 printlog( "Found...: " & iKnownCurrencies )
75 printlog( "Expected: " & KNOWN_CURRENCIES )
78 if ( not Verzeichnis.isChecked() ) then
79 warnlog( "Converting entire directories should be default" )
83 kontext "AutopilotEuroKonverter"
87 EFFilename.setText( cSourceDir )
90 kontext "AutopilotEuroKonverter"
94 EFFilename.setText( cTargetDir )
98 kontext "AutopilotEuroKonverter"
99 Waehrungen.Select(1) 'Setting to first entry of listbox
104 do while( not Konvertieren.isEnabled() )
107 printlog( "Waiting for document to get converted..." )
109 if ( iWait = 20000 ) then
110 warnlog( "Document(s) were not converted within 20 seconds, aborting" )
114 ' If the target file already exists we get an overwrite warning
116 if ( Active.exists() ) then
117 cMsg = active.getText()
118 cMsg = hRemoveLineBreaks( cMsg )
119 warnlog( "Unexpected message: " & cMsg )
124 kontext "AutopilotEuroKonverter"
128 kontext "AutopilotEuroKonverter"
129 call DialogTest( AutopilotEuroKonverter , 2 )
133 hDeleteFile( cTargetDir & TARGET_FILE )