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 Basic IDE / Dialog i18n-feature
32 '\******************************************************************************
34 testcase tUpdtBasicDialogI18n
36 printlog( "BASIC IDE Dialog i18n." )
37 const MODULE_NAME = "tUpdtBasicDialogI18n"
38 const DIALOG_DEFAULT_TIMEOUT = 2
41 hCloseDialog( Navigator, "close,optional" )
44 if ( not hInitFormControls( MODULE_NAME ) ) then
45 warnlog( "Failed to open Basic IDE / Dialogs / ToolsCollectionBar" )
49 printlog( "Click Manage Languages on ToolsCollectionBar")
50 kontext "ToolsCollectionBar"
51 if ( ToolsCollectionBar.exists( DIALOG_DEFAULT_TIMEOUT ) ) then
53 hClickButton( ManageLanguage )
55 warnlog( "<ToolsCollectionBar> is not open, is the test environment dirty?" )
58 kontext "ManageUILanguages"
59 if ( ManageUILanguages.exists( DIALOG_DEFAULT_TIMEOUT ) ) then
60 call dialogtest( ManageUILanguages )
62 printlog( "Add default language, choose preselection")
63 kontext "ManageUILanguages"
66 kontext "SetDefaultLanguage"
67 if ( SetDefaultLanguage.exists( DIALOG_DEFAULT_TIMEOUT ) ) then
68 call dialogtest( SetDefaultLanguage )
70 kontext "SetDefaultLanguage"
71 DefaultLanguageListbox.select( 3 )
73 kontext "SetDefaultLanguage"
74 hCloseDialog( SetDefaultLanguage, "ok" )
76 warnlog( "Dialog <SetDefaultLanguage> did not open" )
79 printlog( "Back on Manage UI Languages Dialog we click <Add>")
80 kontext "ManageUILanguages"
83 kontext "AddUserInterface"
84 if ( AddUserInterface.exists( DIALOG_DEFAULT_TIMEOUT ) ) then
85 call dialogtest( AddUserInterface )
87 printlog( "Add just another language at random")
88 kontext "AddUserInterface"
89 AddNewControl.typeKeys( "<HOME>" ) ' select first item
90 AddNewControl.typeKeys( "<SPACE>" ) ' check it
92 kontext "AddUserInterface"
93 hCloseDialog( AddUserInterface, "ok" )
95 warnlog( "Dialog <AddUserInterface> did not open" )
98 kontext "ManageUILanguages"
99 PresentLanguages.Select (1)
101 printlog( "Back on Manage UI Languages Dialog, delete selected language")
102 kontext "ManageUILanguages"
103 hClickButton( Delete )
105 printlog( "Confirm delete")
107 if ( Active.exists( DIALOG_DEFAULT_TIMEOUT ) ) then
108 call dialogtest( active )
111 hCloseDialog( active, "ok" )
113 warnlog( "Confirm delete messagebox is missing" )
116 printlog( "Leave Manage UI Languages Dialog")
117 kontext "ManageUILanguages"
118 hCloseDialog( ManageUILanguages, "ok" )
120 warnlog( "Manage UI languages did not open" )
123 printlog( "Verify that the translationbar is visible")
124 kontext "TranslationBar"
125 if ( not TranslationBar.exists() ) then warnlog( "The IDE Translation Toolbar is not visible" )
127 kontext "ToolsCollectionBar"
128 hCloseDialog( ToolsCollectionBar, "close" )