summaryrefslogtreecommitdiff
path: root/testautomation/writer/optional
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2009-10-01 11:19:42 +0000
committerVladimir Glazounov <vg@openoffice.org>2009-10-01 11:19:42 +0000
commite6c0c6f0a6fc392d3e4775cfba57cd29ed74a29e (patch)
tree604a32e31f01fe50a59d1a04c112b01f719cb572 /testautomation/writer/optional
parent541434c445bc4c7e70b79bca22171228592d6830 (diff)
CWS-TOOLING: integrate CWS automationdev300m58cat0
2009-09-29 14:46:30 +0200 oc r276530 : #i105448# sleep added to resolv timingproblem 2009-09-28 10:29:46 +0200 oc r276482 : #i105404# t_ToolsMacro needs saved file 2009-09-27 10:51:09 +0200 tbo r276478 : #105393# on MacOS X only 3 items in tools menu 2009-09-25 18:02:25 +0200 oc r276473 : CWS-TOOLING: rebase CWS automationdev300m58cat0 to trunk@276429 (milestone: DEV300:m60) 2009-09-24 11:06:00 +0200 hde r276411 : save test-files locally 2009-09-23 15:40:07 +0200 hde r276400 : deleting of autotext optimized 2009-09-23 15:39:20 +0200 hde r276399 : Dialog 'Bereiche' opened after deleting autotext 2009-09-23 10:42:26 +0200 jsk r276370 : Added warnlog for exceeded timeout, i want the test to warn instead of aborting. Connected issue is #i105289# 2009-09-22 10:41:22 +0200 oc r276347 : #i105254# c_arrayconstants.inc enhanced 2009-09-21 20:37:26 +0200 tbo r276344 : #i105249# workaround firststartwizard regression by calling hDisableQuickstarterAPI() 2009-09-17 10:55:59 +0200 wg r276231 : i105141 2009-09-16 09:20:58 +0200 oc r276191 : #i105109# sleeps increased
Diffstat (limited to 'testautomation/writer/optional')
-rwxr-xr-xtestautomation/writer/optional/includes/fields/w_fields2.inc112
-rwxr-xr-xtestautomation/writer/optional/includes/fields/w_fields4.inc1368
-rwxr-xr-xtestautomation/writer/optional/includes/fields/w_fields6.inc2
-rwxr-xr-xtestautomation/writer/optional/includes/fields/w_fields7.inc30
-rwxr-xr-xtestautomation/writer/optional/includes/option/wh_o_1.inc2
-rwxr-xr-xtestautomation/writer/optional/includes/option/wh_o_2.inc2
6 files changed, 800 insertions, 716 deletions
diff --git a/testautomation/writer/optional/includes/fields/w_fields2.inc b/testautomation/writer/optional/includes/fields/w_fields2.inc
index 55e0ff590f9f..06f5df39a68d 100755
--- a/testautomation/writer/optional/includes/fields/w_fields2.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields2.inc
@@ -392,59 +392,65 @@ endcase
'-----------------------------------------------------------------
testcase tDocumentFilename
- if bAsianLan = true then
- QaErrorLog "No testing with Asian language. Aborting."
- exit sub
- end if
-
- Dim sTestFile as String
- Dim sFilename(4) as String
- Dim i as Integer
-
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\pageTest.sxw")
-
- sFilename(0) = "pageTest.sxw"
- sFilename(1) = "pageTest"
- sFilename(2) = Convertpath (gTesttoolpath + "writer\optional\input\fields\")
- sFilename(3) = sTestFile
-
- printlog "Insert/Fields/Other/Document / File name"
- '/// <b> Insert/Fields/Other/Document / File name </b>
-
- Call hNewDocument
-
- '/// Open test file pageTest.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- Call wTypeKeys "<MOD1 Home>"
- Call wTypeKeys "<End><Return>"
-
- '/// Insert/Fields/Other/Document / File name
- '/// Insert File name, File name without extension ,
- '/// Path , Path/File name
- '/// Check if the insertion is correct
- Call fInsertFieldsOther("TabDokumentFeldbefehle")
- Feldtyp.Select fGetType("File name")
- for i = 0 to 3
- Kontext "TabDokumentFeldbefehle"
- Formatliste.Select i+1
- Sleep 1
- Einfuegen.Click
- sleep 1
- Call wTypeKeys "<F9>"
- Sleep 2
- Call wTypeKeys "<Shift LEFT>" 'HOME
- Sleep 1
- if fGetFieldContent() <> sFilename(i) then
- Warnlog i &" - Should get " & sFilename(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<Delete>"
- next i
- Kontext "TabDokumentFeldbefehle"
- TabDokumentFeldbefehle.Close
-
- Call hCloseDocument
+ if bAsianLan = true then
+ QaErrorLog "No testing with Asian language. Aborting."
+ goto endsub
+ end if
+
+ Dim sOriginalFile as String
+ Dim sTestFile as String
+ Dim sFilename(4) as String
+ Dim i as Integer
+
+ sTestFile = Convertpath (gOfficepath + "user\work\pageTest.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\pageTest.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
+
+ sFilename(0) = "pageTest.sxw"
+ sFilename(1) = "pageTest"
+ sFilename(2) = Convertpath (gOfficepath + "user\work\")
+ sFilename(3) = sTestFile
+
+ printlog "Insert/Fields/Other/Document / File name"
+
+ Call hNewDocument
+
+ '/// Open test file pageTest.sxw
+ Call hFileOpen(sTestFile)
+
+ Call wTypeKeys "<MOD1 Home>"
+ Call wTypeKeys "<End><Return>"
+
+ printlog "Insert/Fields/Other/Document / File name"
+ printlog "Insert File name, File name without extension , Path , Path/File name"
+ printlog "Check if the insertion is correct"
+ Call fInsertFieldsOther("TabDokumentFeldbefehle")
+ Feldtyp.Select fGetType("File name")
+ for i = 0 to 3
+ Kontext "TabDokumentFeldbefehle"
+ Formatliste.Select i+1
+ Sleep 1
+ Einfuegen.Click
+ sleep 1
+ Call wTypeKeys "<F9>"
+ Sleep 2
+ Call wTypeKeys "<Shift LEFT>" 'HOME
+ Sleep 1
+ if fGetFieldContent() <> sFilename(i) then
+ Warnlog i &" - Should get " & sFilename(i) & " but get " & fGetFieldContent()
+ end if
+ Call wTypeKeys "<Delete>"
+ next i
+ Kontext "TabDokumentFeldbefehle"
+ TabDokumentFeldbefehle.Close
+
+ Call hCloseDocument
endcase
diff --git a/testautomation/writer/optional/includes/fields/w_fields4.inc b/testautomation/writer/optional/includes/fields/w_fields4.inc
index 736e3649bf56..f0444a21271b 100755
--- a/testautomation/writer/optional/includes/fields/w_fields4.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields4.inc
@@ -267,74 +267,83 @@ endcase
'-----------------------------------------------------------------
testcase tDocInformationUserDefined
-qaerrorlog "#i93906# - Testcase outcommented due to bug. 'Copied field-content not pastable outside Office'"
-goto endsub
-
- Dim sTestFile as String
- Dim sVarResult() as String
- Dim sFixResult() as String
- Dim i as integer
- Dim j as Integer
-
- j = UBound(sVarResult)
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sVarResult = Array( _
+ 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 sVarResult() as String
+ Dim sFixResult() as String
+ Dim i as integer
+ Dim j as Integer
+
+ j = UBound(sVarResult)
+ sTestFile = Convertpath (gOfficepath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.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
+
+ sVarResult = Array( _
"A1" , _
"B2" , _
"C3" , _
"D4" , _
)
- sFixResult = Array( _
+ sFixResult = Array( _
"Lennon" , _
"McCartney" , _
"Harrison" , _
"Star" , _
)
- printlog "Doc Information - User Defined"
- '/// <b> Doc Information - User Defined </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- '/// File / Properties / Description , input some
- '/// + text in Description
- Call fFileProperties("TabDokument")
- Info0.Settext sVarResult(0)
- Info1.Settext sVarResult(1)
- Info2.Settext sVarResult(2)
- Info3.Settext sVarResult(3)
- TabBenutzer.OK
-
- '/// Check if the User defined is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Info fields")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i= 0 to UBound(sVarResult)
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call hCloseDocument
+ printlog "Doc Information - User Defined"
+
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+
+ '/// File / Properties / Description , input some
+ '/// + text in Description
+ Call fFileProperties("TabDokument")
+ Info0.Settext sVarResult(0)
+ Info1.Settext sVarResult(1)
+ Info2.Settext sVarResult(2)
+ Info3.Settext sVarResult(3)
+ TabBenutzer.OK
+
+ '/// Check if the User defined is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Info fields")
+
+ Call wTypeKeys "<End><Right><Down><Home>"
+ Sleep 1
+
+ for i= 0 to UBound(sVarResult)
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult(i) then
+ Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(i) then
+ Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Down><Home><Left><Home>"
+ next i
+
+ Call hCloseDocument
endcase
@@ -342,103 +351,112 @@ endcase
testcase tDocInformationCreated
- Dim sTestFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
-
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "07/20/2000"
- sFixResult(2) = "11:41:21"
-
- printlog "Doc Information - Created"
- '/// <b> Doc Information - Created </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- Call fFindWord ("Created")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author :Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// File / Properties / General , check "Apply user
- '/// + data" , click "delete" button
- Call fFileProperties("TabDokument")
- BenutzerdatenVerwenden.Check
- Sleep 1
- Loeschen.Click
- Sleep 1
- TabDokument.OK
-
- '/// Check if the Created field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Created")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- Call hCloseDocument
+ Dim sTestFile as String
+ Dim sOriginalFile as String
+ Dim sFirstName as String
+ Dim sLastName as String
+ Dim sFirstName1 as String
+ Dim sLastName1 as String
+ Dim sVarResult(3) as String
+ Dim sFixResult(3) as String
+ Dim i as Integer
+
+ sFirstName1 = "Test1" : sLastName1 = "Test2"
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.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
+
+ sVarResult(0) = sFirstName1 + " " + sLastName1
+ sVarResult(1) = fGetDate1(Date)
+
+ sFixResult(0) = "Éric Savary"
+ sFixResult(1) = "07/20/2000"
+ sFixResult(2) = "11:41:21"
+
+ printlog "Doc Information - Created"
+ '/// <b> Doc Information - Created </b>
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+ Call sMakeReadOnlyDocumentEditable
+
+ Call fFindWord ("Created")
+ Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ sVarResult(2)= fGetFieldContent()
+ Call wTypeKeys "<MOD1 Home>" , 3
+
+ '/// Change author to author :Test2 Test1
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ sFirstName = VorName.GetText
+ sLastName = ZuName.GetText
+ VorName.SetText sFirstName1
+ ZuName.SetText sLastName1
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// File / Properties / General , check "Apply user
+ '/// + data" , click "delete" button
+ Call fFileProperties("TabDokument")
+ BenutzerdatenVerwenden.Check
+ Sleep 1
+ Loeschen.Click
+ Sleep 1
+ TabDokument.OK
+
+ '/// Check if the Created field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Created")
+
+ Call wTypeKeys "<End><Right><Down><Home>"
+ Sleep 1
+
+ for i = 0 to 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult(i) then
+ Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(i) then
+ Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
+ end if
+ Call wTypeKeys "<End><Down><Home><Left><Home>"
+ next i
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() = sVarResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ 'Recover author to default
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ VorName.SetText sFirstName
+ ZuName.SetText sLastName
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ Call hCloseDocument
endcase
@@ -446,240 +464,256 @@ endcase
testcase tDocInformationModified
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos.sxw" )
-
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "08/18/2000"
- sFixResult(2) = "11:40:11"
-
- printlog "Doc Information - Modified"
- '/// <b> Doc Information - Modified </b>
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
- Call hFileSaveAsKill (sSaveAsFile)
-
- Call fFindWord ("Modified")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// File / Properties / General , check "Apply user
- '/// + data" , click "delete" button
- Call fFileProperties("TabDokument")
- BenutzerdatenVerwenden.Check
- Sleep 1
- Loeschen.Click
- Sleep 1
- TabDokument.OK
-
- FileSave
- try
- Kontext "Active"
- Active.Yes
- catch
- endcatch
- Sleep 3
-
- '/// Check if the Modified field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Modified")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ Dim sTestFile as String
+ Dim sOriginalFile as String
+ Dim sSaveasFile as String
+ Dim sFirstName as String
+ Dim sLastName as String
+ Dim sFirstName1 as String
+ Dim sLastName1 as String
+ Dim sVarResult(3) as String
+ Dim sFixResult(3) as String
+ Dim i as Integer
+
+ sFirstName1 = "Test1" : sLastName1 = "Test2"
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.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
+ sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos1.sxw" )
+
+ sVarResult(0) = sFirstName1 + " " + sLastName1
+ sVarResult(1) = fGetDate1(Date)
+
+ sFixResult(0) = "Éric Savary"
+ sFixResult(1) = "08/18/2000"
+ sFixResult(2) = "11:40:11"
+
+ printlog "Doc Information - Modified"
+ '/// <b> Doc Information - Modified </b>
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+ Call hFileSaveAsKill (sSaveAsFile)
+
+ Call fFindWord ("Modified")
+ Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ sVarResult(2)= fGetFieldContent()
+ Call wTypeKeys "<MOD1 Home>" , 3
+
+ '/// Change author to author : Test2 Test1
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ sFirstName = VorName.GetText
+ sLastName = ZuName.GetText
+ VorName.SetText sFirstName1
+ ZuName.SetText sLastName1
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// File / Properties / General , check "Apply user
+ '/// + data" , click "delete" button
+ Call fFileProperties("TabDokument")
+ BenutzerdatenVerwenden.Check
+ Sleep 1
+ Loeschen.Click
+ Sleep 1
+ TabDokument.OK
+
+ FileSave
+ try
+ Kontext "Active"
+ Active.Yes
+ catch
+ endcatch
+ Sleep 3
+
+ '/// Check if the Modified field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Modified")
+
+ Call wTypeKeys "<End><Right><Down><Home>"
+ Sleep 1
+
+ for i = 0 to 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult(i) then
+ Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(i) then
+ Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
+ end if
+ Call wTypeKeys "<End><Down><Home><Left><Home>"
+ next i
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() = sVarResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ 'Recover author to default
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ VorName.SetText sFirstName
+ ZuName.SetText sLastName
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ FileClose
+ Sleep 1
+ Kontext "Active"
+ if Active.Exists(2) then
+ try
+ Active.Yes
+ catch
+ endcatch
+ end if
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
'-----------------------------------------------------------------
testcase tDocInformationModifiedSavefile
- QaErrorLog "#i102792# - tDocInformationModifiedSavefile outcommented due to issue."
- goto endsub
-
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos.sxw" )
-
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "08/18/2000"
- sFixResult(2) = "11:40:11"
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- printlog "Doc Information - Modified (save file)"
- '/// <b> Doc Information - Modified (save file)</b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- Call fFindWord ("Modified")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Save the file as another file
- Call hFileSaveAsKill(sSaveAsFile)
-
- '/// Check if the Modified field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Modified")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- QAErrorlog "#i41327# Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- QAErrorlog "#i41327# Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ QaErrorLog "#i102792# - tDocInformationModifiedSavefile outcommented due to issue."
+ goto endsub
+
+ Dim sTestFile as String
+ Dim sOriginalFile as string
+ Dim sSaveasFile as String
+ Dim sFirstName as String
+ Dim sLastName as String
+ Dim sFirstName1 as String
+ Dim sLastName1 as String
+ Dim sVarResult(3) as String
+ Dim sFixResult(3) as String
+ Dim i as Integer
+
+ sFirstName1 = "Test1" : sLastName1 = "Test2"
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.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
+ sSaveasFile = ConvertPath (gOfficePath + "user\work\fields_docinfos1.sxw" )
+
+ sVarResult(0) = sFirstName1 + " " + sLastName1
+ sVarResult(1) = fGetDate1(Date)
+
+ sFixResult(0) = "Éric Savary"
+ sFixResult(1) = "08/18/2000"
+ sFixResult(2) = "11:40:11"
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+
+ printlog "Doc Information - Modified (save file)"
+ '/// <b> Doc Information - Modified (save file)</b>
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+
+ Call fFindWord ("Modified")
+ Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ sVarResult(2)= fGetFieldContent()
+ Call wTypeKeys "<MOD1 Home>" , 3
+
+ '/// Change author to author : Test2 Test1
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ sFirstName = VorName.GetText
+ sLastName = ZuName.GetText
+ VorName.SetText sFirstName1
+ ZuName.SetText sLastName1
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// Save the file as another file
+ Call hFileSaveAsKill(sSaveAsFile)
+
+ '/// Check if the Modified field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Modified")
+
+ Call wTypeKeys "<End><Right><Down><Home>"
+ Sleep 1
+
+ for i = 0 to 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult(i) then
+ QAErrorlog "#i41327# Should get " & sVarResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(i) then
+ Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
+ end if
+ Call wTypeKeys "<End><Down><Home><Left><Home>"
+ next i
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() = sVarResult(2) then
+ QAErrorlog "#i41327# Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ 'Recover author to default
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ VorName.SetText sFirstName
+ ZuName.SetText sLastName
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ FileClose
+ Sleep 1
+ Kontext "Active"
+ if Active.Exists(2) then
+ try
+ Active.Yes
+ catch
+ endcatch
+ end if
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
@@ -687,117 +721,126 @@ endcase
testcase tDocInformationPrinted
- Dim sTestFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult(3) as String
- Dim sFixResult(3) as String
- Dim i as Integer
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
-
- sVarResult(0) = sFirstName1 + " " + sLastName1
- sVarResult(1) = fGetDate1(Date)
-
- sFixResult(0) = "Éric Savary"
- sFixResult(1) = "08/11/2004"
- sFixResult(2) = "11:46:06"
-
- printlog "Doc Information - Printed"
- '/// <b> Doc Information - Printed </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- Call fFindWord ("Last printed")
- Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
- Call wTypeKeys "<Shift Right>"
- Sleep 1
- sVarResult(2)= fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Print file
- FilePrint
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- QAErrorLog "No Default-Printer! The testcase isn't tested !"
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.Cancel
- goto NoTest
- end if
- else
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.OK
- kontext "active"
- if active.exists(5) then
- QaErrorLog "Error Printing..."
- Active.ok
- end if
- end if
-
- '/// Check if the Printed field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Last printed")
-
- Call wTypeKeys "<End><Right><Down><Home>"
- Sleep 1
-
- for i = 0 to 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult(i) then
- Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(i) then
- Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
- end if
- Call wTypeKeys "<End><Down><Home><Left><Home>"
- next i
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult(2) then
- Warnlog "Should NOT get " & sFixResult(2)
- end if
-
- Call wTypeKeys "<End><Right>"
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult(2) then
- Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-NoTest:
- Call hCloseDocument
+ Dim sTestFile as String
+ Dim sOriginalFile as String
+ Dim sFirstName as String
+ Dim sLastName as String
+ Dim sFirstName1 as String
+ Dim sLastName1 as String
+ Dim sVarResult(3) as String
+ Dim sFixResult(3) as String
+ Dim i as Integer
+
+ sFirstName1 = "Test1" : sLastName1 = "Test2"
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.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
+
+
+ sVarResult(0) = sFirstName1 + " " + sLastName1
+ sVarResult(1) = fGetDate1(Date)
+
+ sFixResult(0) = "Éric Savary"
+ sFixResult(1) = "08/11/2004"
+ sFixResult(2) = "11:46:06"
+
+ printlog "Doc Information - Printed"
+ '/// <b> Doc Information - Printed </b>
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+
+ Call fFindWord ("Last printed")
+ Call wTypeKeys "<End><Right><Down><Down><Down><Home>"
+ Call wTypeKeys "<Shift Right>"
+ Sleep 1
+ sVarResult(2)= fGetFieldContent()
+ Call wTypeKeys "<MOD1 Home>" , 3
+
+ '/// Change author to author : Test2 Test1
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ sFirstName = VorName.GetText
+ sLastName = ZuName.GetText
+ VorName.SetText sFirstName1
+ ZuName.SetText sLastName1
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// Print file
+ FilePrint
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.Ok
+ QAErrorLog "No Default-Printer! The testcase isn't tested !"
+ Kontext "DruckenDlg"
+ Sleep 1
+ DruckenDlg.Cancel
+ goto NoTest
+ end if
+ else
+ Kontext "DruckenDlg"
+ Sleep 1
+ DruckenDlg.OK
+ kontext "active"
+ if active.exists(5) then
+ QaErrorLog "Error Printing..."
+ Active.ok
+ end if
+ end if
+
+ '/// Check if the Printed field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Last printed")
+
+ Call wTypeKeys "<End><Right><Down><Home>"
+ Sleep 1
+
+ for i = 0 to 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult(i) then
+ Warnlog "Should get " & sVarResult(i) & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(i) then
+ Warnlog "Should get " & sFixResult(i) & " but get " & fGetFieldContent()
+ end if
+ Call wTypeKeys "<End><Down><Home><Left><Home>"
+ next i
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() = sVarResult(2) then
+ Warnlog "Should NOT get " & sFixResult(2)
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult(2) then
+ Warnlog "Should get " & sFixResult(2) & " but get " & fGetFieldContent()
+ end if
+
+ 'Recover author to default
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ VorName.SetText sFirstName
+ ZuName.SetText sLastName
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ NoTest:
+ Call hCloseDocument
endcase
@@ -805,95 +848,104 @@ endcase
testcase tDocInformationRevisionnumber
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sFirstName as String
- Dim sLastName as String
- Dim sFirstName1 as String
- Dim sLastName1 as String
- Dim sVarResult as String
- Dim sFixResult as String
-
- sFirstName1 = "Test1" : sLastName1 = "Test2"
- sVarResult = "17" : sFixResult = "4"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- printlog "Doc Information - Revision number"
- '/// <b> Doc Information - Revision number</b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- '/// Change author to author : Test2 Test1
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- sFirstName = VorName.GetText
- sLastName = ZuName.GetText
- VorName.SetText sFirstName1
- ZuName.SetText sLastName1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- '/// Save the file as another file
- Call hFileSaveAsKill(sSaveAsFile)
-
- '/// Press F9
- Call wTypeKeys "<F9>"
-
- '/// Save the file
- FileSave
- try
- Kontext "Active"
- Active.Yes
- catch
- endcatch
- Sleep 3
-
- '/// Check if the Revision number field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Version")
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sVarResult then
- Warnlog "Should get " & sVarResult & " but get " & fGetFieldContent()
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult then
- Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
- end if
-
- 'Recover author to default
- ToolsOptions
- Call hToolsOptions("STAROFFICE","USERDATA")
- VorName.SetText sFirstName
- ZuName.SetText sLastName
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ Dim sTestFile as String
+ Dim sOriginalFile as string
+ Dim sSaveasFile as String
+ Dim sFirstName as String
+ Dim sLastName as String
+ Dim sFirstName1 as String
+ Dim sLastName1 as String
+ Dim sVarResult as String
+ Dim sFixResult as String
+
+ sFirstName1 = "Test1" : sLastName1 = "Test2"
+ sVarResult = "17" : sFixResult = "4"
+
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.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
+ sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+
+ printlog "Doc Information - Revision number"
+ '/// <b> Doc Information - Revision number</b>
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+
+ '/// Change author to author : Test2 Test1
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ sFirstName = VorName.GetText
+ sLastName = ZuName.GetText
+ VorName.SetText sFirstName1
+ ZuName.SetText sLastName1
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ '/// Save the file as another file
+ Call hFileSaveAsKill(sSaveAsFile)
+
+ '/// Press F9
+ Call wTypeKeys "<F9>"
+
+ '/// Save the file
+ FileSave
+ try
+ Kontext "Active"
+ Active.Yes
+ catch
+ endcatch
+ Sleep 3
+
+ '/// Check if the Revision number field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Version")
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sVarResult then
+ Warnlog "Should get " & sVarResult & " but get " & fGetFieldContent()
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult then
+ Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
+ end if
+
+ 'Recover author to default
+ ToolsOptions
+ Call hToolsOptions("STAROFFICE","USERDATA")
+ VorName.SetText sFirstName
+ ZuName.SetText sLastName
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ FileClose
+ Sleep 1
+ Kontext "Active"
+ if Active.Exists(2) then
+ try
+ Active.Yes
+ catch
+ endcatch
+ end if
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
@@ -901,79 +953,87 @@ endcase
testcase tDocInformationTotaleditingtime
- Dim sTestFile as String
- Dim sSaveasFile as String
- Dim sVarResult as String
- Dim sFixResult as String
-
- sFixResult = "00:29:05"
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.sxw")
- sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
-
- printlog "Doc Information - Tatal editing time"
- '/// <b> Doc Information - Tatal editing time </b>
-
- Call hNewDocument
-
- '/// Open test file fields_docinfos.sxw
- Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
-
- '/// Save the file as another file
- Call hFileSaveAsKill(sSaveAsFile)
-
- '/// Press F9
- Call wTypeKeys "<F9>"
-
- Call fFindWord ("Accessed")
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- sVarResult = fGetFieldContent()
- Call wTypeKeys "<MOD1 Home>" , 3
-
- '/// Save the file
- FileSave
- try
- Kontext "Active"
- Active.Yes
- catch
- endcatch
- Sleep 3
-
- '/// Check if the tatal editing time field is changed in the document
- '/// It should be changed in Var
- '/// It should NOT be changed in Fix
- Call fFindWord ("Accessed")
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
-
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() = sVarResult then
- Warnlog "Should NOT get " & sVarResult
- end if
-
- Call wTypeKeys "<End><Right>"
- Sleep 1
- Call wTypeKeys "<Shift Right>"
- if fGetFieldContent() <> sFixResult then
- Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
- end if
-
- FileClose
- Sleep 1
- Kontext "Active"
- if Active.Exists(2) then
- try
- Active.Yes
- catch
- endcatch
- end if
-
- if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+ Dim sTestFile as String
+ Dim sOriginalFile as string
+ Dim sSaveasFile as String
+ Dim sVarResult as String
+ Dim sFixResult as String
+
+ sFixResult = "00:29:05"
+ sTestFile = Convertpath (gOfficePath + "user\work\fields_docinfos.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\fields_docinfos.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
+ sSaveasFile = ConvertPath (gOfficePath + "user\work\tDocInformationRevisionnumber.sxw" )
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
+
+ printlog "Doc Information - Tatal editing time"
+ '/// <b> Doc Information - Tatal editing time </b>
+
+ Call hNewDocument
+
+ '/// Open test file fields_docinfos.sxw
+ Call hFileOpen(sTestFile)
+
+ '/// Save the file as another file
+ Call hFileSaveAsKill(sSaveAsFile)
+
+ '/// Press F9
+ Call wTypeKeys "<F9>"
+
+ Call fFindWord ("Accessed")
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ sVarResult = fGetFieldContent()
+ Call wTypeKeys "<MOD1 Home>" , 3
+
+ '/// Save the file
+ FileSave
+ try
+ Kontext "Active"
+ Active.Yes
+ catch
+ endcatch
+ Sleep 3
+
+ '/// Check if the tatal editing time field is changed in the document
+ '/// It should be changed in Var
+ '/// It should NOT be changed in Fix
+ Call fFindWord ("Accessed")
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() = sVarResult then
+ Warnlog "Should NOT get " & sVarResult
+ end if
+
+ Call wTypeKeys "<End><Right>"
+ Sleep 1
+ Call wTypeKeys "<Shift Right>"
+ if fGetFieldContent() <> sFixResult then
+ Warnlog "Should get " & sFixResult & " but get " & fGetFieldContent()
+ end if
+
+ FileClose
+ Sleep 1
+ Kontext "Active"
+ if Active.Exists(2) then
+ try
+ Active.Yes
+ catch
+ endcatch
+ end if
+
+ if hFileExists ( sSaveAsFile ) then app.kill ( sSaveAsFile )
endcase
diff --git a/testautomation/writer/optional/includes/fields/w_fields6.inc b/testautomation/writer/optional/includes/fields/w_fields6.inc
index 1d25c81ac69d..376813e22e40 100755
--- a/testautomation/writer/optional/includes/fields/w_fields6.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields6.inc
@@ -788,8 +788,6 @@ endcase
'-----------------------------------------------------------------
testcase tFunctionsCombineCharacter
-Warnlog "#i102752# - tFunctionsCombineCharacter outcommented due to bug."
-goto endsub
Dim sCombineCharacter as String
Dim sTestFile as String
diff --git a/testautomation/writer/optional/includes/fields/w_fields7.inc b/testautomation/writer/optional/includes/fields/w_fields7.inc
index 96e851691fa6..c73408d4702f 100755
--- a/testautomation/writer/optional/includes/fields/w_fields7.inc
+++ b/testautomation/writer/optional/includes/fields/w_fields7.inc
@@ -188,6 +188,7 @@ testcase tL10NtestDate
end if
Dim sTestFile as String
+ Dim sOriginalFile as string
Dim sDate() as String
Dim iCountry() as Integer
Dim i , j as Integer
@@ -199,6 +200,7 @@ testcase tL10NtestDate
if iSprache <> 01 then
QAErrorlog "This is a English-only testcase"
+ goto endsub
end if
Call hNewDocument
@@ -219,7 +221,16 @@ testcase tL10NtestDate
ExtrasOptionenDlg.Cancel
Call hCloseDocument
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\Date.sxw")
+ sTestFile = Convertpath (gOfficepath + "user\work\Date.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\Date.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
+
sDate = Array( _
"Tuesday, August 3, 2004" , _
@@ -244,7 +255,6 @@ testcase tL10NtestDate
'/// Open test file Date.sxw
Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
'/// Check if Date is changed after language is changed
j = UBound(iCountry)
@@ -296,10 +306,11 @@ endcase
testcase tL10NtestTime
if iSprache <> 1 then
QaErrorLog "Currently no any other language than English. Aborting."
- exit sub
+ goto endsub
end if
Dim sTestFile as String
+ Dim sOriginalFile as string
Dim sTime() as String
Dim iCountry() as Integer
Dim i as Integer
@@ -312,6 +323,7 @@ testcase tL10NtestTime
if iSprache <> 01 then
QAErrorlog "This is a English-only testcase"
+ goto endsub
end if
Call hNewDocument
@@ -332,7 +344,16 @@ testcase tL10NtestTime
ExtrasOptionenDlg.Cancel
Call hCloseDocument
- sTestFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\Time.sxw")
+ sTestFile = Convertpath (gOfficepath + "user\work\Time.sxw")
+ sOriginalFile = Convertpath (gTesttoolpath + "writer\optional\input\fields\Time.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
+
sTime = Array( _
"04:46:08 PM" , _
@@ -357,7 +378,6 @@ testcase tL10NtestTime
'/// Open test file Time.sxw
Call hFileOpen(sTestFile)
- Call sMakeReadOnlyDocumentEditable
'/// Check if time is changed after language is changed
j = UBound(iCountry)
diff --git a/testautomation/writer/optional/includes/option/wh_o_1.inc b/testautomation/writer/optional/includes/option/wh_o_1.inc
index c27598c2816a..508030bdc4d7 100755
--- a/testautomation/writer/optional/includes/option/wh_o_1.inc
+++ b/testautomation/writer/optional/includes/option/wh_o_1.inc
@@ -559,7 +559,7 @@ testcase tToolsOptionsHTMLGrid
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.Cancel
- sleep (2)
+ sleep (4)
'-------------------------------------------------------------------------------
printlog ("'/// Function Test: Grid Resolution ///'")
diff --git a/testautomation/writer/optional/includes/option/wh_o_2.inc b/testautomation/writer/optional/includes/option/wh_o_2.inc
index 998aab11714a..ca7c0a789349 100755
--- a/testautomation/writer/optional/includes/option/wh_o_2.inc
+++ b/testautomation/writer/optional/includes/option/wh_o_2.inc
@@ -130,7 +130,7 @@ testcase tToolsOptionsHTMLPrint
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
- sleep (2)
+ sleep (4)
Call hFileSaveAsKill(gOfficepath + "user\work\printtest.html")
Call hCloseDocument