From 3ce3842f24d6d822d1a85422273059bfb228ef33 Mon Sep 17 00:00:00 2001 From: "Ocke Janssen [oj]" Date: Fri, 22 Jan 2010 08:14:22 +0100 Subject: dba33f: #i108548# extend SingleSelectQueryComposer appendFilterByColumn with additonal parameter --- .../java/ifc/sdb/_XSingleSelectQueryComposer.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java index 03c9a43c918f..3926fa049bb1 100644 --- a/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java +++ b/qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer.java @@ -39,6 +39,7 @@ import lib.StatusException; import lib.Status; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.XPropertySet; +import com.sun.star.sdb.SQLFilterOperator; /** * Testing com.sun.star.sdb.XSingleSelectQueryComposer @@ -168,7 +169,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { boolean ok = true; try{ - oObj.appendFilterByColumn(xProp, true); + oObj.appendFilterByColumn(xProp, true,SQLFilterOperator.EQUAL); log.println("appendFilterByColumn: " + xQueryAna.getFilter()); ok = ok && (xQueryAna.getFilter().indexOf(colName) > 0); @@ -179,7 +180,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { try{ - oObj.appendFilterByColumn(xProp, false); + oObj.appendFilterByColumn(xProp, false,SQLFilterOperator.EQUAL); log.println("appendFilterByColumn: " + xQueryAna.getFilter()); ok = ok && (xQueryAna.getFilter().indexOf(colName) > 0); @@ -190,8 +191,8 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { try{ XPropertySet dummy = null; - oObj.appendFilterByColumn(dummy, true); - log.println("unexpected Exception was not thorwn"); + oObj.appendFilterByColumn(dummy, true,SQLFilterOperator.EQUAL); + log.println("expected Exception was not thrown"); tRes.tested("appendFilterByColumn()", false); } catch (com.sun.star.sdbc.SQLException e){ @@ -223,7 +224,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { try{ XPropertySet dummy = null; oObj.appendGroupByColumn(dummy); - log.println("unexpected Exception was not thorwn"); + log.println("expected Exception was not thrown"); tRes.tested("appendGroupByColumn()", false); } catch (com.sun.star.sdbc.SQLException e){ @@ -316,7 +317,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { boolean ok = true; try{ - oObj.appendHavingClauseByColumn(xProp, true); + oObj.appendHavingClauseByColumn(xProp, true,SQLFilterOperator.EQUAL); log.println("appendHavingClauseByColumn: " + xQueryAna.getFilter()); ok = ok && (xQueryAna.getFilter().indexOf(colName) > 0); @@ -326,8 +327,8 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { } try{ XPropertySet dummy = null; - oObj.appendHavingClauseByColumn(dummy, true); - log.println("unexpected Exception was not thorwn"); + oObj.appendHavingClauseByColumn(dummy, true,SQLFilterOperator.EQUAL); + log.println("expected Exception was not thrown"); tRes.tested("appendHavingClauseByColumn()", false); } catch (com.sun.star.sdbc.SQLException e){ @@ -359,7 +360,7 @@ public class _XSingleSelectQueryComposer extends MultiMethodTest { try{ XPropertySet dummy = null; oObj.appendOrderByColumn(dummy, true); - log.println("unexpected Exception was not thorwn"); + log.println("expected Exception was not thrown"); tRes.tested("appendOrderByColumn()", false); } catch (com.sun.star.sdbc.SQLException e){ -- cgit v1.2.3 From f9efcb878a31f1f8f9ee3550216879966a872e55 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Fri, 28 May 2010 11:47:48 +0200 Subject: dba33f: fix some coding errors --- .../dbaccess/optional/includes/ctrl_Several1.inc | 2 +- .../dbaccess/optional/includes/ctrl_Several2.inc | 9 +++---- .../dbaccess/optional/includes/db_Relations.inc | 14 ++++++---- .../optional/includes/wiz_DatabaseWizard.inc | 31 ---------------------- .../dbaccess/required/includes/MainApp.inc | 5 +++- .../dbaccess/required/includes/Query.inc | 7 +++-- .../dbaccess/required/includes/Table.inc | 5 +++- .../dbaccess/required/includes/TableDesign.inc | 5 +++- testautomation/dbaccess/tools/formtools.inc | 2 +- testautomation/dbaccess/tools/reporttools.inc | 12 ++++----- testautomation/dbaccess/tools/tabletools.inc | 9 ++++--- testautomation/global/win/edia_t_z.win | 2 +- 12 files changed, 43 insertions(+), 60 deletions(-) mode change 100644 => 100755 testautomation/dbaccess/optional/includes/ctrl_Several1.inc mode change 100644 => 100755 testautomation/dbaccess/optional/includes/ctrl_Several2.inc mode change 100644 => 100755 testautomation/dbaccess/optional/includes/db_Relations.inc mode change 100644 => 100755 testautomation/dbaccess/required/includes/Query.inc mode change 100644 => 100755 testautomation/dbaccess/required/includes/Table.inc mode change 100644 => 100755 testautomation/dbaccess/required/includes/TableDesign.inc mode change 100644 => 100755 testautomation/dbaccess/tools/formtools.inc mode change 100644 => 100755 testautomation/dbaccess/tools/reporttools.inc mode change 100644 => 100755 testautomation/dbaccess/tools/tabletools.inc diff --git a/testautomation/dbaccess/optional/includes/ctrl_Several1.inc b/testautomation/dbaccess/optional/includes/ctrl_Several1.inc old mode 100644 new mode 100755 index 71a581f52cdf..0d7b24cbc0f2 --- a/testautomation/dbaccess/optional/includes/ctrl_Several1.inc +++ b/testautomation/dbaccess/optional/includes/ctrl_Several1.inc @@ -586,7 +586,7 @@ testcase tComboBox endcase '-------------------------------------------------------------------------------------- -testcase tLabelField +testcase tLabelField '/// Open a new document, printlog "Open a new document," diff --git a/testautomation/dbaccess/optional/includes/ctrl_Several2.inc b/testautomation/dbaccess/optional/includes/ctrl_Several2.inc old mode 100644 new mode 100755 index 182be64e9ac8..4d49e459b231 --- a/testautomation/dbaccess/optional/includes/ctrl_Several2.inc +++ b/testautomation/dbaccess/optional/includes/ctrl_Several2.inc @@ -234,12 +234,9 @@ testcase tImageButton printlog "set properties" 'to activate property: scale, following properties must be active: Graphics (with choosen path) Kontext "TabGeneralControl" - if gNetzInst = false then - fsetControlProperty("ImageButton","Graphics", gOfficePath + ConvertPath("share/gallery/bullets/blkpearl.gif")) - else - fsetControlProperty("ImageButton","Graphics", gNetzOfficePath + ConvertPath("share/gallery/bullets/blkpearl.gif")) - endif - sleep(1) + fsetControlProperty("ImageButton","Graphics", gOfficePath + ConvertPath("share/gallery/bullets/blkpearl.gif")) + + sleep(1) TabGeneralControl.TypeKeys "" , true fsetControlProperty("ImageControl","Scale","1") 'listbox content: no 'fsetControlProperty("ImageControl","Frame","4") diff --git a/testautomation/dbaccess/optional/includes/db_Relations.inc b/testautomation/dbaccess/optional/includes/db_Relations.inc old mode 100644 new mode 100755 index 3d10a132d43a..e04a1be4c6d6 --- a/testautomation/dbaccess/optional/includes/db_Relations.inc +++ b/testautomation/dbaccess/optional/includes/db_Relations.inc @@ -32,8 +32,10 @@ '\*********************************************************************** function tRelation( sFileName, sPWD, sRelTable1, sRelTable2 ) '/// create an 1:1 and 1:n relation between two test tables - Dim i, j, ix as integer 'counter - Dim iNoDS as integer 'number of data source in listbox + Dim i as integer 'counter + Dim j as integer 'counter + Dim ix as integer 'counter + Dim iNoDS as integer 'number of data source in listbox Dim iNoTab as integer 'number of tables in grid Dim DSOK as boolean 'datasource present check @@ -206,8 +208,10 @@ end function function tDoubleRelation( sFileName, sPWD, sRelTable1, sRelTable2, sRelTable3 ) '/// create an 1:1 relation, close and save relation dialog, '/// reopen the dialog and add an 1:n relation with third test table - Dim i, j, ix as integer 'counter - Dim iNoDS as integer 'number of data source in listbox + Dim i as integer 'counter + Dim j as integer 'counter + Dim ix as integer 'counter + Dim iNoDS as integer 'number of data source in listbox Dim iNoTab as integer 'number of tables in grid Dim DSOK as boolean 'datasource present check @@ -351,7 +355,7 @@ function tDoubleRelation( sFileName, sPWD, sRelTable1, sRelTable2, sRelTable3 ) if breltablefound <> 1 then 'needed table not found if variable <> 1 warnlog "proper table: " + sRelTable3 + " not found - test abort" - call fCloseRealtionDesign + call fCloseRelationDesign call fCloseDatabase exit function else diff --git a/testautomation/dbaccess/optional/includes/wiz_DatabaseWizard.inc b/testautomation/dbaccess/optional/includes/wiz_DatabaseWizard.inc index eb8dd4a15c35..bd25224ba429 100755 --- a/testautomation/dbaccess/optional/includes/wiz_DatabaseWizard.inc +++ b/testautomation/dbaccess/optional/includes/wiz_DatabaseWizard.inc @@ -233,38 +233,7 @@ qaerrorlog "not yet implemented" endcase '------------------------------------------------------------------------- testcase tAdabas - - qaerrorlog "not yet implemented" - goto endsub - qaerrorlog "not yet implemented" - goto endsub - - if gPlatform = "x86" then - printlog "Adabas doesn't exists under x86." - goto endsub - elseif gOOO then - printlog "Adabas doesn't exists under Openoffice.org." - goto endsub - end if - - dim aDatabaseProperties(6) as string - aDatabaseProperties() = tools_dbtools_fgetAdabasDatabaseProperties() - - ' if and only if no properties are defined in the environment file the test is stopped - if(aDatabaseProperties(1) = "no") then - qaerrorlog "No database properties from Adabas defiened. The Test is stopped here." - goto endsub - endif - - call fCreateAdabasDatasource( sFileName, aDatabaseProperties(2), aDatabaseProperties(3), aDatabaseProperties(4)) - call fOpendatabase(gOfficePath + "user/work/tt_adabas.odb","testuser") - - Kontext "ContainerView" - ViewTables - - call fCloseDatabase(true) - endcase '------------------------------------------------------------------------- testcase tdBase diff --git a/testautomation/dbaccess/required/includes/MainApp.inc b/testautomation/dbaccess/required/includes/MainApp.inc index fa3c1a4b0a14..4d5855ac9bba 100755 --- a/testautomation/dbaccess/required/includes/MainApp.inc +++ b/testautomation/dbaccess/required/includes/MainApp.inc @@ -608,7 +608,10 @@ endcase '------------------------------------------------------------------------- function getMenuItemCount as Integer 'use this function becasue this doesn't count the pick list - Dim i, j, Ende, nID as Integer + Dim i as Integer + Dim j as Integer + Dim Ende as Integer + Dim nID as Integer Sleep 2 j=0 for i=1 to MenuGetItemCount diff --git a/testautomation/dbaccess/required/includes/Query.inc b/testautomation/dbaccess/required/includes/Query.inc old mode 100644 new mode 100755 index d981fd79656e..f6fa45acbdd7 --- a/testautomation/dbaccess/required/includes/Query.inc +++ b/testautomation/dbaccess/required/includes/Query.inc @@ -156,7 +156,7 @@ testcase tSwitchDesign sTableName = TableName.GetSelText printlog "- Add 'biblio' table to query design" if sTableName <> "biblio" then - warnlog "It should be the 'biblio'-database table but it is the '" & SelEntry & "' database table?!" + warnlog "It should be the 'biblio'-database table but it is the '" & sTableName & "' database table?!" goto endsub else AddTable.Click @@ -909,7 +909,10 @@ endcase '------------------------------------------------------------------------- function getMenuItemCount as Integer 'use this function becasue this doesn't count the pick list - Dim i, j, Ende, nID as Integer + Dim i as Integer + Dim j as Integer + Dim Ende as Integer + Dim nID as Integer Sleep 2 j=0 for i=1 to MenuGetItemCount diff --git a/testautomation/dbaccess/required/includes/Table.inc b/testautomation/dbaccess/required/includes/Table.inc old mode 100644 new mode 100755 index 93c9341d5f6a..f7a00c22fcd5 --- a/testautomation/dbaccess/required/includes/Table.inc +++ b/testautomation/dbaccess/required/includes/Table.inc @@ -588,7 +588,10 @@ endcase '------------------------------------------------------------------------- function getMenuItemCount as Integer 'use this function becasue this doesn't count the pick list - Dim i, j, Ende, nID as Integer + Dim i as Integer + Dim j as Integer + Dim Ende as Integer + Dim nID as Integer Sleep 2 j=0 for i=1 to MenuGetItemCount diff --git a/testautomation/dbaccess/required/includes/TableDesign.inc b/testautomation/dbaccess/required/includes/TableDesign.inc old mode 100644 new mode 100755 index 42d86ccd0c5f..9204d34de1b9 --- a/testautomation/dbaccess/required/includes/TableDesign.inc +++ b/testautomation/dbaccess/required/includes/TableDesign.inc @@ -467,7 +467,10 @@ endcase '------------------------------------------------------------------------- function getMenuItemCount as Integer 'use this function becasue this doesn't count the pick list - Dim i, j, Ende, nID as Integer + Dim i as Integer + Dim j as Integer + Dim Ende as Integer + Dim nID as Integer Sleep 2 j=0 for i=1 to MenuGetItemCount diff --git a/testautomation/dbaccess/tools/formtools.inc b/testautomation/dbaccess/tools/formtools.inc old mode 100644 new mode 100755 index 058fa5cb52bd..90d29b647384 --- a/testautomation/dbaccess/tools/formtools.inc +++ b/testautomation/dbaccess/tools/formtools.inc @@ -118,7 +118,7 @@ function fSaveForm( sFormName as string, optional bCloseForm as boolean ) endif fSaveForm = true else - fSaveFrom = false + fSaveForm = false end if if ( IsMissing( bCloseForm ) ) then diff --git a/testautomation/dbaccess/tools/reporttools.inc b/testautomation/dbaccess/tools/reporttools.inc old mode 100644 new mode 100755 index 32a4926edee0..89dd00b504c6 --- a/testautomation/dbaccess/tools/reporttools.inc +++ b/testautomation/dbaccess/tools/reporttools.inc @@ -138,23 +138,23 @@ function fSaveReport( sReportName as string, optional bCloseReport as boolean ) hMenuSelectNr(6) ' the Save Kontext "ReportSaveDialog" - if ReportSaveDialog.exists(3) then - ReportName.setText(sReportName) + if FormSaveDialog.exists(3) then + FormName.setText(sReportName) SaveBtn.Click 'click yes in the overwrite messages box Kontext "MessageBox" if MessageBox.exists(1) then MessageBox.Yes endif - fSaveReport = true + fSaveReport = true else - fSaveFrom = false + fSaveReport = false end if if ( IsMissing( bCloseReport ) ) then ' nothing else - call fCloseReport() + call fCloseReportDesign() end if end function @@ -167,7 +167,7 @@ function fOpenReport(sReportName as string) if ( fFindReport(sReportName) = true ) then printlog "Report found -> open" Kontext "ContainerView" - OpenReport ' uno-Slot .uno:DB/Open + OpenForm ' uno-Slot .uno:DB/Open sleep(1) fOpenReport = true else diff --git a/testautomation/dbaccess/tools/tabletools.inc b/testautomation/dbaccess/tools/tabletools.inc old mode 100644 new mode 100755 index 44887eb78c0f..fb354dcd4a75 --- a/testautomation/dbaccess/tools/tabletools.inc +++ b/testautomation/dbaccess/tools/tabletools.inc @@ -127,7 +127,7 @@ function tCompareMatrixValues(sDSName as string, sRefFileUrl as string, cTable_o endif else if cTable_or_Query = "t" then warnlog "Table: " + sTableName + " not found - Test aborted" - if cTable_or_Query = "q" then warnlog "Table: " + sQueryName + " not found - Test aborted" + if cTable_or_Query = "q" then warnlog "Query: " + sTableName + " not found - Test aborted" endif printlog "*** End Testcase" sleep 1 @@ -203,7 +203,8 @@ function fCreateRefFile(sDSName as string, cTable_or_Query as string, sTableName '/// reading out values from table, create a reference table and input values in printlog "start reading out values from table and writing in ref table" iNumber = Freefile - dim i,j as integer 'counter + dim i as integer 'counter + dim j as integer 'counter Open sRefFileUrl for Output as iNumber for i = 1 to iRowAmount for j = 1 to iColAmount @@ -708,10 +709,10 @@ function fFindTableInBeamer(sDSName1,sTableName1) next i if (bfindTable = false) then - warnlog "Datasource " + sDSName + " not found!" + warnlog "Datasource " + sDSName1 + " not found!" exit function else - printlog "Datasource " + sDSName + " found!" + printlog "Datasource " + sDSName1 + " found!" ' I set the bfindTable flag again back to false ' for the next test of the table bfindTable = false diff --git a/testautomation/global/win/edia_t_z.win b/testautomation/global/win/edia_t_z.win index a53038e79394..d526fe6a18ab 100755 --- a/testautomation/global/win/edia_t_z.win +++ b/testautomation/global/win/edia_t_z.win @@ -2,7 +2,7 @@ TableWindow HID_CTL_TABLEEDIT Fieldname HID_TABDESIGN_NAMECELL FieldType HID_TABDESIGN_TYPECELL -Description HID_TABDESIGN_COMMENTCELL +Description HID_TABDESIGN_HELPTEXT *TablesFilter HID_DSADMIN_TABLE_SUBSCRIPTION Tables HID_DSADMIN_TABLE_SELECTOR -- cgit v1.2.3