Kaydet (Commit) 093cbd43 authored tarafından Joerg Skottke [jsk]'s avatar Joerg Skottke [jsk]

native0: #161747 - Add automatic filename completion to test case (which caused the test to fail)

üst ae3aaaf4
......@@ -55,9 +55,7 @@ testcase tIncorrectPassword( filetypeID as string )
hDeleteFile( workpath & WORKFILE & suffix )
printlog( "Make sure we have exactly one single document open" )
do while( getDocumentCount > 0 )
hDestroyDocument()
loop
hFileCloseAll()
hCreateDocument()
printlog( "Change the document" )
......@@ -67,70 +65,76 @@ testcase tIncorrectPassword( filetypeID as string )
FileSave
Kontext "SpeichernDlg"
printlog( "Check the password checkbox" )
Passwort.check()
printlog( "Name the file as " & workpath & WORKFILE )
Dateiname.settext( workpath & WORKFILE )
if ( filetypeID <> "current" ) then
for iCurrentFilter = 1 to DateiTyp.getItemCount()
DateiTyp.select( iCurrentFilter )
cCurrentFilter = DateiTyp.getSelText()
if ( instr( cCurrentFilter , suffix ) > 0 ) then
printlog( "Using custom filter: " & cCurrentFilter )
exit for
endif
next iCurrentFilter
else
printlog( "Using default filter: " & DateiTyp.getSelText() )
endif
printlog( "Click on the Save-Button" )
Speichern.click()
if ( SpeichernDlg.exists( 1 ) ) then
printlog( "Automatic filename extension" )
AutomatischeDateinamenserweiterung.check()
printlog( "Check the password checkbox" )
Passwort.check()
printlog( "Name the file as " & workpath & WORKFILE )
Dateiname.settext( workpath & WORKFILE )
if ( filetypeID <> "current" ) then
for iCurrentFilter = 1 to DateiTyp.getItemCount()
DateiTyp.select( iCurrentFilter )
cCurrentFilter = DateiTyp.getSelText()
if ( instr( cCurrentFilter , suffix ) > 0 ) then
printlog( "Using custom filter: " & cCurrentFilter )
exit for
endif
next iCurrentFilter
else
printlog( "Using default filter: " & DateiTyp.getSelText() )
endif
printlog( "Click on the Save-Button" )
Speichern.click()
brc = hSecurityEnterPasswordOnSave( PASSWORD_VALID )
brc = hSecurityEnterPasswordOnSave( PASSWORD_VALID )
if ( brc ) then
if ( brc ) then
kontext "AlienWarning"
if ( AlienWarning.exists( 3 ) ) then
AlienWarning.ok()
if ( filetypeID <> "current" ) then
printlog( "Accepted to save in alien format" )
else
warnlog( "Alien warning not expected for default file format" )
endif
endif
kontext "AlienWarning"
if ( AlienWarning.exists( 3 ) ) then
AlienWarning.ok()
if ( filetypeID <> "current" ) then
printlog( "Accepted to save in alien format" )
else
warnlog( "Alien warning not expected for default file format" )
printlog( "Close the document" )
brc = hDestroyDocument()
if ( not brc ) then
warnlog( "Something went wrong while closing the document. please check" )
endif
else
warnlog( "Something went wrong setting the password for the docuemnt" )
endif
printlog( "Close the document" )
brc = hDestroyDocument()
printlog( "Load the file again" )
hFileOpen( workpath & WORKFILE & suffix )
brc = hSecurityEnterPasswordOnLoad( PASSWORD_FALSE , false )
if ( not brc ) then
warnlog( "Something went wrong while closing the document. please check" )
warnlog( "Something went wrong while using the password dialog" )
endif
else
warnlog( "Something went wrong setting the password for the docuemnt" )
endif
printlog( "Load the file again" )
hFileOpen( workpath & WORKFILE & suffix )
brc = hSecurityEnterPasswordOnLoad( PASSWORD_FALSE , false )
if ( not brc ) then
warnlog( "Something went wrong while using the password dialog" )
endif
hDestroyDocument()
printlog( "Verify that we have no open documents" )
if ( getDocumentCount <> 0 ) then
warnlog( "No documents should be open at this point" )
endif
hDestroyDocument()
printlog( "Delete the workfile" )
hDeleteFile( workpath & WORKFILE & suffix )
printlog( "Verify that we have no open documents" )
if ( getDocumentCount <> 0 ) then
warnlog( "No documents should be open at this point" )
endif
printlog( "Delete the workfile" )
hDeleteFile( workpath & WORKFILE & suffix )
else
warnlog( "Unable to open file save dialog" )
endif
endcase
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment