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 : Security dialogs in Tools/Options
32 '\******************************************************************************
34 testcase tUpdtSecurityDialogs
36 printlog( "Security dialogs in Tools/Options" )
38 const C_PASSWORD = "huhuhu"
40 printlog( "Tools/Options" )
43 hToolsOptions( "StarOffice", "Security" )
46 call DialogTest( TabSecurity )
50 kontext "TabSecurityOptionsAndWarnings"
51 if ( TabSecurityOptionsAndWarnings.exists( 1 ) ) then
52 call DialogTest( TabSecurityOptionsAndWarnings )
53 printlog( "Options dialog is present" )
55 TabSecurityOptionsAndWarnings.cancel()
57 warnlog( "options dialog is missing" )
61 if ( PersistentlySavePasswords.isChecked() ) then
62 qaerrorlog( "Security settings already changed by another test" )
64 PersistentlySavePasswords.unCheck()
66 if( active.exists( 1 ) ) then
69 warnlog( "failed to reset password configuration, aborting" )
76 PersistentlySavePasswords.check()
78 kontext "MasterPasswordDefine"
79 if ( MasterPasswordDefine.exists( 1 ) ) then
81 printlog( "Define Master password dialog is open" )
82 call DialogTest( MasterPasswordDefine )
84 Password1.setText( C_PASSWORD )
85 Password2.setText( C_PASSWORD )
86 MasterPasswordDefine.ok()
89 warnlog( "Define Master Password dialog is missing" )
93 MasterPassword.click()
95 kontext "MasterPasswordEnter"
96 if ( MasterPasswordEnter.exists( 1 ) ) then
97 printlog( "Enter master Password dialog is open" )
98 call DialogTest( MasterPasswordEnter )
100 MasterPasswordEnter.cancel()
102 warnlog( "Enter Password dialog is missing" )
106 kontext "TabSecurity"
107 ShowPasswords.click()
109 kontext "MasterPasswordEnter"
110 if ( MasterPasswordEnter.exists( 1 ) ) then
111 printlog( "Enter password dialog is open" )
113 Password.setText( C_PASSWORD )
115 MasterPasswordEnter.ok()
117 kontext "StoredPasswordsDialog"
118 if ( StoredPasswordsDialog.exists( 1 ) ) then
119 printlog( "Stored passwords dialog is open" )
120 call DialogTest( StoredPasswordsDialog )
122 StoredPasswordsDialog.close()
124 warnlog( "Stored passwords dialog is missing" )
127 warnlog( "Enter Master Password dialog is missing" )
130 kontext "TabSecurity"
131 MacroSecurity.click()
133 kontext "TabSecurityLevel"
134 if ( TabSecurityLevel.exists( 1 ) and TabSecurityLevel.isVisible() ) then
135 printlog( "Security Level tabpage is open." )
138 active.setPage TabTrustedSources
140 kontext "TabTrustedSources"
141 if ( TabTrustedSources.isVisible() ) then
142 printlog( "Trusted Sources tabpage is visible" )
147 if ( OeffnenDlg.exists( 1 ) ) then
148 printlog( "File open dialog is visible" )
149 call DialogTest( OeffnenDlg )
152 kontext "TabTrustedSources"
153 if ( TabTrustedSources.exists() ) then
154 TabTrustedSources.cancel()
156 warnlog( "Trusted Sources tabpage not available" )
159 warnlog( "Trusted Paths selector not visible" )
162 warnlog( "Trusted Sources tabpage is not available" )
165 warnlog( "The Macro Security settings dialog is not open" )
168 Kontext "TabSecurity"
169 PersistentlySavePasswords.unCheck()
172 if( active.exists( 1 ) ) then
173 printlog( "Passwords deletion warning is displayed. Good" )
174 call DialogTest( active )
177 warnlog( "Password deletion warning is missing" )
181 kontext "OptionenDlg"