summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-01-07 15:00:52 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-01-07 15:00:52 +0000
commit0c881ed110a0b925ce8554aa54c674dee1c9b2dc (patch)
tree077e657b4487eda513d6d6603defb339a73a4581
parentab2f78bf5e2a9abc9f2f0df99cdc16701bbcebc5 (diff)
CWS-TOOLING: integrate CWS macmenusquit
2009-01-07 13:36:33 +0100 jsk r265962 : #i97382, #i97825 2008-12-29 22:35:29 +0100 ericb r265826 : CWS-TOOLING: rebase CWS macmenusquit to trunk@265758 (milestone: DEV300:m38) 2008-12-18 08:43:55 +0100 jsk r265663 : #i97382# 2008-12-18 08:19:11 +0100 jsk r265659 : #i97382# 2008-12-11 19:26:17 +0100 ericb r265350 : #i97142# remove Tools -> Options menu on Mac OS X (not Aqua HIG compliant) 2008-11-27 14:13:25 +0100 ericb r264488 : #i82140# ause suggested to check whether xsltproc operation was successfull 2008-11-27 13:34:58 +0100 ericb r264483 : #i82140# on mod demand, remove useless About cannot be bad either 2008-10-11 12:50:13 +0200 ericb r262155 : #i82140#: migrate CWS macmenusquit to SVN: adding macosx specific files 2008-10-11 12:49:13 +0200 ericb r262154 : #i82140#: migrate CWS macmenusquit to SVN.
-rw-r--r--testautomation/chart2/required/includes/ch2_menu.inc12
-rwxr-xr-xtestautomation/dbaccess/required/includes/Forms.inc2
-rwxr-xr-xtestautomation/dbaccess/required/includes/MainApp.inc57
-rwxr-xr-xtestautomation/dbaccess/required/includes/Query.inc47
-rwxr-xr-xtestautomation/dbaccess/required/includes/ReportBuilder01.inc25
-rwxr-xr-xtestautomation/dbaccess/required/includes/Table.inc46
-rwxr-xr-xtestautomation/dbaccess/required/includes/TableDesign.inc48
-rwxr-xr-xtestautomation/dbaccess/required/includes/Wizards.inc8
8 files changed, 116 insertions, 129 deletions
diff --git a/testautomation/chart2/required/includes/ch2_menu.inc b/testautomation/chart2/required/includes/ch2_menu.inc
index b17a8ab42318..dd1209f273d2 100644
--- a/testautomation/chart2/required/includes/ch2_menu.inc
+++ b/testautomation/chart2/required/includes/ch2_menu.inc
@@ -43,6 +43,12 @@
testcase tMainMenu
dim iCount as integer ' the numbers of the items in the menu.
+
+ dim iMainMenuItemCount as integer
+ iMainMenuItemCount = 21 : if ( gPlatform = "osx" ) then iMainMenuItemCount = 20
+
+ dim iHelpMenuItemCount as integer
+ iHelpMenuItemCount = 5 : if ( gPlatform = "osx" ) then iHelpMenuItemCount = 4
printlog "Close all document windows (File / Close)"
Do Until GetDocumentCount = 0
@@ -61,8 +67,8 @@ testcase tMainMenu
printlog "check if there are 21 items in the FILE menu."
hMenuSelectNr(1) ' FILE
iCount = hMenuItemGetCount()
- if (iCount <> 21 ) then
- warnlog "There should be 21 items in the file menu but there are " + iCount + " items."
+ if (iCount <> iMainMenuItemCount ) then
+ warnlog "There should be 20 or 21 items in the file menu but there are " + iCount + " items."
end if
call hMenuClose() ' close the FILE menu
@@ -199,7 +205,7 @@ testcase tMainMenu
DocumentCalc.UseMenu
hMenuSelectNr(8)
iCount = hMenuItemGetCount()
- if (iCount <> 6 AND iCount <> 5 ) then
+ if (iCount <> ( iHelpMenuItemCount + 1 ) AND iCount <> iHelpMenuItemCount ) then
warnlog "There should 5 OR 6 items in the HELP menu but there are " + iCount + " items."
end if
call hMenuClose()
diff --git a/testautomation/dbaccess/required/includes/Forms.inc b/testautomation/dbaccess/required/includes/Forms.inc
index 005ae4758e86..f6358ca6cd6b 100755
--- a/testautomation/dbaccess/required/includes/Forms.inc
+++ b/testautomation/dbaccess/required/includes/Forms.inc
@@ -52,7 +52,7 @@ testcase tNewFormDesign
'/// open biblio database
printlog "open biblio database"
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
diff --git a/testautomation/dbaccess/required/includes/MainApp.inc b/testautomation/dbaccess/required/includes/MainApp.inc
index 64d8f4f86fd6..599c767e0b7c 100755
--- a/testautomation/dbaccess/required/includes/MainApp.inc
+++ b/testautomation/dbaccess/required/includes/MainApp.inc
@@ -67,7 +67,7 @@ end sub
'-------------------------------------------------------------------------
testcase tTableFilters
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
@@ -88,7 +88,7 @@ endcase
'-------------------------------------------------------------------------
testcase tTableView
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
@@ -122,7 +122,7 @@ testcase tMainApp
dim iCount as integer ' the numbers of the items in the creation list.
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
@@ -225,7 +225,7 @@ endcase
'-------------------------------------------------------------------------
testcase tPreview
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
@@ -280,7 +280,7 @@ testcase tMainMenuBar
dim iCount as integer ' the numbers of the items in the menu.
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
Insight.UseMenu
@@ -290,10 +290,15 @@ testcase tMainMenuBar
printlog "+ there different count related to the file pick list."
hMenuSelectNr(1) ' the file menu
iCount = getMenuItemCount()
- if (iCount <> 11 ) then
- warnlog "There should be 11 items in the file menu but there are " + iCount + " items."
- end if
-
+ if ( lcase( gPlatform ) = "osx" ) then
+ if ( iCount <> 10 ) then
+ warnlog( "File menu: 10 items expected, found " & iCount )
+ endif
+ else
+ if (iCount <> 11 ) then
+ warnlog "There should be 11 items in the file menu but there are " + iCount + " items."
+ end if
+ endif
'/// check if there are 12 items in the FILE/NEW menu.
printlog "check if there are 12 items in the FILE/NEW menu."
@@ -383,9 +388,15 @@ testcase tMainMenuBar
Insight.UseMenu
hMenuSelectNr(5)
iCount = hMenuItemGetCount()
- if (iCount <> 10) then
- warnlog "There should 10 items in the tools menu but there are " + iCount + " items."
- end if
+ if ( lcase( gPlatform ) = "osx" ) then
+ if ( iCount <> 9 ) then
+ warnlog( "Tools menu: 9 items expected, found " & iCount )
+ endif
+ else
+ if (iCount <> 10) then
+ warnlog "There should 10 items in the tools menu but there are " + iCount + " items."
+ end if
+ endif
call hMenuClose()
'/// check if there are 4 items in the TOOLS/MACRO menu.
@@ -407,7 +418,7 @@ testcase tDatabaseProperties
dim sValue as string
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
Insight.MouseDown(50,50)
@@ -601,26 +612,6 @@ endcase
'-------------------------------------------------------------------------
'-------------------------------------------------------------------------
'-------------------------------------------------------------------------
-function fDateiOeffnen ( DocName$ )
-
- 'Dim DieDatei as String
-
- 'DieDatei = ConvertPath ( DocName$ )
-
- 'FileOpen
- 'sleep (1)
- 'Kontext "OeffnenDlg"
- 'Dateiname.SetText DieDatei
- 'sleep (3)
- 'Oeffnen.Click
- 'sleep (3)
-
- 'fDateiOeffnen = true
-
- fDateiOeffnen = hFileOpen(DocName$)
-
-end function
-'-------------------------------------------------------------------------
function getMenuItemCount as Integer
'use this function becasue this doesn't count the pick list
Dim i, j, Ende, nID as Integer
diff --git a/testautomation/dbaccess/required/includes/Query.inc b/testautomation/dbaccess/required/includes/Query.inc
index c2c3ea12182f..37367e6e371d 100755
--- a/testautomation/dbaccess/required/includes/Query.inc
+++ b/testautomation/dbaccess/required/includes/Query.inc
@@ -274,6 +274,7 @@ testcase tExecute
Kontext "QueryDesignCriterion"
printlog "- Selecting 'field' as criteria"
'/// Selecting field as criteria.
+ sleep( 1 )
Field.Select(2)
sleep(1)
'/// Typing <b>&lt;TAB&gt;</b> to switch to the <i>tool bar</i>.
@@ -818,9 +819,15 @@ testcase tMainMenuBar
printlog "+ there different count related to the file pick list."
hMenuSelectNr(1) ' the file menu
iCount = getMenuItemCount()
- if (iCount <> 8 ) then
- warnlog "There should between 8 and 12 items in the file menu but there are " + iCount + " items."
- end if
+ if ( lcase( gPlatform ) = "osx" ) then
+ if ( iCount <> 7 ) then
+ warnlog( "File menu: 7 items expected, found " & iCount )
+ endif
+ else
+ if (iCount <> 8 ) then
+ warnlog "There should between 8 and 12 items in the file menu but there are " + iCount + " items."
+ end if
+ endif
'/// check if there are 12 items in the FILE/NEW menu.
printlog "check if there are 12 items in the FILE/NEW menu."
@@ -877,9 +884,15 @@ testcase tMainMenuBar
QueryDesignTable.UseMenu
hMenuSelectNr(5)
iCount = hMenuItemGetCount()
- if (iCount <> 4) then
- warnlog "There should 4 items in the tools menu but there are " + iCount + " items."
- end if
+ if ( lcase( gPlatform ) = "osx" ) then
+ if ( iCount <> 3 ) then
+ warnlog( "Tools menu: 3 items expected, found " & iCount )
+ endif
+ else
+ if (iCount <> 4) then
+ warnlog "There should 4 items in the tools menu but there are " + iCount + " items."
+ end if
+ endif
call hMenuClose()
'/// check if there are 4 items in the TOOLS/MACRO menu.
@@ -900,26 +913,6 @@ endcase
'-------------------------------------------------------------------------
'-------------------------------------------------------------------------
'-------------------------------------------------------------------------
-function fDateiOeffnen ( DocName$ )
-
- Dim DieDatei as String
-
- DieDatei = ConvertPath ( DocName$ )
-
- FileOpen
- sleep (1)
- Kontext "OeffnenDlg"
- Dateiname.SetText DieDatei
- sleep (3)
- Oeffnen.Click
- sleep (3)
-
- Kontext "Insight"
-
- fDateiOeffnen = true
-
-end function
-'-------------------------------------------------------------------------
function getMenuItemCount as Integer
'use this function becasue this doesn't count the pick list
Dim i, j, Ende, nID as Integer
@@ -941,7 +934,7 @@ end function
'-------------------------------------------------------------------------
sub initQueryDesign
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
diff --git a/testautomation/dbaccess/required/includes/ReportBuilder01.inc b/testautomation/dbaccess/required/includes/ReportBuilder01.inc
index fc60c5d3f635..2f50af593df0 100755
--- a/testautomation/dbaccess/required/includes/ReportBuilder01.inc
+++ b/testautomation/dbaccess/required/includes/ReportBuilder01.inc
@@ -88,9 +88,15 @@ testcase tMainMenuBar
printlog "check if there are 10 items in the file menu."
hMenuSelectNr(1) ' the file menu
iCount = hMenuItemGetCount()
- if (iCount <> 10 ) then
- warnlog "There should be 10 items in the file menu but there are " + iCount + " items."
- end if
+ if ( lcase( gPlatform ) = "osx" ) then
+ if ( iCount <> 9 ) then
+ warnlog( "File menu: 9 Items expected, found " & iCount )
+ endif
+ else
+ if (iCount <> 10 ) then
+ warnlog "There should be 10 items in the file menu but there are " + iCount + " items."
+ end if
+ endif
'/// check if there are 12 items in the FILE/NEW menu.
printlog "check if there are 12 items in the FILE/NEW menu."
@@ -201,9 +207,15 @@ testcase tMainMenuBar
ReportDesign.UseMenu
hMenuSelectNr(6)
iCount = hMenuItemGetCount()
- if (iCount <> 4) then
- warnlog "There should 4 items in the tools menu but there are " + iCount + " items."
- end if
+ if ( lcase( gPlatform ) = "osx" ) then
+ if ( iCount <> 3 ) then
+ warnlog( "Tools menu: 3 items expected, found " & iCount )
+ endif
+ else
+ if (iCount <> 4) then
+ warnlog "There should 4 items in the tools menu but there are " + iCount + " items."
+ end if
+ endif
call hMenuClose()
'help menu
@@ -213,6 +225,7 @@ testcase tMainMenuBar
ReportDesign.UseMenu
hMenuSelectNr(8)
iCount = hMenuItemGetCount()
+ if ( lcase( gPlatform ) = "osx" ) then iCount = iCount + 1 ' dirty, but check is fuzzy anyway.
if (gOOO) then
if (iCount <> 9) then
warnlog "There should 9 items in the help menu but there are " + iCount + " items."
diff --git a/testautomation/dbaccess/required/includes/Table.inc b/testautomation/dbaccess/required/includes/Table.inc
index cfd6659c1f77..01519534063d 100755
--- a/testautomation/dbaccess/required/includes/Table.inc
+++ b/testautomation/dbaccess/required/includes/Table.inc
@@ -506,9 +506,15 @@ testcase tMainMenuBar
printlog "+ there different count related to the file pick list."
hMenuSelectNr(1) ' the file menu
iCount = getMenuItemCount()
- if (iCount <> 8 ) then
- warnlog "There should between 8 and 12 items in the file menu but there are " + iCount + " items."
- end if
+ if ( lcase( gPlatform ) = "osx" ) then
+ if ( iCount <> 7 ) then
+ warnlog( "File menu: 8 items expected, found " & iCount )
+ endif
+ else
+ if (iCount <> 8 ) then
+ warnlog "There should between 8 and 12 items in the file menu but there are " + iCount + " items."
+ end if
+ endif
'/// check if there are 12 items in the FILE/NEW menu.
printlog "check if there are 12 items in the FILE/NEW menu."
@@ -556,9 +562,15 @@ testcase tMainMenuBar
TableView.UseMenu
hMenuSelectNr(5)
iCount = hMenuItemGetCount()
- if (iCount <> 4) then
- warnlog "There should 4 items in the tools menu but there are " + iCount + " items."
- end if
+ if ( lcase( gPlatform ) = "osx" ) then
+ if ( iCount <> 3 ) then
+ warnlog( "Tools menu: 3 items expected, found " & iCount )
+ endif
+ else
+ if (iCount <> 4) then
+ warnlog "There should 4 items in the tools menu but there are " + iCount + " items."
+ end if
+ endif
call hMenuClose()
'/// check if there are 4 items in the TOOLS/MACRO menu.
@@ -580,26 +592,6 @@ endcase
'-------------------------------------------------------------------------
'-------------------------------------------------------------------------
'-------------------------------------------------------------------------
-function fDateiOeffnen ( DocName$ )
-
- Dim DieDatei as String
-
- DieDatei = ConvertPath ( DocName$ )
-
- FileOpen
- sleep (1)
- Kontext "OeffnenDlg"
- Dateiname.SetText DieDatei
- sleep (3)
- Oeffnen.Click
- sleep (3)
-
- Kontext "Insight"
-
- fDateiOeffnen = true
-
-end function
-'-------------------------------------------------------------------------
function getMenuItemCount as Integer
'use this function becasue this doesn't count the pick list
Dim i, j, Ende, nID as Integer
@@ -622,7 +614,7 @@ end function
sub initTable
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
diff --git a/testautomation/dbaccess/required/includes/TableDesign.inc b/testautomation/dbaccess/required/includes/TableDesign.inc
index f2132721c864..65eff82c0066 100755
--- a/testautomation/dbaccess/required/includes/TableDesign.inc
+++ b/testautomation/dbaccess/required/includes/TableDesign.inc
@@ -385,10 +385,16 @@ testcase tMainMenuBar
printlog "+ there different count related to the file pick list."
hMenuSelectNr(1) ' the file menu
iCount = getMenuItemCount()
- if (iCount <> 8 ) then
- warnlog "There should between 8 and 12 items in the file menu but there are " + iCount + " items."
- end if
-
+ if ( lcase( gPlatform ) = "osx" ) then
+ if ( iCount <> 7 ) then
+ warnlog( "File menu: 7 items expected, found " & iCount )
+ endif
+ else
+ if (iCount <> 8 ) then
+ warnlog "There should between 8 and 12 items in the file menu but there are " + iCount + " items."
+ end if
+ endif
+
'/// check if there are 12 items in the FILE/NEW menu.
printlog "check if there are 12 items in the FILE/NEW menu."
printlog "check the FILE/NEW"
@@ -435,9 +441,15 @@ testcase tMainMenuBar
TableDesignTable.UseMenu
hMenuSelectNr(4)
iCount = hMenuItemGetCount()
- if (iCount <> 5) then
- warnlog "There should 5 items in the tools menu but there are " + iCount + " items."
- end if
+ if ( lcase( gPlatform ) = "osx" ) then
+ if ( iCount <> 4 ) then
+ warnlog( "Tools menu: 4 items expected, found " & iCount )
+ endif
+ else
+ if (iCount <> 5) then
+ warnlog "There should 5 items in the tools menu but there are " + iCount + " items."
+ end if
+ endif
call hMenuClose()
'/// check if there are 4 items in the TOOLS/MACRO menu.
@@ -459,26 +471,6 @@ endcase
'-------------------------------------------------------------------------
'-------------------------------------------------------------------------
'-------------------------------------------------------------------------
-function fDateiOeffnen ( DocName$ )
-
- Dim DieDatei as String
-
- DieDatei = ConvertPath ( DocName$ )
-
- FileOpen
- sleep (1)
- Kontext "OeffnenDlg"
- Dateiname.SetText DieDatei
- sleep (3)
- Oeffnen.Click
- sleep (3)
-
- Kontext "Insight"
-
- fDateiOeffnen = true
-
-end function
-'-------------------------------------------------------------------------
function getMenuItemCount as Integer
'use this function becasue this doesn't count the pick list
Dim i, j, Ende, nID as Integer
@@ -500,7 +492,7 @@ end function
'-------------------------------------------------------------------------
sub initTableDesign
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
diff --git a/testautomation/dbaccess/required/includes/Wizards.inc b/testautomation/dbaccess/required/includes/Wizards.inc
index 94f6d5ee96b4..5c8c62ea334d 100755
--- a/testautomation/dbaccess/required/includes/Wizards.inc
+++ b/testautomation/dbaccess/required/includes/Wizards.inc
@@ -58,7 +58,7 @@ end sub
'-------------------------------------------------------------------------
testcase tQueryWizard
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
@@ -112,7 +112,7 @@ endcase
'-------------------------------------------------------------------------
testcase tReportWizard
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
@@ -164,7 +164,7 @@ endcase
'-------------------------------------------------------------------------
testcase tTableWizard
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"
@@ -205,7 +205,7 @@ endcase
'-------------------------------------------------------------------------
testcase tFormWizard
- call fDateiOeffnen(gOfficePath + ConvertPath("user/database/biblio.odb"))
+ hFileOpen( gOfficePath & "user/database/biblio.odb" )
Kontext "Insight"