diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-03-24 10:33:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-03-24 10:33:51 +0000 |
commit | 528d1effaee79ea3e03ba1553a59b6a5cf360168 (patch) | |
tree | 18c50dfef569a7bbdbd1a7eeb30deccc841f5f4e /smoketestdoc | |
parent | 8d2d57012c83f3a42a905b582fcb0eeca6365c67 (diff) |
fix smoketest post-merge
Diffstat (limited to 'smoketestdoc')
-rw-r--r-- | smoketestdoc/data/Global.xml | 23 | ||||
-rw-r--r-- | smoketestdoc/data/OptionsDlg.xml | 2 | ||||
-rw-r--r-- | smoketestdoc/data/Test_10er.xml | 40 | ||||
-rw-r--r-- | smoketestdoc/data/content.xml | 2 |
4 files changed, 46 insertions, 21 deletions
diff --git a/smoketestdoc/data/Global.xml b/smoketestdoc/data/Global.xml index a35a8300d..3991a36bb 100644 --- a/smoketestdoc/data/Global.xml +++ b/smoketestdoc/data/Global.xml @@ -35,7 +35,7 @@ const cParagraphBreak = 0 global const cExtensionFileName = "TestExtension.oxt" -global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocClose = 3 +global const cDocNew = 0, cDocSaveOpen8 = 1, cDocSaveOpenXML = 2, cDocOpen50 = 3, cDocClose = 4 global const cDBService = 0, cDBOpen = 1, cDBInsert = 2, cDBDelete = 3, cDBSeek = 4, cDBClose = 5 global const cEXTService = 0, cEXTInstall = 1, cEXTUninstall = 2 global const cTestClosureSetupDoc = 0, cTestClosureWriteStatus = 1 @@ -90,6 +90,7 @@ Global const cUserFieldTestDraw = "Draw", cUserFieldTestMath = "M Global const cUserFieldTestHTML = "HTML", cUserFieldTestJava = "Java", cUserFieldTestDatabase = "Database" Global const cUserFieldTestExtension = "Extension" Global const cUserFieldTestOpenSaveXML = "SaveOpenXML" +Global const cUserFieldTestOpen50 = "Open50" Global const cUserFieldTestTerminateAfterTest = "Terminate", cUserFieldTestOpenSave8 = "SaveOpen8" Global const cOptionsDialogName = "OptionsDlg", cTest10Modul = "Standard" @@ -107,7 +108,7 @@ Global bMakeWriterTest as boolean, bMakeCalcTest as boolean, bMakeImpressTest a Global bMakeDrawTest as Boolean, bMakeMathTest as boolean, bMakeChartTest as boolean Global bMakeHTMLTest as boolean, bMakeJavaTest as boolean, bMakeDBTest as boolean Global bMakeExtensionTest as boolean -Global bMakeSaveOpenXMLTest as boolean +Global bMakeSaveOpenXMLTest as boolean, bMakeOpen50Test as boolean Global bMakeTerminateAfterTest as boolean, bShowTable as boolean Global bMakeSaveOpen8Test as boolean @@ -231,10 +232,11 @@ Sub CreateStatusTable tableHeaders(cStHTML) = "HTML" tableHeaders(cStJava) = "Java" - dim tableRows(3) as string + dim tableRows(4) as string tableRows(cDocNew) = "new" tableRows(cDocSaveOpen8) = "V8.0" tableRows(cDocSaveOpenXML) = "XML" + tableRows(cDocOpen50) = "V5.0" tableRows(cDocClose) = "close" aDoc = gOutputDoc @@ -250,7 +252,7 @@ Sub CreateStatusTable xCursor.GoRight (1, False) table = aDoc.createInstance("com.sun.star.text.TextTable") - table.initialize(5,9) + table.initialize(6,9) table.Name = "StTab1" table.BackColor = cCoGrey xText.insertTextContent(xCursor, table, FALSE) @@ -336,7 +338,7 @@ Sub CreateDocState table = aDoc.TextTables.GetByIndex (1) for j% = 0 to 7 - for i% = 0 to 3 + for i% = 0 to 4 sRangeName = GetRangeName(j%, i%+1) tableCursor = table.createCursorByCellName(sRangeName) @@ -568,6 +570,7 @@ Sub SetOptions SetUserFieldState (cUserFieldTestDatabase, -(gOptionsDialog.getControl("cbDatabaseTest").getState), gOutputDoc) SetUserFieldState (cUserFieldTestExtension, -(gOptionsDialog.getControl("cbExtensionTest").getState), gOutputDoc) SetUserFieldState (cUserFieldTestOpenSaveXML, -(gOptionsDialog.getControl("cbSaveOpenXMLTest").getState), gOutputDoc) + SetUserFieldState (cUserFieldTestOpen50, -(gOptionsDialog.getControl("cbOpen50Test").getState), gOutPutDoc) SetUserFieldState (cUserFieldTestOpenSave8, -(gOptionsDialog.getControl("cbSaveOpen8Test").getState), gOutputDoc) SetUserFieldState (cUserFieldTestTerminateAfterTest, -(gOptionsDialog.getControl("cbTerminateAfterTest").getState), gOutputDoc) end Sub @@ -585,6 +588,7 @@ Sub GetOptions gOptionsDialog.getControl("cbDatabaseTest").setState( -( GetUserFieldState (cUserFieldTestDatabase, gOutputDoc))) gOptionsDialog.getControl("cbExtensionTest").setState( -( GetUserFieldState (cUserFieldTestExtension, gOutputDoc))) gOptionsDialog.getControl("cbSaveOpenXMLTest").setState( -( GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc))) + gOptionsDialog.getControl("cbOpen50Test").setState( -( GetUserFieldState (cUserFieldTestOpen50, gOutPutDoc))) gOptionsDialog.getControl("cbSaveOpen8Test").setState( -( GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc))) gOptionsDialog.getControl("cbTerminateAfterTest").setState( -( GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc))) End Sub @@ -602,6 +606,7 @@ Sub ReadOptions bMakeDBTest = GetUserFieldState (cUserFieldTestDatabase, gOutputDoc) bMakeExtensionTest = GetUserFieldState (cUserFieldTestExtension, gOutputDoc) bMakeSaveOpenXMLTest = GetUserFieldState (cUserFieldTestOpenSaveXML, gOutputDoc) + bMakeOpen50Test = GetUserFieldState (cUserFieldTestOpen50, gOutPutDoc) bMakeSaveOpen8Test = GetUserFieldState (cUserFieldTestOpenSave8, gOutputDoc) bMakeTerminateAfterTest = GetUserFieldState (cUserFieldTestTerminateAfterTest, gOutputDoc) end Sub @@ -625,6 +630,11 @@ Sub SetDefaultOptions End If bMakeSaveOpenXMLTest = true REM Disable StarOffice 5.0 tests in case binfilter has not been included + if Environ("WITH_BINFILTER") = "NO" then + bMakeOpen50Test = false + else + bMakeOpen50Test = true + End If bMakeSaveOpen8Test = true bMakeTerminateAfterTest = false end Sub @@ -659,10 +669,11 @@ Function StartTestWithDefaultOptions component(cStJava) = "Java" component(cStDataBase) = "Base" component(cStExtension) = "Extensions" - dim action(3) as string + dim action(4) as string action(cDocNew) = "new" action(cDocSaveOpen8) = "V8.0" action(cDocSaveOpenXML) = "XML" + action(cDocOpen50) = "V5.0" action(cDocClose) = "close" dim baseAction(5) as string baseAction(cDBService) = "services" diff --git a/smoketestdoc/data/OptionsDlg.xml b/smoketestdoc/data/OptionsDlg.xml index c03026185..809f03712 100644 --- a/smoketestdoc/data/OptionsDlg.xml +++ b/smoketestdoc/data/OptionsDlg.xml @@ -47,7 +47,7 @@ </dlg:titledbox> <dlg:checkbox dlg:id="cbSaveOpen8Test" dlg:tab-index="12" dlg:left="126" dlg:top="21" dlg:width="80" dlg:height="8" dlg:value="Save / Open V8.0" dlg:checked="false"/> <dlg:checkbox dlg:id="cbSaveOpenXMLTest" dlg:tab-index="13" dlg:left="126" dlg:top="35" dlg:width="80" dlg:height="8" dlg:value="Save / Open XML" dlg:checked="false"/> - + <dlg:checkbox dlg:id="cbOpen50Test" dlg:tab-index="14" dlg:left="126" dlg:top="49" dlg:width="80" dlg:height="8" dlg:value="Open V5.0" dlg:checked="false"/> <dlg:titledbox dlg:id="fmBroker" dlg:tab-index="15" dlg:left="7" dlg:top="169" dlg:width="208" dlg:height="17"/> <dlg:checkbox dlg:id="cbTerminateAfterTest" dlg:tab-index="16" dlg:disabled="true" dlg:left="19" dlg:top="174" dlg:width="190" dlg:height="8" dlg:value="Terminate Office after test" dlg:checked="false"/> diff --git a/smoketestdoc/data/Test_10er.xml b/smoketestdoc/data/Test_10er.xml index 26c85ea0b..d93077be0 100644 --- a/smoketestdoc/data/Test_10er.xml +++ b/smoketestdoc/data/Test_10er.xml @@ -91,6 +91,22 @@ Sub DeleteAllSavedFiles() If FileExists (sFileName) then Kill (sFileName) End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmWriter or cFlt50) + If FileExists (sFileName) then + Kill (sFileName) + End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmCalc or cFlt50) + If FileExists (sFileName) then + Kill (sFileName) + End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmImpress or cFlt50) + If FileExists (sFileName) then + Kill (sFileName) + End If + sFileName = sWorkPath+cTempFileName+"."+GetDocEndings(frmDraw or cFlt50) + If FileExists (sFileName) then + Kill (sFileName) + End If End Sub Sub DeleteAllLogFiles() @@ -324,7 +340,7 @@ end Sub Sub MakeDocTest Dim oDoc as Object - Dim sFileNameXML$, sFileName8$ + Dim sFileNameXML$, sFileName50$, sFileName8$ Dim bSuccess as Boolean On Local Error GoTo DOCTESTERROR @@ -334,9 +350,9 @@ Sub MakeDocTest oDoc = LoadDoc ("private:factory/" + GetDocFilter(gCurrentDocTest or cFltNewDoc)) LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+" "+ cMessageNewDoc, not IsNull (oDoc) ) if not IsNull (oDoc) then - gCurrentTestCase = cDocSaveOpen8 - if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then - sFileName8 = sWorkPathURL+cTempFileName+"."+GetDocEndings(gCurrentDocTest or cFlt8) + gCurrentTestCase = cDocSaveOpen8 + if bMakeSaveOpen8Test and IsFilterAvailable (gCurrentDocTest or cFlt8) then + sFileName8 = sWorkPathURL+cTempFileName+"."+GetDocEndings(gCurrentDocTest or cFlt8) SaveDoc (sFileName8, oDoc, GetDocFilter(gCurrentDocTest or cFlt8)) end if gCurrentTestCase = cDocSaveOpenXML @@ -372,24 +388,22 @@ Sub MakeDocTest oDoc.close (true) end If end if - - nCurrentAction = cDocOpen50 - if bMakeOpen50Test and IsFilterAvailable (FilterType or cFlt50) then + + gCurrentTestCase = cDocOpen50 + if bMakeOpen50Test and IsFilterAvailable (gCurrentDocTest or cFlt50) then SOLARSRC = ConvertToURL(Environ("SOLARSRC")) - sFileName50 = SOLARSRC+"/qadevOOo/testdocs/"+cTempFileName+"."+GetDocEndings(FilterType or cFlt50) + sFileName50 = SOLARSRC+"/qadevOOo/testdocs/ttt."+GetDocEndings(gCurrentDocTest or cFlt50) oDoc = LoadDoc (sFileName50) ' oDoc = Documents.open(sFileName) - LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageSave50Doc, FileChannel) - LogState (not IsNull (oDoc),GetDocFilter(FilterType or cFltNewDoc)+" "+ cMessageOpen50Doc, MainFileChannel) - SetStatus (FilterType, cDocOpen50, not IsNull (oDoc)) + LogTestResult( GetDocFilter(gCurrentDocTest or cFltNewDoc)+" "+ cMessageOpen50Doc, not IsNull (oDoc) ) if not IsNull (oDoc) then -' oDoc.dispose - nCurrentAction = cDocClose + gCurrentTestCase = cDocClose oDoc.close (true) end If end if + end If Print #LocalTestLog, "---" Close #LocalTestLog% diff --git a/smoketestdoc/data/content.xml b/smoketestdoc/data/content.xml index 3c81bbfba..5aba7013c 100644 --- a/smoketestdoc/data/content.xml +++ b/smoketestdoc/data/content.xml @@ -97,7 +97,7 @@ <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Math"/> <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Chart"/> <text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpenXML"/> - <text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpen50"/> + <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Open50"/> <text:user-field-decl text:value-type="string" text:string-value="n" text:name="Terminate"/> <text:user-field-decl text:value-type="string" text:string-value="y" text:name="Java"/> <text:user-field-decl text:value-type="string" text:string-value="y" text:name="SaveOpen8"/> |