summaryrefslogtreecommitdiff
path: root/testautomation/framework/optional/includes/security_incorrect_password.inc
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/framework/optional/includes/security_incorrect_password.inc')
-rwxr-xr-x[-rw-r--r--]testautomation/framework/optional/includes/security_incorrect_password.inc32
1 files changed, 11 insertions, 21 deletions
diff --git a/testautomation/framework/optional/includes/security_incorrect_password.inc b/testautomation/framework/optional/includes/security_incorrect_password.inc
index eedbc8c67896..2478a59d6294 100644..100755
--- a/testautomation/framework/optional/includes/security_incorrect_password.inc
+++ b/testautomation/framework/optional/includes/security_incorrect_password.inc
@@ -32,37 +32,31 @@
'\******************************************************************************
testcase tIncorrectPassword( filetypeID as string )
-
- const WORKFILE = "password"
- dim suffix as string
- dim workpath as string
-
- dim rc as integer
- dim brc as boolean
dim iCurrentFilter as integer
dim cCurrentFilter as string
+ dim filepath as string
const PASSWORD_VALID = "MyPasswd09#+1"
const PASSWORD_FALSE = "MyPasswd00#+1"
const DOC_ID = "f_sec_incorrect_password.bas testdocument"
-
- workpath = hGetWorkPath()
-
- suffix = hGetSuffix( filetypeID )
+
+ printlog( "Build a valid filename with full path and suffix" )
+ filepath = hGetWorkPath() & "password" & hGetSuffix( filetypeID )
+ printlog( "The workfile is: " & filepath )
printlog( "Delete the workfile - if it was left over by a former testrun" )
- hDeleteFile( workpath & WORKFILE & suffix )
+ hDeleteFile( filepath )
printlog( "Make sure we have exactly one single document open" )
hFileCloseAll()
- hCreateDocument()
+ hCreateDocument() ' Do not use hInitSingleDoc() here as it creates a Writer document
printlog( "Change the document" )
hChangeDoc()
printlog( "Click on FileSave" )
- FileSave
+ hUseAsyncSlot( "FileSave" )
Kontext "SpeichernDlg"
if ( SpeichernDlg.exists( 1 ) ) then
@@ -92,9 +86,7 @@ testcase tIncorrectPassword( filetypeID as string )
printlog( "Click on the Save-Button" )
Speichern.click()
- brc = hSecurityEnterPasswordOnSave( PASSWORD_VALID )
-
- if ( brc ) then
+ if ( hSecurityEnterPasswordOnSave( PASSWORD_VALID ) ) then
kontext "AlienWarning"
if ( AlienWarning.exists( 3 ) ) then
@@ -107,8 +99,7 @@ testcase tIncorrectPassword( filetypeID as string )
endif
printlog( "Close the document" )
- brc = hDestroyDocument()
- if ( not brc ) then
+ if ( not hDestroyDocument() ) then
warnlog( "Something went wrong while closing the document. please check" )
endif
@@ -118,8 +109,7 @@ testcase tIncorrectPassword( filetypeID as string )
printlog( "Load the file again" )
hFileOpen( workpath & WORKFILE & suffix )
- brc = hSecurityEnterPasswordOnLoad( PASSWORD_FALSE , false )
- if ( not brc ) then
+ if ( not hSecurityEnterPasswordOnLoad( PASSWORD_FALSE , false ) ) then
warnlog( "Something went wrong while using the password dialog" )
endif