sw33bf04#85766#adapted testcases for numbering fixes

This commit is contained in:
Helge Delfs [hde] 2010-06-03 16:01:52 +02:00
parent 81c476751f
commit 2d65a58f0a
4 changed files with 106 additions and 115 deletions

View file

@ -170,8 +170,6 @@ endcase
'-----------------------------------------------------------------
testcase tInsertFieldsPageNumber
qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
goto endsub
Dim sPage1 , sPage2 as String
@ -216,8 +214,6 @@ endcase
'-----------------------------------------------------------------
testcase tInsertFieldsPageCount
qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
goto endsub
Dim sPage1 , sPage2 as String
@ -273,8 +269,6 @@ endcase
'-----------------------------------------------------------------
testcase tInsertFieldsSubject
qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
goto endsub
Dim sSubject as String
sSubject = "This is a Subject"
@ -306,8 +300,6 @@ endcase
'-----------------------------------------------------------------
testcase tInsertFieldsTitle
qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
goto endsub
Dim sTitle as String
@ -340,8 +332,6 @@ endcase
'-----------------------------------------------------------------
testcase tInsertFieldsAuthor
qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
goto endsub
Dim sFirstName , sLastName as String
Dim sFirstName1 , sLastName1 as String

View file

@ -451,8 +451,6 @@ endcase
'-----------------------------------------------------------------
testcase tDocumentPage
qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
goto endsub
Dim sTestFile as String
Dim sPage() as String
@ -867,35 +865,32 @@ endcase
'-----------------------------------------------------------------
testcase tDocumentStatistics
qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
goto endsub
Dim sTestFile as String
Dim sOriginalFile as string
Dim sStatistics() as String
Dim sType as string
Dim i as Integer
sStatistics = Array( _
"2" , _
"2" , _
"2" , _
"12" , _
"2" , _
"2" , _
"1" , _
)
sStatistics = Array( "2", "2", "3", "13", "2", "2", "1" )
sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\statisticsTest.sxw")
sTestFile = Convertpath (gOfficepath + "user\work\statisticsTest.sxw")
sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\statisticsTest.sxw")
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
if hFileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
printlog "Insert/Fields/Other/Document / Statistics"
'/// <b> Insert/Fields/Other/Document / Statistics </b>
Call hNewDocument
'/// Open test file statisticsTest.sxw which includes
'/// 2 tables , 2 pictures , 22 paragraph , 1 object ,
'/// 2 words , 12 characters and 2 pages
Call hFileOpen(sTestFile)
Call sMakeReadOnlyDocumentEditable
Call wTypeKeys "<MOD1 Home><Down>"
@ -904,6 +899,7 @@ goto endsub
'/// Check if the insertion is correct
Call fInsertFieldsOther("TabDokumentFeldbefehle")
Feldtyp.Select fGetType("Statistics")
sType = Auswahl.GetSelText
for i = 0 to UBound(sStatistics)
Kontext "TabDokumentFeldbefehle"
Auswahl.Select i+1
@ -916,7 +912,7 @@ goto endsub
Sleep 1
EditCopy
if GetClipboard <> sStatistics(i) then
Warnlog i &" - Should get " & sStatistics(i) & " but get " & GetClipboard
Warnlog "- " & sType & ": Should get " & sStatistics(i) & " but get " & GetClipboard
end if
Call wTypeKeys "<Delete>"
next i
@ -930,35 +926,39 @@ endcase
'-----------------------------------------------------------------
testcase tDocumentTemplate
qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
goto endsub
Dim sTestFile as String
Dim sDirectory as String
Dim oDirectory as String
Dim sLanguage as String
Dim sFormat() as String
Dim sResult(6) as String
Dim i as Integer
Dim sTestFile as String
Dim sOriginalFile as string
Dim sDirectory as String
Dim oDirectory as String
Dim sLanguage as String
Dim sFormat() as String
Dim sResult(6) as String
Dim i as Integer
sLanguage = fGetDirLanguage()
sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\diploma.ott")
sTestFile = Convertpath (gOfficepath + "user\work\diploma.ott")
sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\diploma.ott")
' document has to be copied to local file system to avoid opening a read-only file
' because all field data gets lost if documents write-protection is removed via 'sMakeReadOnlyDocumentEditable'
FileCopy (sOriginalFile, sTestFile)
if hFileExists ( sTestFile ) = false then
Warnlog "Test document couldn't be copied to local file system. Test aborted!"
goto endsub
end if
sResult(0) = fGetCateGory()
sResult(1) = "diploma.ott"
sResult(2) = "diploma"
sResult(3) = Convertpath (gTesttoolpath + "writer\optional\input\fields\")
sResult(3) = Convertpath (gOfficepath + "user\work")
sResult(4) = sTestFile
sResult(5) = fGetStyle()
printlog "Insert/Fields/Other/Document / Template"
'/// <b> Insert/Fields/Other/Document / Template </b>
Call hNewDocument
'/// Open test file diploma.ott
Call hFileOpen(sTestFile)
Call sMakeReadOnlyDocumentEditable
Call wTypeKeys "<MOD1 Home>"

View file

@ -261,9 +261,8 @@ endcase
'-----------------------------------------------------------------
testcase tDocInformationUserDefined
qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
goto endsub
QAErrorLog "#i112077#Tabpage 'Custom properties' has no declaration"
goto endsub
Dim sTestFile as String
Dim sOriginalFile as string
Dim sVarResult() as String

View file

@ -667,99 +667,101 @@ endcase
'-----------------------------------------------------------------
testcase tVariablesDDEFieldManual
qaerrorlog "#i93906# - tVariablesDDEFieldManual outcommented due to a problem with copying field-contents outside the office."
warnlog "#i112079#testcase must be reworked"
goto endsub
Dim sDDEFile as String
Dim sContent as String
Dim sName as String
Dim sDDEStatement as String
Dim sSectionName as String
Dim sDDEFile as String
Dim sContent as String
Dim sName as String
Dim sDDEStatement as String
Dim sSectionName as String
sDDEFile = Convertpath ( gNetzOfficePath + "dde_test.oxt")
sContent = "DDE"
sName = "myTest"
sSectionName = "Section1"
sDDEStatement = "soffice " & sDDEFile & " " & sSectionName
sDDEFile = Convertpath ( gOfficePath + "\user\work\dde_test.odt")
sContent = "DDE"
sName = "myTest"
sSectionName = "Section1"
sDDEStatement = "soffice " & sDDEFile & " " & sSectionName
printlog "DDE field - manual"
'/// <b> DDE field - manual </b>
printlog "DDE field - manual"
'/// <b> DDE field - manual </b>
if hFileExists ( sDDEFile ) then app.kill ( sDDEFile )
if hFileExists ( sDDEFile ) then app.kill ( sDDEFile )
Call hNewDocument
Call hNewDocument
'/// Input something , insert a section , then save it and close the file
Call wTypeKeys sContent
Call wTypeKeys "<Shift Home>"
Call fInsertSection("TabBereiche")
Bereichsliste.Settext sSectionName
TabBereiche.OK
Sleep 1
Call hFileSaveAsKill(sDDEFile)
Call hCloseDocument
'/// Input something , insert a section , then save it and close the file
Call wTypeKeys sContent
Call wTypeKeys "<Shift Home>"
Call fInsertSection("TabBereiche")
Bereichsliste.Settext sSectionName
TabBereiche.OK
Sleep 1
Call hFileSaveAsKill(sDDEFile)
Call hCloseDocument
'/// Opan a new document
Call hNewDocument
'/// Opan a new document
Call hNewDocument
'/// Insert/Fields/Other/Variables / Select "DDE Field"
'/// Set DDE name and DDE statement , select "DDE manual"
Call fInsertFieldsOther("TabVariablen")
Feldtyp.Select 3
Sleep 1
NameText.SetText sName
Wert.SetText sDDEStatement
Formatliste.Select 1
Einfuegen.Click
Sleep 2
TabVariablen.Close
Sleep 2
'/// Insert/Fields/Other/Variables / Select "DDE Field"
'/// Set DDE name and DDE statement , select "DDE manual"
Call fInsertFieldsOther("TabVariablen")
Feldtyp.Select 3
Sleep 1
NameText.SetText sName
Wert.SetText sDDEStatement
Formatliste.Select 1
Einfuegen.Click
Sleep 2
TabVariablen.Close
Sleep 2
Call wTypeKeys "<MOD1 Home>"
Call wTypeKeys "<Shift End>"
if fGetFieldContent() <> sContent then
Warnlog "Should get " & sContent & " but get " & fGetFieldContent()
end if
Call wTypeKeys "<MOD1 Home>"
Call wTypeKeys "<Shift End>"
if fGetFieldContent() <> sContent then
Warnlog "Should get " & sContent & " but get " & fGetFieldContent()
end if
'/// Open the test file which you just closed , add something ,
'/// Save the file
Call hFileOpen(sDDEFile)
'/// Open the test file which you just closed , add something ,
'/// Save the file
Call hFileOpen(sDDEFile)
Call wTypeKeys "<MOD1 Home>"
Call wTypeKeys "XYZ"
FileSave
Call hCloseDocument
Call hCloseDocument
'/// Check if the content is changed -- Should NOT
Sleep 2
Call wTypeKeys "<F9>"
Call wTypeKeys "<MOD1 Home><Shift End>"
if fGetFieldContent() <> sContent then
Warnlog "Should get " & sContent & " but get " & fGetFieldContent()
end if
'/// Check if the content is changed -- Should NOT
Sleep 2
Call wTypeKeys "<F9>"
Call wTypeKeys "<MOD1 Home><Shift End>"
if fGetFieldContent() <> sContent then
Warnlog "Should get " & sContent & " but get " & fGetFieldContent()
end if
'/// Edit/Fields , press update button
EditFields
Kontext "VerknuepfungenBearbeiten"
Aktualisieren.Click
VerknuepfungenBearbeiten.Close
'/// Edit/Fields , press update button
EditFields
Kontext "VerknuepfungenBearbeiten"
Aktualisieren.Click
VerknuepfungenBearbeiten.Close
'/// Check if the content is changed -- Should NOT
Sleep 1
Call wTypeKeys "<F9>"
Call wTypeKeys "<MOD1 Home><Shift End>"
if fGetFieldContent() <> ("XYZ" & sContent) then
Warnlog "Should get XYZ" & sContent & " but get " & fGetFieldContent()
end if
'/// Check if the content is changed -- Should NOT
Sleep 1
Call wTypeKeys "<F9>"
Call wTypeKeys "<MOD1 Home><Shift End>"
if fGetFieldContent() <> ("XYZ" & sContent) then
Warnlog "Should get XYZ" & sContent & " but get " & fGetFieldContent()
end if
Call hCloseDocument
Call hCloseDocument
if hFileExists ( sDDEFile ) then app.kill ( sDDEFile )
if hFileExists ( sDDEFile ) then app.kill ( sDDEFile )
endcase
'-----------------------------------------------------------------
testcase tVariablesDDEFieldAutomatic
warnlog "#i112079#testcase must be reworked"
goto endsub
qaerrorlog "#i102792# - tVariablesDDEFieldAutomatic outcommented. Fields not updated."
goto endsub