summaryrefslogtreecommitdiff
path: root/testautomation/dbaccess
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-01-29 14:46:09 +0100
committerIvo Hinkelmann <ihi@openoffice.org>2010-01-29 14:46:09 +0100
commit090bc5591c2bc09c2097771b1bf182bcfc45dd0a (patch)
treed1f173d3fe39d9f489b341aad3dca76c4fb15659 /testautomation/dbaccess
parent5a6fd57b2390a24c52403411c82ff6cdebfc8cde (diff)
parentad8f1b9c6e020401d85d477daff458e0b289dd9b (diff)
CWS-TOOLING: integrate CWS automation007
Notes
Notes: split repo tag: testing_ooo/DEV300_m71
Diffstat (limited to 'testautomation/dbaccess')
-rwxr-xr-xtestautomation/dbaccess/optional/includes/db_Mozilla.inc284
-rwxr-xr-xtestautomation/dbaccess/optional/includes/misc_Macros.inc242
2 files changed, 263 insertions, 263 deletions
diff --git a/testautomation/dbaccess/optional/includes/db_Mozilla.inc b/testautomation/dbaccess/optional/includes/db_Mozilla.inc
index 6d0680eb9620..d846719489d9 100755
--- a/testautomation/dbaccess/optional/includes/db_Mozilla.inc
+++ b/testautomation/dbaccess/optional/includes/db_Mozilla.inc
@@ -1,142 +1,142 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: db_Mozilla.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 07:43:41 $
-'*
-'* 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
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/************************************************************************
-'*
-'* owner : marc.neumann@sun.com
-'*
-'* short description : Address book mozilla
-'*
-'\***********************************************************************
-sub db_Mozilla
-
- ' Information for this test under
- ' http://wiki.services.openoffice.org/wiki/Database_Automatic_Testing#Testing_the_mozilla_Address_book
-
- if fCreateMozillaAddressbookDatasource(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb")) then
-
- tQueryAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
- tSortAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
- else
- tQueryAddressbook("")
- tSortAddressbook("")
- endif
-
-end sub
-'-------------------------------------------------------------------------
-testcase tQueryAddressbook( sFileName )
-
- if ( not fOpenDatabase(sFileName) ) then
- warnlog "Database can't be open"
- printlog "May be you find a solution under http://wiki.services.openoffice.org/wiki/Database_Automatic_Testing#Testing_the_mozilla_Address_book"
- goto endsub
- endif
-
- fOpenNewQueryDesign
-
- Kontext "AddTables"
- TableName.Select 1
- '/// Add database table to Query.
- AddTable.Click
- sleep(2)
- if AddTables.exists(2) then
- CloseDlg.Click ' When the AddTables dialog still exists then close him
- endif
- sleep(1)
- Kontext "QueryDesignCriterion"
- Field.Select(1)
- sleep(1)
- Kontext "Toolbar"
- '/// Executing query
- printlog "- Executing query"
- ExecuteBtn.Click
- sleep(5)
- Kontext "TableView"
- if NOT DataWindow.Exists(3) then
- warnlog "Execution of a query failed!"
- end if
-
- call fCloseQueryDesign()
-
- call fCloseDatabase()
-
-endcase
-'-------------------------------------------------------------------------
-testcase tSortAddressbook( sFileName )
-
- Dim sRecordCount as String
-
- '/// open the database file created in the bas file
- printlog "open the database file created in the bas file"
-
- if ( not fOpenDatabase(sFileName) ) then
- warnlog "Database can't be open"
- goto endsub
- endif
-
- '/// open the first table
- printlog "open the first table"
- Kontext "ContainerView"
- ViewTables
- TableTree.select(1)
- OpenTable ' uno-Slot .uno:DB/Open
-
- sleep(2)
-
- '/// count the records in the table
- printlog "count the records in the table"
- Kontext "TableView"
- LastRecord.Click
- sRecordCount = AllRecords.caption()
-
- '/// sort the table
- printlog "sort the table"
- Kontext "Toolbar"
- SortAscending.Click
- sleep(1)
-
- '/// count the table again and check if there are the same count of records then before sorting
- printlog "count the table again and check if there are the same count of records then before sorting"
- Kontext "TableView"
- LastRecord.Click
- if (sRecordCount <> AllRecords.caption() ) then
- warnlog "issue i61611 occur. The records are double after sorting."
- endif
-
- '/// close the table
- printlog "close the table"
- call fCloseTableView()
-
- '/// close the database
- printlog "close the database"
- call fCloseDatabase()
-
-endcase
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: db_Mozilla.inc,v $
+'*
+'* $Revision: 1.1 $
+'*
+'* last change: $Author: jsi $ $Date: 2008-06-16 07:43:41 $
+'*
+'* 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
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/************************************************************************
+'*
+'* owner : marc.neumann@sun.com
+'*
+'* short description : Address book mozilla
+'*
+'\***********************************************************************
+sub db_Mozilla
+
+ ' Information for this test under
+ ' http://wiki.services.openoffice.org/wiki/Database_Automatic_Testing#Testing_the_mozilla_Address_book
+
+ if fCreateMozillaAddressbookDatasource(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb")) then
+
+ tQueryAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
+ tSortAddressbook(gOfficePath + ConvertPath("user/work/TT_Mozilla.odb"))
+ else
+ tQueryAddressbook("")
+ tSortAddressbook("")
+ endif
+
+end sub
+'-------------------------------------------------------------------------
+testcase tQueryAddressbook( sFileName )
+
+ if ( not fOpenDatabase(sFileName) ) then
+ warnlog "Database can't be open"
+ printlog "May be you find a solution under http://wiki.services.openoffice.org/wiki/Database_Automatic_Testing#Testing_the_mozilla_Address_book"
+ goto endsub
+ endif
+
+ fOpenNewQueryDesign
+
+ Kontext "AddTables"
+ TableName.Select 1
+ '/// Add database table to Query.
+ AddTable.Click
+ sleep(2)
+ if AddTables.exists(2) then
+ CloseDlg.Click ' When the AddTables dialog still exists then close him
+ endif
+ sleep(1)
+ Kontext "QueryDesignCriterion"
+ Field.Select(1)
+ sleep(1)
+ Kontext "Toolbar"
+ '/// Executing query
+ printlog "- Executing query"
+ ExecuteBtn.Click
+ sleep(5)
+ Kontext "TableView"
+ if NOT DataWindow.Exists(3) then
+ warnlog "Execution of a query failed!"
+ end if
+
+ call fCloseQueryDesign()
+
+ call fCloseDatabase()
+
+endcase
+'-------------------------------------------------------------------------
+testcase tSortAddressbook( sFileName )
+
+ Dim sRecordCount as String
+
+ '/// open the database file created in the bas file
+ printlog "open the database file created in the bas file"
+
+ if ( not fOpenDatabase(sFileName) ) then
+ warnlog "Database can't be open"
+ goto endsub
+ endif
+
+ '/// open the first table
+ printlog "open the first table"
+ Kontext "ContainerView"
+ ViewTables
+ TableTree.select(1)
+ OpenTable ' uno-Slot .uno:DB/Open
+
+ sleep(2)
+
+ '/// count the records in the table
+ printlog "count the records in the table"
+ Kontext "TableView"
+ LastRecord.Click
+ sRecordCount = AllRecords.caption()
+
+ '/// sort the table
+ printlog "sort the table"
+ Kontext "Toolbar"
+ SortAscending.Click
+ sleep(1)
+
+ '/// count the table again and check if there are the same count of records then before sorting
+ printlog "count the table again and check if there are the same count of records then before sorting"
+ Kontext "TableView"
+ LastRecord.Click
+ if (sRecordCount <> AllRecords.caption() ) then
+ warnlog "issue i61611 occur. The records are double after sorting."
+ endif
+
+ '/// close the table
+ printlog "close the table"
+ call fCloseTableView()
+
+ '/// close the database
+ printlog "close the database"
+ call fCloseDatabase()
+
+endcase
diff --git a/testautomation/dbaccess/optional/includes/misc_Macros.inc b/testautomation/dbaccess/optional/includes/misc_Macros.inc
index 69a2d658c0d7..3b2ab6bf2345 100755
--- a/testautomation/dbaccess/optional/includes/misc_Macros.inc
+++ b/testautomation/dbaccess/optional/includes/misc_Macros.inc
@@ -1,121 +1,121 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
-'* Copyright 2008 by Sun Microsystems, Inc.
-'*
-'* OpenOffice.org - a multi-platform office productivity suite
-'*
-'* $RCSfile: misc_RegisterDatabase.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008/06/16 07:43:42 $
-'*
-'* 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
-'* <http://www.openoffice.org/license.html>
-'* for a copy of the LGPLv3 License.
-'*
-'/************************************************************************
-'*
-'* owner : marc.neumann@sun.com
-'*
-'* short description : macros in databases
-'*
-'\***********************************************************************
-
-sub misc_Macros
-
- printlog "------------------- misc_Macros.inc ------------------------"
-
- call tMacros
-
-end sub
-'-------------------------------------------------------------------------
-testcase tMacros
-
- hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_LOW )
-
- dim sFileName as String
- sFileName = ConvertPath(gOfficePath + "/user/work/hsql_macros_in_subdocument.odb")
- app.FileCopy ConvertPath(gTesttoolPath + "/dbaccess/optional/input/hsql_datasource/hsql_macros_in_subdocument.odb"), ConvertPath(gOfficePath + "/user/work/hsql_macros_in_subdocument.odb")
-
- ' delete the backup file
- if fileexists(sFileName + "backup.odb") then
- app.kill sFileName + "backup.odb"
- endif
-
- FileOpen
- sleep (1)
- Kontext "OeffnenDlg"
- '/// open the given file
- printlog "open the file: " + sFileName
- Dateiname.SetText sFileName
- sleep (3)
- Oeffnen.Click
- sleep (3)
-
- printlog "check if the subdocument contains macros dialog appear"
- Kontext "MessageBox"
- if (MessageBox.exists(1)) then
- MessageBox.OK
- else
- warnlog "the subdocument contains macros dialog does not appear"
- endif
-
- MigrateMacros
-
- WaitSlot(10)
-
- Kontext "MacroMigration"
- if not (MacroMigration.exists(1)) then
- warnlog "MacroMigration wizard does not appear"
- endif
-
- NextButton.click
-
- DatabaseFile.settext sFileName + "backup.odb"
-
- NextButton.click
- sleep(20)
- MacroMigration.OK
-
- call fCloseDatabase
-
- printlog "open the database again to see if the message box appear again"
-
- FileOpen
- sleep (1)
- Kontext "OeffnenDlg"
- '/// open the given file
- printlog "open the file: " + sFileName
- Dateiname.SetText sFileName
- sleep (3)
- Oeffnen.Click
- sleep (3)
-
- Kontext "MessageBox"
- if (MessageBox.exists(1)) then
- warnlog "MessageBox about macros appear. Should not after migration."
- else
- 'nothing
- endif
-
- call fCloseDatabase
-
- hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT )
-
-endcase
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: misc_RegisterDatabase.inc,v $
+'*
+'* $Revision: 1.1 $
+'*
+'* last change: $Author: jsi $ $Date: 2008/06/16 07:43:42 $
+'*
+'* 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
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/************************************************************************
+'*
+'* owner : marc.neumann@sun.com
+'*
+'* short description : macros in databases
+'*
+'\***********************************************************************
+
+sub misc_Macros
+
+ printlog "------------------- misc_Macros.inc ------------------------"
+
+ call tMacros
+
+end sub
+'-------------------------------------------------------------------------
+testcase tMacros
+
+ hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_LOW )
+
+ dim sFileName as String
+ sFileName = ConvertPath(gOfficePath + "/user/work/hsql_macros_in_subdocument.odb")
+ app.FileCopy ConvertPath(gTesttoolPath + "/dbaccess/optional/input/hsql_datasource/hsql_macros_in_subdocument.odb"), ConvertPath(gOfficePath + "/user/work/hsql_macros_in_subdocument.odb")
+
+ ' delete the backup file
+ if fileexists(sFileName + "backup.odb") then
+ app.kill sFileName + "backup.odb"
+ endif
+
+ FileOpen
+ sleep (1)
+ Kontext "OeffnenDlg"
+ '/// open the given file
+ printlog "open the file: " + sFileName
+ Dateiname.SetText sFileName
+ sleep (3)
+ Oeffnen.Click
+ sleep (3)
+
+ printlog "check if the subdocument contains macros dialog appear"
+ Kontext "MessageBox"
+ if (MessageBox.exists(1)) then
+ MessageBox.OK
+ else
+ warnlog "the subdocument contains macros dialog does not appear"
+ endif
+
+ MigrateMacros
+
+ WaitSlot(10)
+
+ Kontext "MacroMigration"
+ if not (MacroMigration.exists(1)) then
+ warnlog "MacroMigration wizard does not appear"
+ endif
+
+ NextButton.click
+
+ DatabaseFile.settext sFileName + "backup.odb"
+
+ NextButton.click
+ sleep(20)
+ MacroMigration.OK
+
+ call fCloseDatabase
+
+ printlog "open the database again to see if the message box appear again"
+
+ FileOpen
+ sleep (1)
+ Kontext "OeffnenDlg"
+ '/// open the given file
+ printlog "open the file: " + sFileName
+ Dateiname.SetText sFileName
+ sleep (3)
+ Oeffnen.Click
+ sleep (3)
+
+ Kontext "MessageBox"
+ if (MessageBox.exists(1)) then
+ warnlog "MessageBox about macros appear. Should not after migration."
+ else
+ 'nothing
+ endif
+
+ call fCloseDatabase
+
+ hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT )
+
+endcase