From 1b28cf59b5818060a32737601f5fd42bec79f850 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Mon, 22 Nov 2010 14:17:34 +0100 Subject: cws dba34b: remove qaerrorlog --- testautomation/dbaccess/optional/includes/rpt_ExecuteReport.inc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'testautomation/dbaccess') diff --git a/testautomation/dbaccess/optional/includes/rpt_ExecuteReport.inc b/testautomation/dbaccess/optional/includes/rpt_ExecuteReport.inc index 91270481ca7b..7ba19ac8e449 100644 --- a/testautomation/dbaccess/optional/includes/rpt_ExecuteReport.inc +++ b/testautomation/dbaccess/optional/includes/rpt_ExecuteReport.inc @@ -40,12 +40,7 @@ end sub '------------------------------------------------------------------------- '------------------------------------------------------------------------- '------------------------------------------------------------------------- -testcase tExecute - - if (iSprache = 7) then - qaerrorlog "due to issue i94729 this testcase does not work under russian." - goto endsub - endif +testcase tExecute '/// open Bibliography database printlog "open Bibliography database" -- cgit From 863e54d176678f0a0b79b7da23f69dee8c1ea921 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Mon, 22 Nov 2010 14:18:51 +0100 Subject: cws dba34b: new test for charts --- .../dbaccess/optional/dba_rpt_Charts.bas | 47 +++++++++++ .../dbaccess/optional/includes/rpt_Charts.inc | 94 ++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 testautomation/dbaccess/optional/dba_rpt_Charts.bas create mode 100644 testautomation/dbaccess/optional/includes/rpt_Charts.inc (limited to 'testautomation/dbaccess') diff --git a/testautomation/dbaccess/optional/dba_rpt_Charts.bas b/testautomation/dbaccess/optional/dba_rpt_Charts.bas new file mode 100644 index 000000000000..abe7817c7842 --- /dev/null +++ b/testautomation/dbaccess/optional/dba_rpt_Charts.bas @@ -0,0 +1,47 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : marc.neumann@oracle.com +'* +'* short description : Charts in Reports +'* +'\*********************************************************************** + +sub main + + use "dbaccess/optional/includes/rpt_Charts.inc" + + call rpt_Charts + +end sub + +sub LoadIncludeFiles + use "dbaccess/tools/dbinit.inc" + Call sDBInit + Call GetUseFiles + gApplication = "WRITER" +end sub diff --git a/testautomation/dbaccess/optional/includes/rpt_Charts.inc b/testautomation/dbaccess/optional/includes/rpt_Charts.inc new file mode 100644 index 000000000000..cb7fc8ab1ce4 --- /dev/null +++ b/testautomation/dbaccess/optional/includes/rpt_Charts.inc @@ -0,0 +1,94 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +' +' Copyright 2000, 2010 Oracle and/or its affiliates. +' +' OpenOffice.org - a multi-platform office productivity suite +' +' This file is part of OpenOffice.org. +' +' OpenOffice.org is free software: you can redistribute it and/or modify +' it under the terms of the GNU Lesser General Public License version 3 +' only, as published by the Free Software Foundation. +' +' OpenOffice.org is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU Lesser General Public License version 3 for more details +' (a copy is included in the LICENSE file that accompanied this code). +' +' You should have received a copy of the GNU Lesser General Public License +' version 3 along with OpenOffice.org. If not, see +' +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : +'* +'* short description : +'* +'\*********************************************************************** + +sub rpt_Charts + + tInsertChart + +end sub +'-------------------------------------------------------------------------------------- +testcase tInsertChart + + printlog "open Bibliography database" + call fOpenDataBase(gOfficePath + ConvertPath("user/database/biblio.odb")) + + printlog "open the report designer" + call fOpenNewReportDesign + + sleep(1) + + printlog "select the first table in the content list box" + Kontext "ReportDataProperties" + Content.select 1 + Content.typeKeys("",true) ' important to leave the listbox + + 'close the Add Field dialog to get the focus back to the design + call fCloseAddFieldDialog + + printlog "insert a chart" + Kontext "StandardBar" + CreateChart.Click + sleep(1) + + Kontext "ReportDesign" + ReportDesign.MouseDown ( 30, 10 ) + ReportDesign.MouseMove ( 40, 20 ) + ReportDesign.MouseUp ( 40, 20 ) + + sleep(1) + + '/// execute the report + printlog "execute the report" + call fExecuteReport + + sleep(10) + + '/// check if the report is created + printlog "check if the report is created" + Kontext "DocumentWriter" + if (DocumentWriter.exists(10)) then + hFileSaveAsKill(gOfficePath + ConvertPath("user/work/report01.odt")) + call fCloseReportView + else + warnlog "No report is created." + endif + + '/// close the report designer + printlog "close the report designer" + call fCloseReportDesign + + '/// close the database + printlog "close the database" + call fCloseDatabase + +endcase \ No newline at end of file -- cgit From c08743f5e4f19f11c99cf9ecf07fb7b20d339e21 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Mon, 31 Jan 2011 12:29:03 +0100 Subject: cws dba34b: fix for i115468 --- testautomation/dbaccess/tools/dbcreatetools.inc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'testautomation/dbaccess') diff --git a/testautomation/dbaccess/tools/dbcreatetools.inc b/testautomation/dbaccess/tools/dbcreatetools.inc index cc99d8d203c5..034b1d18fef1 100644 --- a/testautomation/dbaccess/tools/dbcreatetools.inc +++ b/testautomation/dbaccess/tools/dbcreatetools.inc @@ -1377,14 +1377,7 @@ function fRegisterDatabaseFile( sFileName, sName) Kontext "CreateDatabaseLink" RegisteredName.setText(sName) - - ' this does not work due to issue 115468 - ' DatabaseFile.setText(sFileName) - ' workaround - CreatedatabaseLink.typeKeys("") - CreatedatabaseLink.typeKeys("") - CreatedatabaseLink.typeKeys(sFileName) - ' - + DatabaseFile.setText(sFileName) CreateDatabaseLink.OK -- cgit From a7432ec69f6aa2fdb574a94540107e5de5439277 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Mon, 31 Jan 2011 12:29:39 +0100 Subject: cws dba34b: fix for i116042 --- .../dbaccess/optional/includes/db_JDBCMySQL.inc | 6 +-- .../dbaccess/optional/includes/db_Query.inc | 48 +++++++++++++++++++++- testautomation/dbaccess/tools/tabletools.inc | 1 + 3 files changed, 51 insertions(+), 4 deletions(-) (limited to 'testautomation/dbaccess') diff --git a/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc b/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc index 93f864d7e0d4..3eb00cc6a011 100644 --- a/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc +++ b/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc @@ -197,10 +197,10 @@ testcase db_JDBCMySQL 'call fInsertIntoTable( aFieldContent(), sTableName) 'call fCloseDatabase - 'use "dbaccess/optional/includes/b_lvl1_Query.inc" - 'call b_lvl1_Query(sFileName,"dbase") + use "dbaccess/optional/includes/db_Query.inc" + call db_Query(sFileName,"MYSQL_JDBC") - call tRelation( sFileName, aDatabaseProperties(6), "rel1", "rel2" ) + 'call tRelation( sFileName, aDatabaseProperties(6), "rel1", "rel2" ) else warnlog "Data Source could not be created - beyond testcases stopped" diff --git a/testautomation/dbaccess/optional/includes/db_Query.inc b/testautomation/dbaccess/optional/includes/db_Query.inc index 46dce6e903c6..b9d88142698f 100644 --- a/testautomation/dbaccess/optional/includes/db_Query.inc +++ b/testautomation/dbaccess/optional/includes/db_Query.inc @@ -45,7 +45,9 @@ function db_Query( sFileName , optional sType , optional sPassword) case "ODBC", "JDBC" sType = "2" case "HSQLDB" - sType = "2" + sType = "2" + case "MYSQL_JDBC" + sType = "3" case else sType = "1" end select @@ -57,6 +59,10 @@ function db_Query( sFileName , optional sType , optional sPassword) call tQueryJoin( sFileName , sType, sPassword ) call tQueriesInQueries(sFileName) endif + + if sType = "3" then 'run only with database type MYSQL_JDBC + call tCastQuery( sFileName , sPassword ) + endif call tSortQueryWithAlias(sFileName , sPassword) @@ -825,6 +831,46 @@ sub tTest8 sleep(2) end sub '-------------------------------------------------------------------- +sub tCastQuery( sFileName , sPassword ) + + fOpenDatabase(sFileName,sPassword) + + if ( fOpenNewQueryDesign ) then + if ( fChooseTableInQueryAddTableDialog("TT_Query3") ) then + Kontext "QueryDesignCriterion" + sleep(1) + QueryDesignCriterion.TypeKeys "" , true + sleep(1) + QueryDesignCriterion.TypeKeys "cast(f_date_s as date)" , true + sleep(1) + QueryDesignCriterion.TypeKeys "" , true + sleep(1) + Kontext "Toolbar" + printlog "- Executing query" + ExecuteBtn.Click + sleep(5) + + Kontext "TableView" + if TableView.Exists(3) then + + DataWindow.TypeKeys "" + if GetClipboard <> "40219" then + warnlog "the result should be 40219 but it is " + GetClipboard + else + printlog "the result is OK" + endif + else + warnlog "Execution of a query failed!" + end if + + call fCloseQueryDesign + + endif + endif + call fCloseDatabase + +end sub +'-------------------------------------------------------------------- function tSortQueryWithAlias(sFileName, optional sPassword) ' test for isse 27832 if IsMissing(sPassword) then diff --git a/testautomation/dbaccess/tools/tabletools.inc b/testautomation/dbaccess/tools/tabletools.inc index 99c4abf723b3..461ef8ff2da3 100644 --- a/testautomation/dbaccess/tools/tabletools.inc +++ b/testautomation/dbaccess/tools/tabletools.inc @@ -340,6 +340,7 @@ function fCreateTable(aFieldTypeContent(),sTableName,optional sCatalog,optional sleep 1 FieldType.TypeKeys "" , TRUE Description.TypeKeys "" , TRUE + CellDescription.TypeKeys "" , TRUE printlog "-------------------------------" next sleep(1) -- cgit From dd9c079376466abb47cbe04b7c3204bb592f0314 Mon Sep 17 00:00:00 2001 From: "Marc Neumann [msc]" Date: Mon, 31 Jan 2011 12:33:22 +0100 Subject: cws dba34b: fix for i116042 --- testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'testautomation/dbaccess') diff --git a/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc b/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc index 3eb00cc6a011..cc3be846569c 100644 --- a/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc +++ b/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc @@ -192,15 +192,15 @@ testcase db_JDBCMySQL dbok = fCreateMySQL_JDBC_Datasource(sFileName,aDatabaseProperties(3),aDatabaseProperties(2),aDatabaseProperties(4),aDatabaseProperties(5)) if dbok = true then - 'call fOpendatabase(sFileName,aDatabaseProperties(6)) - 'call fCreateTable( aFieldTypeContent(), sTableName) - 'call fInsertIntoTable( aFieldContent(), sTableName) - 'call fCloseDatabase + call fOpendatabase(sFileName,aDatabaseProperties(6)) + call fCreateTable( aFieldTypeContent(), sTableName) + call fInsertIntoTable( aFieldContent(), sTableName) + call fCloseDatabase use "dbaccess/optional/includes/db_Query.inc" - call db_Query(sFileName,"MYSQL_JDBC") + call db_Query(sFileName,"MYSQL_JDBC",aDatabaseProperties(6)) - 'call tRelation( sFileName, aDatabaseProperties(6), "rel1", "rel2" ) + call tRelation( sFileName, aDatabaseProperties(6), "rel1", "rel2" ) else warnlog "Data Source could not be created - beyond testcases stopped" -- cgit