diff options
Diffstat (limited to 'testautomation/chart2/required')
24 files changed, 4415 insertions, 0 deletions
diff --git a/testautomation/chart2/required/ch2_updt_calc.bas b/testautomation/chart2/required/ch2_updt_calc.bas new file mode 100644 index 000000000000..806f0f220ed2 --- /dev/null +++ b/testautomation/chart2/required/ch2_updt_calc.bas @@ -0,0 +1,151 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Resource Test for all chart specific menues +'* +'\************************************************************************************************ + +sub main + use "chart2\tools\ch_tools_common.inc" + use "chart2\tools\ch_tools_chart_type.inc" + use "chart2\tools\ch_tools_titles.inc" + use "chart2\tools\ch_tools_axes.inc" + use "chart2\tools\ch_tools_grids.inc" + use "chart2\tools\ch_tools_legend.inc" + use "chart2\tools\ch_tools_data_labels.inc" + use "chart2\tools\ch_tools_statistics.inc" + use "chart2\tools\ch_tools_tab_pages.inc" + use "chart2\tools\ch_tools_select.inc" + use "chart2\required\includes\ch2_wizard.inc" + use "chart2\required\includes\ch2_file.inc" + use "chart2\required\includes\ch2_view.inc" + use "chart2\required\includes\ch2_insert_ctl.inc" + use "chart2\required\includes\ch2_insert.inc" + use "chart2\required\includes\ch2_format.inc" + use "chart2\required\includes\ch2_format1.inc" + use "chart2\required\includes\ch2_window.inc" + use "chart2\required\includes\ch2_toolbars.inc" + use "chart2\required\includes\ch2_menu.inc" + use "chart2\required\includes\ch2_ole.inc" + + Call hStatusIn("Chart2", "ch2_updt_calc.bas") + + printlog "----------------------------------------" + printlog "C h a r t 2 i n S p r e a d s h e e t" + printlog " U p d a t e t e s t" + printlog "----------------------------------------" + printLog Chr(13) + "----------- Chart2 Wizard ------------" + Call tCreateNewChart + printLog Chr(13) + "----------- Chart2 Menu ------------" + call tMainMenu + printLog Chr(13) + "---------- Chart2 File Menu ----------" + call tFileClose + call tFileSaveAsOTS + call tFileSaveAsSXC + call tFileSaveAsSTC + call tFileSaveAsXLS + call tFileSaveAsXLT + call tFileReload + printLog Chr(13) + "---------- Chart2 View Menu -----------" + Call tViewToolbars + Call tViewToolbarsCustomize + Call tViewFullScreen + printLog Chr(13) + "-------- Chart2 Insert Menu ----------" + call tInsertTitle + call tInsertAxes + call tInsertGrids + call tInsertLegend + call tInsertDataLabels + call tInsertTrendLines + call tInsertMeanValueLines + call tInsertYErrorBars + call tInsertSpecialCharacter + printLog Chr(13) + "-------- Chart2 CTL Features ----------" + call tTitleTextDirection + call tLegendTextDirection + call tXAxisTextDirection + call tDataSeriesTextDirection + call tEquationTextDirection + call tDataPointTextDirection + printlog Chr(13) + "--------- Chart2 Format Menu ---------" + call tFormatObjectProperties + call tFormatObjectPropertiesPieChart + call tFormatPositonAndSize + call tFormatArrangement + Call tFormatTitleMaintitle + Call tFormatTitleSubtitle + Call tFormatTitleXAxistitle + Call tFormatTitleYAxistitle + Call tFormatTitleZAxistitle + Call tFormatTitleAllTitles + Call tFormatAxisXAxis + Call tFormatAxisYAxis + Call tFormatAxisZAxis + Call tFormatAxisSecondaryXAxis + Call tFormatAxisSecondaryYAxis + Call tFormatAxisAllAxes + Call tFormatDateAxis + Call tFormatXAxisMainGrid + Call tFormatYAxisMainGrid + Call tFormatZAxisMainGrid + call tFormatXAxisMinorGrid + Call tFormatYAxisMinorGrid + Call tFormatAllAxesGrids + Call tFormatLegend + Call tFormatChartWall + Call tFormatChartFloor + Call tFormatChartArea + Call tFormatChartType + call tFormatDataRanges + Call tFormat3DView + printlog Chr(13) + "--------- Chart2 Window Menu ---------" + Call tWindowNewWindowAndClose + printLog Chr(13) + "---------- Chart2 Toolbars -----------" + Call tDrawBar + printLog Chr(13) + "--------- Chart2 as OLE object ---------" + Call tChartOLE("WRITER") + Call tChartOLE("CALC") + Call tChartOLE("IMPRESS") + Call tChartOLE("DRAW") + Call tChartOLE("HTML") + Call tChartOLE("MASTERDOCUMENT") + Call hStatusOut + +end sub +' +'------------------------------------------------------------------------------- +' +sub LoadIncludeFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + use "global\tools\includes\optional\t_set_standard_controls.inc" + use "global\tools\includes\optional\t_ole.inc" + Call GetUseFiles + gApplication = "CALC" +end sub diff --git a/testautomation/chart2/required/includes/ch2_file.inc b/testautomation/chart2/required/includes/ch2_file.inc new file mode 100644 index 000000000000..51e41398532e --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_file.inc @@ -0,0 +1,327 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Chart resource test - Menu FILE +'* +'************************************************************************ +'* +' #1 tFileClose +' #1 tFileSaveAsOTS +' #1 tFileSaveAsSXC +' #1 tFileSaveAsSTC +' #1 tFileSaveAsXLS +' #1 tFileSaveAsXLT +' #1 tFileReload +'* +'\************************************************************************ + +testcase tFileClose +'///<u><b>Dialog test after invocation of File::Close</b></u + '/// Load new document + Call hNewDocument + '/// Insert default chart + InsertChart + sleep(2) + Kontext "ChartWizard" + '/// Leave wizard with OK + ChartWizard.OK + printlog "Left Chart wizard with OK" + sleep(2) + '/// File / Close + FileClose + printlog "File / Close executed" + Kontext + '/// MsgBox: Cancel + Active.Cancel + '/// File / Close + FileClose + '/// MsgBox: Save + Kontext + Active.Yes + '/// Check for File Save dialo + Kontext "SpeichernDlg" + '/// Cancel File Save dialog + SpeichernDlg.Cancel + '/// File / Close + FileClose + Kontext + '/// MsgBox: Discard + Active.No +endcase +' +'----------------------------------------------------------- +' +testcase tFileSaveAsOTS +'///<u><b>Save the test file as OpenDocument Spreadsheet Template (.ots)</b></u> + Dim sOutputFile as string + + sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.ots" ) + + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document failed!" + goto endsub + else + printlog "Test document successfully been loaded." + endif + '/// Select first OLE using the navigator + call fSelectFirstOLE + printlog "First OLE selected via navigator" + '/// Edit / Object / Edit to enter Inplace Mode + EditObjectEdit + printlog "Edit / Object / Edit" + '/// Convert chart to 3D (just to edit document) + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + else + printlog "Conversation of chart to 3D was successful." + endif + '/// Unselect chart using Escape key + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8_template" ) then + warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting" + call hCloseDocument + goto endsub + endif + '/// Clsoing the Navigator + Kontext "NavigatorCalc" + if NavigatorCalc.Exists(1) then + NavigatorCalc.Close + QAErrorLog "Why did fSelectFirstOLE not close this dialog?" + endif + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------- +' +testcase tFileSaveAsSXC +'///<u><b>Save the test file as StarOffice 6.0/7 Spreadsheet (.sxc)</b></u> + Dim sOutputFile as string + + sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.sxc" ) + + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document failed!" + goto endsub + else + printlog "Loading test document was successful!" + endif + '/// Select chart using navigator + call fSelectFirstOLE + printlog "First OLE selected via Navigator" + '/// Edit / Object / Edit to enter Inplace Mode + EditObjectEdit + printlog "Edit / Object / Edit" + '/// Convert chart to 3D (just to edit document) + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + '/// Unselect chart using Escape key + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '/// Save document as StarOffice 6.0/7 Spreadsheet (.sxc) + if NOT hFileSaveAsWithFilterKill ( sOutputFile , "StarOffice XML (Calc)") then + warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting" + call hCloseDocument + goto endsub + endif + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------- +' +testcase tFileSaveAsSTC +'///<u><b>Save the test file as StarOffice 6.0/7 Spreadsheet Template (.stc)</b></u> + Dim sOutputFile as string + + sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.stc" ) + + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + else + printlog "Simple chart document successfully been loaded." + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Edit / Object / Edit + EditObjectEdit + '/// Convert chart to 3D (just to edit document) + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + '/// Unselect chart using Escape key + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '/// Save document as StarOffice 6.0/7 Spreadsheet Template (.stc) + if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc_StarOffice_XML_Calc_Template" ) then + warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting" + call hCloseDocument + goto endsub + endif + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------- +' +testcase tFileSaveAsXLS +'///<u><b>Save the test file as Microsoft Excel 97/2000/XP (.xls)</b></u> + Dim sOutputFile as string + + sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.xls" ) + + '/// Load simple chart document <i>Testtoolpath</i>/chart2/required/input/verySimpleChart.ods + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document failed!" + goto endsub + endif + '/// Edit / Navigator + '/// Select the first OLE object in the tree view of the Navigator + '/// Press <RETURN> + call fSelectFirstOLE + printlog "First OLE selected." + '/// Edit / Object / Edit to enter Inplace Mode + EditObjectEdit + printlog "Edit / Object / Edit executed." + '/// Format / Chart Type + '/// Check 3D checkbox + '/// Close Chart Type dialog + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + else + printlog "Chart type converted to 3D." + endif + '/// Unselect chart using Escape key + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '/// Save document as Microsoft Excel 97/2000/XP (.xls) + if NOT hFileSaveAsWithFilterKill ( sOutputFile , "MS Excel 97" ) then + warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting" + call hCloseDocument + goto endsub + endif + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFileSaveAsXLT +'///<u><b>Save the test file as Microsoft Excel 97/2000/XP Template(.xlt)</b></u> + Dim sOutputFile as string + + sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.xlt" ) + + '/// Load simple chart document <i>Testtoolpath</i>/chart2/required/input/verySimpleChart.ods + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document failed!" + goto endsub + endif + '/// Edit / Navigator + '/// Select the first OLE object in the tree view of the Navigator + '/// Press <RETURN> + call fSelectFirstOLE + printlog "First OLE selected." + '/// Edit / Object / Edit to enter Inplace Mode + EditObjectEdit + printlog "Edit / Object / Edit executed." + '/// Format / Chart Type + '/// Check 3D checkbox + '/// Close Chart Type dialog + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + else + printlog "Chart type converted to 3D." + endif + '/// Unselect chart using Escape key + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '/// Save document as Microsoft Excel 97/2000/XP Template(.xlt) + if NOT hFileSaveAsWithFilterKill ( sOutputFile , "MS Excel 97 Vorlage/Template" ) then + warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting" + call hCloseDocument + goto endsub + endif + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +endcase +' +'------------------------------------------------------------- + +' +testcase tFileReload + printlog "Load simple chart document" + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + printlog "Select chart using navigator" + call fSelectFirstOLE + printlog "Invoke Edit / Object / Edit to enter Inplace Mode" + EditObjectEdit + printlog "Convert chart to 3D (just to edit document)" + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + printlog "Unselect chart using Escape key" + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + sleep (2) + printlog "File / Reload" + FileReload + printlog "MsgBox 'Cancel all changes?' should be visible -> Commit OK" + Kontext + Active.Yes + sleep (2) + printlog "Close document ///" + Call hCloseDocument +endcase + diff --git a/testautomation/chart2/required/includes/ch2_format.inc b/testautomation/chart2/required/includes/ch2_format.inc new file mode 100644 index 000000000000..27575ca4324f --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_format.inc @@ -0,0 +1,1444 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Chart resource test - Menu FORMAT +'* +'************************************************************************ +'* +' #1 tFormatObjectProperties +' #1 tFormatObjectPropertiesPieChart +' #1 tFormatPositonAndSize +' #1 tFormatArrangement +' #1 tFormatTitleMaintitle +' #1 tFormatTitleSubtitle +' #1 tFormatTitleXAxistitle +' #1 tFormatTitleYAxistitle +' #1 tFormatTitleZAxistitle +' #1 tFormatTitleAllTitles +' #1 tFormatAxisXAxis +' #1 tFormatAxisYAxis +' #1 tFormatAxisZAxis +' #1 tFormatAxisSecondaryXAxis +' #1 tFormatAxisSecondaryYAxis +' #1 tFormatAxisAllAxes +' #1 tFormatDateAxis +'* +'\************************************************************************ + +testcase tFormatObjectProperties + Dim iCountTabPg as integer + + iCountTabPg = 0 + + printlog "Load simple chart document" + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + printlog "Select chart using navigator" + if fSelectFirstOLE = 0 then + printlog "Edit / Object / Edit" + EditObjectEdit + printlog "Select DataSeries A by toolbar selectorbox" + call fChartSelectElement (8) + printlog "Open the properties dialog by using the FormatSelection button in the toolbar" + FormatSelection.Click + printlog "Select tab page Options" + Kontext + iCountTabPg = Active.GetPageCount + if iCountTabPg <> 4 then + warnlog "Edit::Properties on a data series should have 4 tab pages but has " & iCountTabPg & "." + else + printlog "Edit::Properties on a data series has 4 tab pages." + endif + Active.SetPage TabDataSeriesOptions + '/// Check if tab page data series options exists + Kontext "TabDataSeriesOptions" + call DialogTest ( TabDataSeriesOptions ) + '/// Check if tab page area exists + Kontext + Active.SetPage TabArea + Kontext "TabArea" + call DialogTest ( TabArea ) + '/// Check if tab page transparency exists + Kontext + Active.SetPage TabTransparency + Kontext "TabTransparency" + call DialogTest ( TabTransparency ) + '/// Check if tab page borders exists + Kontext + Active.SetPage TabFormatChartBorders + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + '/// Close dialog with Cancel-button + TabFormatChartBorders.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + else + warnlog "It was not possible to select the chart object!" + endif + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tFormatObjectPropertiesPieChart + Dim iCountTabPg as integer + + iCountTabPg = 0 + +'///<u><b>Dialog test after invoking Format::Object Properties... on a pie chart</b></u> + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + if fSelectFirstOLE = 0 then + '/// Edit / Object / Edit + EditObjectEdit + '/// Move to third object in Chart using TAB key (data series) + Kontext "DocumentChart" + '/// Format / Chart Type + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog" + Call hCloseDocument + goto endsub + endif + if fSetChartType("pie") > 0 then + warnlog "Something went wrong trying to set the Chart Type to 'Pie'" + Call hCloseDocument + goto endsub + endif + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to leave the dialog with OK" + Call hCloseDocument + goto endsub + endif + '/// Move to data series in Chart + call fChartSelectElement (5) + printlog "Open the properties dialog by using the FormatSelection button in the toolbar" + FormatSelection.Click + '/// Select tab page Aligment + Kontext + iCountTabPg = Active.GetPageCount + if iCountTabPg <> 4 then + warnlog "Edit::Properties on a data series of a pie chart should have 4 tab pages but has " & iCountTabPg & "." + else + printlog "Edit::Properties on a data series on a pie chart has 4 tab pages." + endif + Active.SetPage TabChartPieOptions + '/// Check if tab page Options exists + Kontext "TabChartPieOptions" + call DialogTest ( TabChartPieOptions ) + '/// Close dialog with Cancel-button + TabChartPieOptions.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<ESCAPE>" + else + warnlog "It was not possible to select the chart object!" + endif + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatPositonAndSize +'///<u><b>Dialog test after invoking Format::PositionAndSize</b></u> + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Edit / Object / Edit + EditObjectEdit + '/// Move to first object in Chart using TAB key + Kontext "DocumentChart" + DocumentChart.TypeKeys "<TAB>" + '/// Invoke Format::PositionAndSize + FormatPositionAndSizeChart + '/// Check if Position and Size dialog exists (single tab page) + Kontext "TabPositionAndSize" + call DialogTest ( TabPositionAndSize ) + '/// Close dialog + TabPositionAndSize.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatArrangement + dim sInputFile as string + dim iLoop as integer + sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange01.ods") + printlog "Open test document gtesttoolpath/chart2/required/input/ch_flexrange01.ods" + if fOpenTestDocumentAndInsertChart(sInputFile) then + Kontext "ChartType" + printlog "Choose the Chart type 'bar' (should be the second in the top-down list)" + if fSetChartType( "bar" ) > 0 then + warnlog "Something went wrong setting chart type to BAR. Testcase aborted" + Kontext "ChartWizard" + ChartWizard.Cancel + call hCloseDocument + goto endsub + endif + Kontext "ChartWizard" + printlog "Press OK button" + ChartWizard.OK + Kontext "DocumentChart" + printlog "Type twice <TAB> to select a data series to enable the menu entry." + DocumentChart.TypeKeys "<TAB>", 2, TRUE + Kontext "DocumentCalc" + DocumentCalc.UseMenu + printlog "Select 'Format' entry in main menu" + hMenuSelectNr(5) ' FORMAT + printlog "Select 'Arrangement' entry in 'Format'-menu" + hMenuSelectNr(3) ' ARRANGEMENT + printlog "Select enabled 'Send Backward' entry." + hMenuSelectNr(2) + Kontext "DocumentCalc" + DocumentCalc.UseMenu + printlog "Select 'Format' entry in main menu again" + hMenuSelectNr(5) ' FORMAT + printlog "Select 'Arrangement' entry in 'Format'-menu" + hMenuSelectNr(3) ' ARRANGEMENT + printlog "Select now enabled 'Bring Forward' entry." + hMenuSelectNr(1) + printlog "Close document" + Call hCloseDocument + else + warnlog "It was not possible to open the test document." + endif +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatTitleMaintitle +'///<u><b>Dialog test after invoking Format::Title::MainTitle</b></u> + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Edit / Object / Edit + EditObjectEdit + sleep(1) + '/// Format / Title / Main title + FormatTitleMainTitle + '/// Goto tab page Borders + Kontext + Active.SetPage TabFormatChartBorders + '/// Check if tab page Borders exists + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + '/// Goto tab page Area + Kontext + Active.SetPage TabArea + '/// Check if tab page Area exists + Kontext "TabArea" + call DialogTest ( TabArea ) + '/// Goto tab page Transparency + Kontext + Active.SetPage TabTransparency + '/// Check if tab page Transparency exists + Kontext "TabTransparency" + call DialogTest ( TabTransparency ) + '/// Goto tab page Characters + Kontext + Active.SetPage TabFont + '/// Check if tab page Characters exists + Kontext "TabFont" + call DialogTest ( TabFont ) + '/// Goto tab page Font Effects + Kontext + Active.SetPage TabFontEffects + '/// Check if tab page Font Effects exists + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + '/// Goto tab page Alignment + Kontext + Active.SetPage TabFormatChartTitleAlignment + '/// Check if tab page Alignment exists + Kontext "TabFormatChartTitleAlignment" + call DialogTest ( TabFormatChartTitleAlignment ) + '/// Close dialog + TabFormatChartTitleAlignment.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatTitleSubtitle +'///<u><b>Dialog test after invoking Format::Title::Subtitle</b></u> + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Edit / Object / Edit + EditObjectEdit + sleep(1) + '/// Insert / Title + if fInvokeTitlesDialog() > 0 then + warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertTitleDialog" + '/// Set Subtitle + if fSetTitle( SubTitle , "Custom Subtitle" ) > 0 then + warnlog "Something went wrong setting the subtitle -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Title dialog + if fCloseTitlesDialogOK() > 0 then + warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Format / Title / Subtitle + FormatTitleSubTitle + '/// Goto tab page Area + Kontext + Active.SetPage TabArea + '/// Check if tab page Area exists + Kontext "TabArea" + call DialogTest ( TabArea ) + '/// Goto tab page Characters + Kontext + Active.SetPage TabFont + '/// Check if tab page Characters exists + Kontext "TabFont" + call DialogTest ( TabFont ) + '/// Goto tab page Borders + Kontext + Active.SetPage TabFormatChartBorders + '/// Check if tab page Borders exists + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + '/// Goto tab page Alignment + Kontext + Active.SetPage TabFormatChartTitleAlignment + '/// Check if tab page Alignment exists + Kontext "TabFormatChartTitleAlignment" + call DialogTest ( TabFormatChartTitleAlignment ) + '/// Goto tab page Transparency + Kontext + Active.SetPage TabTransparency + '/// Check if tab page Transparency exists + Kontext "TabTransparency" + call DialogTest ( TabTransparency ) + '/// Goto tab page Font Effects + Kontext + Active.SetPage TabFontEffects + '/// Check if tab page Font Effects exists + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + '/// Close dialog with Cancel + TabFontEffects.Cancel + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatTitleXAxistitle +'///<u><b>Dialog test after invoking Format::Title::X Axis Title</b></u> + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Edit / Object / Edit + EditObjectEdit + sleep(1) + '/// Insert / Title + if fInvokeTitlesDialog() > 0 then + warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertTitleDialog" + '/// Set X Axis Title + if fSetTitle( TitleXaxis , "Custom X Axis Title" ) > 0 then + warnlog "Something went wrong setting the X Axis Title -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Title dialog + if fCloseTitlesDialogOK() > 0 then + warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Format / Chart Type + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Change Chart type to Column + Line + if fSetChartType( "column_line" ) > 0 then + warnlog "Something went wrong setting chart type to Column + Line -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Chart Type dialog + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Format / Title / X Axis Title + FormatTitleX_Axis + '/// Goto tab page Font Effects + Kontext + Active.SetPage TabFontEffects + '/// Check if tab page Font Effects exists + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + '/// Goto tab page Transparency + Kontext + Active.SetPage TabTransparency + '/// Check if tab page Transparency exists + Kontext "TabTransparency" + call DialogTest ( TabTransparency ) + '/// Goto tab page Borders + Kontext + Active.SetPage TabFormatChartBorders + '/// Check if tab page Borders exists + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + '/// Goto tab page Alignment + Kontext + Active.SetPage TabFormatChartTitleAlignment + '/// Check if tab page Alignment exists + Kontext "TabFormatChartTitleAlignment" + call DialogTest ( TabFormatChartTitleAlignment ) + '/// Goto tab page Characters + Kontext + Active.SetPage TabFont + '/// Check if tab page Characters exists + Kontext "TabFont" + call DialogTest ( TabFont ) + '/// Goto tab page Area + Kontext + Active.SetPage TabArea + '/// Check if tab page Area exists + Kontext "TabArea" + call DialogTest ( TabArea ) + '/// Close dialog + TabArea.Cancel + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatTitleYAxistitle +'///<u><b>Dialog test after invoking Format::Title::Y Axis Title</b></u> + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Edit / Object / Edit + EditObjectEdit + sleep(1) + '/// Insert / Title + if fInvokeTitlesDialog() > 0 then + warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertTitleDialog" + '/// Set Y Axis Title + if fSetTitle( TitleYaxis , "Custom Y Axis Title" ) > 0 then + warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Title dialog + if fCloseTitlesDialogOK() > 0 then + warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Format / Chart Type + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Change Chart type to STOCK + if fSetChartType( "stock" ) > 0 then + warnlog "Something went wrong setting chart type to STOCK -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Chart Type dialog + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Format / Title / Y Axis Title + FormatTitleY_Axis + '/// Goto tab page Transparency + Kontext + Active.SetPage TabTransparency + '/// Check if tab page Transparency exists + Kontext "TabTransparency" + call DialogTest ( TabTransparency ) + '/// Goto tab page Alignment + Kontext + Active.SetPage TabFormatChartTitleAlignment + '/// Check if tab page Alignment exists + Kontext "TabFormatChartTitleAlignment" + call DialogTest ( TabFormatChartTitleAlignment ) + '/// Goto tab page Area + Kontext + Active.SetPage TabArea + '/// Check if tab page Area exists + Kontext "TabArea" + call DialogTest ( TabArea ) + '/// Goto tab page Font Effects + Kontext + Active.SetPage TabFontEffects + '/// Check if tab page Font Effects exists + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + '/// Goto tab page Borders + Kontext + Active.SetPage TabFormatChartBorders + '/// Check if tab page Borders exists + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + '/// Goto tab page Characters + Kontext + Active.SetPage TabFont + '/// Check if tab page Characters exists + Kontext "TabFont" + call DialogTest ( TabFont ) + '/// Close dialog + TabFont.Cancel + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatTitleZAxistitle +'///<u><b>Dialog test after invoking Format::Title::Z Axis Title</b></u> + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Edit / Object / Edit + EditObjectEdit + sleep(1) + '/// Convert chart to 3D (this will enable all controls in Title dialog) + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + '/// Insert / Title + if fInvokeTitlesDialog() > 0 then + warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertTitleDialog" + '/// Set Z Axis Title + if fSetTitle( TitleZaxis , "Custom Z Axis Title" ) > 0 then + warnlog "Something went wrong setting the Z Axis Title -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Title dialog + if fCloseTitlesDialogOK() > 0 then + warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Format / Chart Type + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Change Chart type to BAR + if fSetChartType( "bar" ) > 0 then + warnlog "Something went wrong setting chart type to BAR -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Chart Type dialog + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Invoke Format::Title::Z Axis Title + FormatTitleZ_Axis + '/// Goto tab page Alignment + Kontext + Active.SetPage TabFormatChartTitleAlignment + '/// Check if tab page Alignment exists + Kontext "TabFormatChartTitleAlignment" + call DialogTest ( TabFormatChartTitleAlignment ) + '/// Goto tab page Transparency + Kontext + Active.SetPage TabTransparency + '/// Check if tab page Transparency exists + Kontext "TabTransparency" + call DialogTest ( TabTransparency ) + '/// Goto tab page Font Effects + Kontext + Active.SetPage TabFontEffects + '/// Check if tab page Font Effects exists + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + '/// Goto tab page Area + Kontext + Active.SetPage TabArea + '/// Check if tab page Area exists + Kontext "TabArea" + call DialogTest ( TabArea ) + '/// Goto tab page Characters + Kontext + Active.SetPage TabFont + '/// Check if tab page Characters exists + Kontext "TabFont" + call DialogTest ( TabFont ) + '/// Goto tab page Borders + Kontext + Active.SetPage TabFormatChartBorders + '/// Check if tab page Borders exists + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + '/// Close dialog + TabFormatChartBorders.Cancel + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatTitleAllTitles +'///<u><b>Dialog test after invoking Format::Title::All Titles</b></u> + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Edit / Object / Edit + EditObjectEdit + sleep(1) + '/// Convert chart to 3D (this will enable all controls in Title dialog) + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + '/// Insert / Title + if fInvokeTitlesDialog() > 0 then + warnlog "Something went wrong trying to invoke the Title dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertTitleDialog" + '/// Set All Axis Title + if fSetTitle( SubTitle , "Custom Subtitle" ) > 0 then + warnlog "Something went wrong setting the subtitle -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + if fSetTitle( TitleXaxis , "Custom X Axis Title" ) > 0 then + warnlog "Something went wrong setting the X Axis Title -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + if fSetTitle( TitleYaxis , "Custom Y Axis Title" ) > 0 then + warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + if fSetTitle( TitleZaxis , "Custom Z Axis Title" ) > 0 then + warnlog "Something went wrong setting the Y Axis Title -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Title dialog + if fCloseTitlesDialogOK() > 0 then + warnlog "Something went wrong trying to close the Title dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Format / Chart Type + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Change Chart type to AREA + if fSetChartType( "area" ) > 0 then + warnlog "Something went wrong setting chart type to AREA -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Chart Type dialog + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Format / Title / All Titles + FormatTitleAllTitles + '/// Goto tab page Characters + Kontext + Active.SetPage TabFont + '/// Check if tab page Characters exists + Kontext "TabFont" + call DialogTest ( TabFont ) + '/// Goto tab page Alignment + Kontext + Active.SetPage TabFormatChartTitleAlignment + '/// Check if tab page Alignment exists + Kontext "TabFormatChartTitleAlignment" + call DialogTest ( TabFormatChartTitleAlignment ) + '/// Goto tab page Font Effects + Kontext + Active.SetPage TabFontEffects + '/// Check if tab page Font Effects exists + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + '/// Goto tab page Area + Kontext + Active.SetPage TabArea + '/// Check if tab page Area exists + Kontext "TabArea" + call DialogTest ( TabArea ) + '/// Goto tab page Borders + Kontext + Active.SetPage TabFormatChartBorders + '/// Check if tab page Borders exists + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + '/// Goto tab page Transparency + Kontext + Active.SetPage TabTransparency + '/// Check if tab page Transparency exists + Kontext "TabTransparency" + call DialogTest ( TabTransparency ) + '/// Close dialog + TabTransparency.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatAxisXAxis + + Dim bAsianLanguage as boolean + Dim iCountTabPg as integer + iCountTabPg = 0 + + printlog "Load simple chart document" + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + printlog " Enable language support for CJK (Tools-Options-Language Support)" + bAsianLanguage = ActiveDeactivateAsianSupport(TRUE) + printlog "Select chart using navigator" + call fSelectFirstOLE + printlog "Edit / Object / Edit" + EditObjectEdit + sleep(1) + printlog "Format / Chart Type" + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Change Chart type to XY (to obtain more tabpages)" + if fSetChartType( "xy" ) > 0 then + warnlog "Something went wrong setting chart type to XY -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Close Chart Type dialog" + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Invoke Format::Axis::X Axis" + FormatAxisXAxis + printlog "Goto tab page Line" + Kontext + iCountTabPg = Active.GetPageCount + if iCountTabPg <> 8 then + warnlog "Format::Axis::XAxis should have 8 tab pages but has " & iCountTabPg & "." + else + printlog "Format::Axis::XAxis has 8 tab pages." + endif + Active.SetPage TabFormatChartLine + printlog "Check if tab page Line exists" + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + printlog "Goto tab page Characters" + Kontext + Active.SetPage TabFont + printlog "Check if tab page Characters exists" + Kontext "TabFont" + call DialogTest ( TabFont ) + printlog "Goto tab page Font Effects" + Kontext + Active.SetPage TabFontEffects + printlog "Check if tab page Font Effects exists" + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + printlog "Goto tab page Label" + Kontext + Active.SetPage TabChartAxisLabel + printlog "Check if tab page Label exists" + Kontext "TabChartAxisLabel" + call DialogTest ( TabChartAxisLabel ) + printlog "Goto tab page Scale" + Kontext + Active.SetPage TabChartAxisScale + printlog "Check if tab page Scale exists" + Kontext "TabChartAxisScale" + call DialogTest ( TabChartAxisScale ) + Kontext + Active.SetPage TabChartAxisPositioning + printlog "Check if tab page Positiong exists" + Kontext "TabChartAxisPositioning" + call DialogTest ( TabChartAxisPositioning ) + printlog "Goto tab page Numbers" + Kontext + Active.SetPage TabChartAxisNumbers + printlog "Check if tab page Numbers exists" + Kontext "TabChartAxisNumbers" + call DialogTest ( TabChartAxisNumbers ) + printlog "Close dialog with cancel" + TabChartAxisNumbers.Cancel + printlog " Set support for CJK back to default (Tools – Options – Language Support)" + if bAsianLanguage = FALSE then + Call ActiveDeactivateAsianSupport(FALSE) + end if + printlog "File / Close" + Call hCloseDocument +endcase +' +'------------------------------------------------------------- +' +testcase tFormatAxisYAxis + + Dim bAsianLanguage as boolean + Dim iCountTabPg as integer + Dim iCrossingEntries as integer + Dim iCategoryEntries as integer + Dim iPlaceLabels as integer + Dim iPlaceMarks as integer + + iCountTabPg = 0 + iCrossingEntries = 0 + iCategoryEntries = 0 + iPlaceLabels = 0 + iPlaceMarks = 0 + + printlog "Load simple chart document" + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + printlog " Enable language support for CJK (Tools-Options-Language Support)" + bAsianLanguage = ActiveDeactivateAsianSupport(TRUE) + printlog "Select chart using navigator" + call fSelectFirstOLE + printlog "Edit / Object / Edit" + EditObjectEdit + sleep(1) + printlog "Format / Chart Type" + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Change Chart type to BAR (to obtain more tabpages)" + if fSetChartType( "bar" ) > 0 then + warnlog "Something went wrong setting chart type to BAR -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Close Chart Type dialog" + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Invoke Format::Axis::Y Axis" + FormatAxisYAxis + Kontext + iCountTabPg = Active.GetPageCount + if iCountTabPg <> 8 then + warnlog "Format::Axis::YAxis should have 8 tab pages but has " & iCountTabPg & "." + else + printlog "Format::Axis::YAxis has 8 tab pages." + endif + printlog "Goto tab page Characters" + Active.SetPage TabFont + printlog "Check if tab page Characters exists" + Kontext "TabFont" + call DialogTest ( TabFont ) + printlog "Goto tab page Line" + Kontext + Active.SetPage TabFormatChartLine + printlog "Check if tab page Line exists" + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + printlog "Goto tab page Label" + Kontext + Active.SetPage TabChartAxisLabel + printlog "Check if tab page Label exists" + Kontext "TabChartAxisLabel" + call DialogTest ( TabChartAxisLabel ) + printlog "Goto tab page Font Effects" + Kontext + Active.SetPage TabFontEffects + printlog "Check if tab page Font Effects exists" + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + printlog "Goto tab page Numbers" + Kontext + Active.SetPage TabChartAxisNumbers + printlog "Check if tab page Numbers exists" + Kontext "TabChartAxisNumbers" + call DialogTest ( TabChartAxisNumbers ) + printlog "Goto tab page Scale" + Kontext + Active.SetPage TabChartAxisScale + printlog "Check if tab page Scale exists" + Kontext "TabChartAxisScale" + call DialogTest ( TabChartAxisScale ) + printlog "Goto tab page Positioning" + Kontext + Active.SetPage TabChartAxisPositioning + printlog "Check if tab page Positioning exists" + Kontext "TabChartAxisPositioning" + call DialogTest ( TabChartAxisPositioning ) + iCrossingEntries = CrossOtherAxisAt.GetItemCount + if iCrossingEntries <> 3 then + warnlog "'Cross other axis at'-listbox sould have three entries but has " & iCrossingEntries & "." + else + printlog "'Cross other axis at'-listbox has three entries." + endif + printlog "Check that the first entry in 'Cross other axis at'-listbox is selected." + if CrossOtherAxisAt.GetSelIndex <> 1 OR AxisAtCategory.IsVisible then + warnlog "The first entry in 'Cross other axis at'-listbox should be selected and the 'Category'-combobox should not be visible." + else + printlog "Select the third entry (Category) in 'Cross other axis at'-listbox" + CrossOtherAxisAt.Select(3) + if AxisAtCategory.IsVisible then + printlog "The 'Category'-combobox is visible." + iCategoryEntries = AxisAtCategory.GetItemCount + if iCategoryEntries = 2 then + printlog "The 'Category'-combobox should have two entries." + else + warnlog "The 'Category'-combobox should have two entries but has " & iCategoryEntries & "." + endif + endif + endif + iPlaceLabels = PlaceLabels.GetItemCount + if iPlaceLabels <> 4 then + warnlog "'Place labels'-listbox should have four entries but has " & iPlaceLabels & "." + else + printlog "'Place labels'-listbox has four entries." + if PlaceMarks.IsEnabled then + warnlog "'Place marks'-listbox should only enabled if 'Place labels'-listbox has been set to 4th entry." + else + printlog "Select fourth entry in 'Place labels'-listbox." + PlaceLabels.Select(4) + if PlaceMarks.IsEnabled then + printlog "'Place marks'-listbox is enabled if fourth entry of 'Place labels'-listbox has been selected." + iPlaceMarks = PlaceMarks.GetItemCount + if iPlaceMarks = 3 then + printlog "'Place marks'-listbox has three entries." + else + warnlog "'Place marks'-listbox has not three entries. It has " & iPlaceMarks & " entries." + endif + else + warnlog "'Place marks'-listbox is not enabled if fourth entry of 'Place labels'-listbox has been selected." + endif + endif + endif + Kontext "TabChartAxisPositioning" + printlog "Leave dialog with Cancel." + TabChartAxisPositioning.Cancel + if bAsianLanguage = FALSE then + Call ActiveDeactivateAsianSupport(FALSE) + end if + printlog "File / Close" + Call hCloseDocument +endcase +' +'------------------------------------------------------------- +' +testcase tFormatAxisZAxis +'///<u><b>Dialog test after invoking Format::Axis::Z Axis</b></u> + + + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Edit / Object / Edit + EditObjectEdit + sleep(1) + '/// Format / Chart Type + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Change Chart type to AREA (to obtain more tabpages) + if fSetChartType( "area" ) > 0 then + warnlog "Something went wrong setting chart type to AREA -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Chart Type dialog + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Convert chart to 3D (this will enable the Z Axis) + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + + '/// Invoke Format::Axis::Z Axis + FormatAxisZAxis + '/// Goto tab page Font Effects + Kontext + Active.SetPage TabFontEffects + '/// Check if tab page Font Effects exists + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + + '/// Goto tab page Characters + Kontext + Active.SetPage TabFont + '/// Check if tab page Characters exists + Kontext "TabFont" + call DialogTest ( TabFont ) + + '/// Goto tab page Label + Kontext + Active.SetPage TabChartAxisLabel + '/// Check if tab page Label exists + Kontext "TabChartAxisLabel" + call DialogTest ( TabChartAxisLabel ) + + '/// Goto tab page Line + Kontext + Active.SetPage TabFormatChartLine + '/// Check if tab page Line exists + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + + '/// Close dialog + TabFormatChartLine.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument + + +endcase +' +'------------------------------------------------------------- +' +testcase tFormatAxisSecondaryXAxis + + Dim bAsianLanguage as boolean + Dim iCountTabPg as integer + iCountTabPg = 0 + + printlog "Load simple chart document" + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + printlog " Enable language support for CJK (Tools-Options-Language Support)" + bAsianLanguage = ActiveDeactivateAsianSupport(TRUE) + printlog "Select chart using navigator" + call fSelectFirstOLE + printlog "Edit / Object / Edit" + EditObjectEdit + sleep(1) + printlog "Format / Chart Type" + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Change Chart type to XY (to obtain more tabpages)" + if fSetChartType( "xy" ) > 0 then + warnlog "Something went wrong setting chart type to XY -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Close Chart Type dialog" + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Invoke Insert::Axes" + if fInvokeAxesDialog() > 0 then + warnlog "Something went wrong trying to invoke the Axes dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertAxesDialog" + printlog "Check Secondary X Axis Title" + if fSetAxis( SecondaryXAxis , TRUE ) > 0 then + warnlog "Something went wrong enabling the Secondary X Axis -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Close Axes dialog" + if fCloseAxesDialogOK() > 0 then + warnlog "Something went wrong trying to close the Axes dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Invoke Format::Axis::Secondary X Axis" + FormatAxisSecondaryXAxis + printlog "Goto tab page Line" + Kontext + iCountTabPg = Active.GetPageCount + if iCountTabPg <> 8 then + warnlog "Format::Axis::XAxis should have 8 tab pages but has " & iCountTabPg & "." + else + printlog "Format::Axis::XAxis has 8 tab pages." + endif + Active.SetPage TabFormatChartLine + printlog "Check if tab page Line exists" + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + printlog "Goto tab page Characters" + Kontext + Active.SetPage TabFont + printlog "Check if tab page Characters exists" + Kontext "TabFont" + call DialogTest ( TabFont ) + printlog "Goto tab page Font Effects" + Kontext + Active.SetPage TabFontEffects + printlog "Check if tab page Font Effects exists" + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + printlog "Goto tab page Label" + Kontext + Active.SetPage TabChartAxisLabel + printlog "Check if tab page Label exists" + Kontext "TabChartAxisLabel" + call DialogTest ( TabChartAxisLabel ) + printlog "Goto tab page Scale" + Kontext + Active.SetPage TabChartAxisScale + printlog "Check if tab page Scale exists" + Kontext "TabChartAxisScale" + call DialogTest ( TabChartAxisScale ) + Kontext + Active.SetPage TabChartAxisPositioning + printlog "Check if tab page Positiong exists" + Kontext "TabChartAxisPositioning" + call DialogTest ( TabChartAxisPositioning ) + printlog "Goto tab page Numbers" + Kontext + Active.SetPage TabChartAxisNumbers + printlog "Check if tab page Numbers exists" + Kontext "TabChartAxisNumbers" + call DialogTest ( TabChartAxisNumbers ) + printlog "Close dialog with cancel" + TabChartAxisNumbers.Cancel + if bAsianLanguage = FALSE then + Call ActiveDeactivateAsianSupport(FALSE) + end if + printlog "File / Close" + Call hCloseDocument +endcase +' +'------------------------------------------------------------- +' +testcase tFormatAxisSecondaryYAxis + + Dim bAsianLanguage as boolean + Dim iCountTabPg as integer + iCountTabPg = 0 + + printlog "Load simple chart document" + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + printlog " Enable language support for CJK (Tools-Options-Language Support)" + bAsianLanguage = ActiveDeactivateAsianSupport(TRUE) + printlog "Select chart using navigator" + call fSelectFirstOLE + printlog "Edit / Object / Edit" + EditObjectEdit + sleep(1) + printlog "Invoke Insert::Axes" + if fInvokeAxesDialog() > 0 then + warnlog "Something went wrong trying to invoke the Axes dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertAxesDialog" + printlog "Check Secondary Y Axis" + if fSetAxis( SecondaryYAxis , TRUE ) > 0 then + warnlog "Something went wrong enabling the Secondary Y Axis -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Leave Axes dialog with OK" + if fCloseAxesDialogOK() > 0 then + warnlog "Something went wrong trying to close the Axes dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + printlog "Invoke Format::Axis::Secondary Y Axis" + FormatAxisSecondaryYAxis + printlog "Goto tab page Line" + Kontext + iCountTabPg = Active.GetPageCount + if iCountTabPg <> 8 then + warnlog "Format::Axis::XAxis should have 8 tab pages but has " & iCountTabPg & "." + else + printlog "Format::Axis::XAxis has 8 tab pages." + endif + Active.SetPage TabFormatChartLine + printlog "Check if tab page Line exists" + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + printlog "Goto tab page Characters" + Kontext + Active.SetPage TabFont + printlog "Check if tab page Characters exists" + Kontext "TabFont" + call DialogTest ( TabFont ) + printlog "Goto tab page Font Effects" + Kontext + Active.SetPage TabFontEffects + printlog "Check if tab page Font Effects exists" + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + printlog "Goto tab page Label" + Kontext + Active.SetPage TabChartAxisLabel + printlog "Check if tab page Label exists" + Kontext "TabChartAxisLabel" + call DialogTest ( TabChartAxisLabel ) + printlog "Goto tab page Scale" + Kontext + Active.SetPage TabChartAxisScale + printlog "Check if tab page Scale exists" + Kontext "TabChartAxisScale" + call DialogTest ( TabChartAxisScale ) + Kontext + Active.SetPage TabChartAxisPositioning + printlog "Check if tab page Positiong exists" + Kontext "TabChartAxisPositioning" + call DialogTest ( TabChartAxisPositioning ) + printlog "Goto tab page Numbers" + Kontext + Active.SetPage TabChartAxisNumbers + printlog "Check if tab page Numbers exists" + Kontext "TabChartAxisNumbers" + call DialogTest ( TabChartAxisNumbers ) + printlog "Close dialog with cancel" + TabChartAxisNumbers.Cancel + printlog " Set support for CJK back to default (Tools – Options – Language Support)" + if bAsianLanguage = FALSE then + Call ActiveDeactivateAsianSupport(FALSE) + end if + printlog "File / Close" + Call hCloseDocument +endcase + +'------------------------------------------------------------- +testcase tFormatAxisAllAxes +'///<u><b>Dialog test after invoking Format::Axis::All Axes</b></u> + + + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Edit / Object / Edit + EditObjectEdit + sleep(1) + '/// Format / Chart Type + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Change Chart type to NET + if fSetChartType( "net" ) > 0 then + warnlog "Something went wrong setting chart type to NET -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Chart Type dialog + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Invoke Format::Axis::All Axes + FormatAxisAllAxes + '/// Goto tab page Characters + Kontext + Active.SetPage TabFont + '/// Check if tab page Characters exists + Kontext "TabFont" + call DialogTest ( TabFont ) + + '/// Goto tab page Font Effects + Kontext + Active.SetPage TabFontEffects + '/// Check if tab page Font Effects exists + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + + '/// Goto tab page Line + Kontext + Active.SetPage TabFormatChartLine + '/// Check if tab page Line exists + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + + '/// Goto tab page Label + Kontext + Active.SetPage TabChartAxisLabel + '/// Check if tab page Label exists + Kontext "TabChartAxisLabel" + call DialogTest ( TabChartAxisLabel ) + + '/// Close dialog + TabChartAxisLabel.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument + + +endcase +' +'------------------------------------------------------------- +' +testcase tFormatDateAxis + + printlog "Load simple chart document" + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + printlog " Select chart using navigator" + call fSelectFirstOLE + printlog "Edit / Object / Edit" + EditObjectEdit + sleep(1) + printlog "Invoke Format::Axis::X Axis" + FormatAxisXAxis + printlog "Goto tab page Scale" + Kontext + Active.SetPage TabChartAxisScale + Kontext "TabChartAxisScale" + printlog " Switch axis type to Date" + AxisType.Select (3) + printlog " Verify that the date controls are available" + if MinorIntervalUnit.exists then + call DialogTest ( TabChartAxisScale,2 ) + else + warnlog "Datecontrols are not available" + end if + printlog " Close dialog" + TabChartAxisScale.Cancel + printlog "Close document" + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument + +endcase diff --git a/testautomation/chart2/required/includes/ch2_format1.inc b/testautomation/chart2/required/includes/ch2_format1.inc new file mode 100644 index 000000000000..dbe1de149c9c --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_format1.inc @@ -0,0 +1,829 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Continue Chart resource test - Menu FORMAT +'* +'************************************************************************ +'* +' #1 tFormatXAxisMainGrid +' #1 tFormatYAxisMainGrid +' #1 tFormatZAxisMainGrid +' #1 tFormatXAxisMinorGrid +' #1 tFormatYAxisMinorGrid +' #1 tFormatZAxisMinorGrid +' #1 tFormatAllAxesGrids +' #1 tFormatLegend +' #1 tFormatChartWall +' #1 tFormatChartFloor +' #1 tFormatChartArea +' #1 tFormatChartType +' #1 tFormatDataRanges +' #1 tFormat3DView +'* +'\************************************************************************ + +testcase tFormatXAxisMainGrid +'///<u><b>Dialog test after invoking Format::Grid::X Axis Main Grid</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Invoke Format::Chart Type</li> + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Change Chart type to STOCK</li> + if fSetChartType( "stock" ) > 0 then + warnlog "Something went wrong setting chart type to STOCK -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Close Chart Type dialog</li> + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Insert::Grids</li> + if fInvokeGridsDialog() > 0 then + warnlog "Something went wrong trying to invoke the Grids dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertGridsDialog" + '///+<li>Check Main Grid X Axis</li> + if fSetGrid( MainGridXAxis , TRUE ) > 0 then + warnlog "Something went wrong enabling Main Grid X Axis -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Close Grids dialog</li> + if fCloseGridsDialogOK() > 0 then + warnlog "Something went wrong trying to close the Grids dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Format::Grid::X Axis Main Grid</li> + FormatGridXAxisMainGrid + '///+<li>Check if tab-page Line exists</li> + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + '///+<li>Close dialog</li> + TabFormatChartLine.Cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +'------------------------------------------------------------- +testcase tFormatYAxisMainGrid +'///<u><b>Dialog test after invoking Format::Grid::Y Axis Main Grid</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Invoke Format::Chart Type</li> + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Change Chart type to AREA</li> + if fSetChartType( "area" ) > 0 then + warnlog "Something went wrong setting chart type to AREA -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Close Chart Type dialog</li> + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Format::Grid::Y Axis Main Grid</li> + FormatGridYAxisMainGrid + '///+<li>Check if tab-page Line exists</li> + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + '///+<li>Close dialog</li> + TabFormatChartLine.Cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +'------------------------------------------------------------- +testcase tFormatZAxisMainGrid +'///<u><b>Dialog test after invoking Format::Grid::Z Axis Main Grid</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Invoke Format::Chart Type</li> + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Change Chart type to LINE</li> + if fSetChartType( "line" ) > 0 then + warnlog "Something went wrong setting chart type to LINE -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Change Chart type Variant to #4 (3D Variant)</li> + if fSetChartTypeVariant( 4 ) > 0 then + warnlog "Something went wrong selecting 4th chart type variant -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Close Chart Type dialog</li> + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Insert::Grids</li> + if fInvokeGridsDialog() > 0 then + warnlog "Something went wrong trying to invoke the Grids dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertGridsDialog" + '///+<li>Check Main Grid Z Axis</li> + if fSetGrid( MainGridZAxis , TRUE ) > 0 then + warnlog "Something went wrong enabling Main Grid X Axis -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Close Grids dialog</li> + if fCloseGridsDialogOK() > 0 then + warnlog "Something went wrong trying to close the Grids dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Format::Grid::Z Axis Main Grid</li> + FormatGridZAxisMainGrid + '///+<li>Check if tab-page Line exists</li> + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + '///+<li>Close dialog</li> + TabFormatChartLine.Cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatXAxisMinorGrid +'///<u><b>Dialog test after invoking Format::Grid::X Axis Minor Grid</b></u> + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Invoke Edit::Object::Edit to enter Inplace Mode + EditObjectEdit + sleep(1) + '/// Invoke Format::Chart Type + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Change Chart type to xy chart + if fSetChartType( "xy" ) > 0 then + warnlog "Something went wrong setting chart type to xy chart -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Chart Type dialog + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Invoke Insert::Grids + if fInvokeGridsDialog() > 0 then + warnlog "Something went wrong trying to invoke the Grids dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertGridsDialog" + '/// Check Minor Grid X Axis + if fSetGrid( MinorGridXAxis , TRUE ) > 0 then + warnlog "Something went wrong enabling Minor Grid Y Axis -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Close Grids dialog + if fCloseGridsDialogOK() > 0 then + warnlog "Something went wrong trying to close the Grids dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Invoke Format::Grid::X Axis Minor Grid + FormatGridXAxisMinorGrid + '/// Check if tab-page Line exists + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + '/// Close dialog + TabFormatChartLine.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatYAxisMinorGrid +'///<u><b>Dialog test after invoking Format::Grid::Y Axis Minor Grid</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Invoke Format::Chart Type</li> + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Change Chart type to NET</li> + if fSetChartType( "net" ) > 0 then + warnlog "Something went wrong setting chart type to NET -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Close Chart Type dialog</li> + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Insert::Grids</li> + if fInvokeGridsDialog() > 0 then + warnlog "Something went wrong trying to invoke the Grids dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertGridsDialog" + '///+<li>Check Minor Grid Y Axis</li> + if fSetGrid( MinorGridYAxis , TRUE ) > 0 then + warnlog "Something went wrong enabling Minor Grid Y Axis -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Close Grids dialog</li> + if fCloseGridsDialogOK() > 0 then + warnlog "Something went wrong trying to close the Grids dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Format::Grid::Y Axis Minor Grid</li> + FormatGridYAxisMinorGrid + '///+<li>Check if tab-page Line exists</li> + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + '///+<li>Close dialog</li> + TabFormatChartLine.Cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatAllAxesGrids +'///<u><b>Dialog test after invoking Format::Grid::All Grids</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Invoke Format::Chart Type</li> + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Change Chart type to XY</li> + if fSetChartType( "xy" ) > 0 then + warnlog "Something went wrong setting chart type to XY -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Change Chart type Variant to #4 (3D Variant)</li> + if fSetChartTypeVariant( 4 ) > 0 then + warnlog "Something went wrong selecting 4th chart type variant -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Close Chart Type dialog</li> + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Format::Grid::All Grids</li> + FormatGridAllAxisGrids + '///+<li>Check if tab-page Line exists</li> + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + '///+<li>Close dialog</li> + TabFormatChartLine.Cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +'------------------------------------------------------------- +testcase tFormatLegend + '///<u><b>Dialog test after invoking Format::Legend</b></u> + + '///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Invoke Format::Chart Type</li> + if fInvokeChartTypeDialog() > 0 then + warnlog "Something went wrong trying to invoke the Chart Types dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Change Chart type to PIE</li> + if fSetChartType( "pie" ) > 0 then + warnlog "Something went wrong setting chart type to PIE -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Close Chart Type dialog</li> + if fCloseChartTypeDialogOK() > 0 then + warnlog "Something went wrong trying to close the Chart Type dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Format::Legend</li> + FormatLegend + '///+<li>Goto tab-page Borders</li> + Kontext + active.SetPage TabFormatChartBorders + '///+<li>Check if tab-page Borders exists</li> + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + + '///+<li>Goto tab-page Area</li> + Kontext + active.SetPage TabArea + '///+<li>Check if tab-page Area exists</li> + Kontext "TabArea" + call DialogTest ( TabArea ) + + '///+<li>Goto tab-page Transparency</li> + Kontext + active.SetPage TabTransparency + '///+<li>Check if tab-page Transparency exists</li> + Kontext "TabTransparency" + call DialogTest ( TabTransparency ) + + '///+<li>Goto tab-page Characters</li> + Kontext + active.SetPage TabFont + '///+<li>Check if tab-page Characters exists</li> + Kontext "TabFont" + call DialogTest ( TabFont ) + + '///+<li>Goto tab-page Font Effects</li> + Kontext + active.SetPage TabFontEffects + '///+<li>Check if tab-page Font Effects exists</li> + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + + '///+<li>Goto tab-page Position</li> + Kontext + active.SetPage TabLegendPosition + '///+<li>Check if tab-page Alignment exists</li> + Kontext "TabLegendPosition" + call DialogTest ( TabLegendPosition ) + + if gAsianSup = true then + Kontext + Active.SetPage TabAsianTypography + Kontext "TabAsianTypography" + call DialogTest ( TabAsianTypography ) + TabAsianTypography.Cancel + else + '///+<li>Close dialog</li> + TabLegendPosition.Cancel + endif + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument + '///</ul> + +endcase +'------------------------------------------------------------- +testcase tFormatChartWall +'///<u><b>Dialog test after invoking Format::Chart Wall</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Invoke Format::Chart Wall</li> + FormatChartWall + '///+<li>Goto tab-page Borders</li> + Kontext + active.SetPage TabFormatChartBorders + '///+<li>Check if tab-page Borders exists</li> + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + + '///+<li>Goto tab-page Area</li> + Kontext + active.SetPage TabArea + '///+<li>Check if tab-page Area exists</li> + Kontext "TabArea" + call DialogTest ( TabArea ) + + '///+<li>Goto tab-page Transparency</li> + Kontext + active.SetPage TabTransparency + '///+<li>Check if tab-page Transparency exists</li> + Kontext "TabTransparency" + call DialogTest ( TabTransparency ) + + '///+<li>Close dialog</li> + TabTransparency.Cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +'------------------------------------------------------------- +testcase tFormatChartFloor +'///<u><b>Dialog test after invoking Format::Chart Floor</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Convert chart to 3D (this will enable the Chart Floor)</li> + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Format::Chart Floor</li> + FormatChartFloor + '///+<li>Goto tab-page Area</li> + Kontext + active.SetPage TabArea + '///+<li>Check if tab-page Area exists</li> + Kontext "TabArea" + call DialogTest ( TabArea ) + + '///+<li>Goto tab-page Transparency</li> + Kontext + active.SetPage TabTransparency + '///+<li>Check if tab-page Transparency exists</li> + Kontext "TabTransparency" + call DialogTest ( TabTransparency ) + + '///+<li>Goto tab-page Borders</li> + Kontext + active.SetPage TabFormatChartBorders + '///+<li>Check if tab-page Borders exists</li> + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + + '///+<li>Close dialog</li> + TabFormatChartBorders.Cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +'------------------------------------------------------------- +testcase tFormatChartArea +'///<u><b>Dialog test after invoking Format::Chart Area</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Invoke Format::Chart Area</li> + FormatChartArea + '///+<li>Goto tab-page Transparency</li> + Kontext + active.SetPage TabTransparency + '///+<li>Check if tab-page Transparency exists</li> + Kontext "TabTransparency" + call DialogTest ( TabTransparency ) + + '///+<li>Goto tab-page Borders</li> + Kontext + active.SetPage TabFormatChartBorders + '///+<li>Check if tab-page Borders exists</li> + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + + '///+<li>Goto tab-page Area</li> + Kontext + active.SetPage TabArea + '///+<li>Check if tab-page Area exists</li> + Kontext "TabArea" + call DialogTest ( TabArea ) + + '///+<li>Close dialog</li> + TabArea.Cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +'------------------------------------------------------------- +testcase tFormatChartType +'///<u><b>Dialog test after invoking Format::Chart Type</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Invoke Format::Chart Type</li> + FormatChartType + '///+<li>Check if Chart Type dialog exists</li> + Kontext "ChartType" + call DialogTest ( ChartType ) + '///+<li>Change Chart type to LINE</li> + if fSetChartType( "line" ) > 0 then + warnlog "Something went wrong setting chart type to LINE -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Smooth Lines Properties</li> + if fInvokeSmoothLineProperties() > 0 then + warnlog "Something went wrong invoking Smooth Lines Properties -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Check if the Smooth Line Properties dialog exists</li> + Kontext "SmoothLineProperties" + call DialogTest ( SmoothLineProperties ) + '///+<li>Close Smooth Lines Properties</li> + if fCloseSmoothLinePropertiesOK() > 0 then + warnlog "Something went wrong closing Smooth Lines Properties -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '///+<li>Close dialog</li> + Kontext "ChartType" + ChartType.Cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +'------------------------------------------------------------- +testcase tFormatDataRanges +'///<u><b>Dialog test after invoking Format::Data Ranges</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Invoke Format::Data Ranges</li> + FormatDataRanges + '///+<li>Goto tab-page Data Range</li> + Kontext + active.SetPage TabFormatDataRangesDataRange + '///+<li>Check if tab-page Data Range exists</li> + Kontext "TabFormatDataRangesDataRange" + call DialogTest ( TabFormatDataRangesDataRange ) + qaErrorLog "Implode dialog using range select button when feature is implemented" + + '///+<li>Goto tab-page Data Series</li> + Kontext + active.SetPage TabFormatDataRangesDataSeries + '///+<li>Check if tab-page Data Series exists</li> + Kontext "TabFormatDataRangesDataSeries" + call DialogTest ( TabFormatDataRangesDataSeries ) + MoveDown.Click + qaErrorLog "Implode dialog using range select button when feature is implemented" + + '///+<li>Close dialog</li> + TabFormatDataRangesDataSeries.Cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +'------------------------------------------------------------- +testcase tFormat3DView +'///<u><b>Dialog test after invoking Format::3D View</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(1) + '///+<li>Convert chart to 3D</li> + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke Format::3D View</li> + Format3DView + '///+<li>Goto tab-page Perspective</li> + Kontext + active.SetPage TabFormat3DViewGeometry + '///+<li>Check if tab-page Perspective exists</li> + Kontext "TabFormat3DViewGeometry" + call DialogTest ( TabFormat3DViewGeometry ) + + '///+<li>Goto tab-page Appearance</li> + Kontext + active.SetPage TabFormat3DViewAppearance + '///+<li>Check if tab-page Appearance exists</li> + Kontext "TabFormat3DViewAppearance" + call DialogTest ( TabFormat3DViewAppearance ) + + '///+<li>Goto tab-page Illumination</li> + Kontext + active.SetPage TabFormat3DViewIllumination + '///+<li>Check if tab-page Illumination exists</li> + Kontext "TabFormat3DViewIllumination" + call DialogTest ( TabFormat3DViewIllumination ) + '///+<li>Click Color select button</li> + ColorSelect.Click + '///+<li>Check if Color dialog exists</li> + Kontext "FarbeDLG" + call DialogTest ( FarbeDLG ) + '///+<li>Close dialog</li> + FarbeDLG.Cancel + Kontext "TabFormat3DViewIllumination" + + '///+<li>Click Ambient Light select button</li> + AmbientLightSelect.Click + '///+<li>Check if Color dialog exists</li> + Kontext "FarbeDLG" + call DialogTest ( FarbeDLG ) + '///+<li>Close dialog</li> + FarbeDLG.Cancel + + '///+<li>Close dialog</li> + Kontext "TabFormat3DViewIllumination" + TabFormat3DViewIllumination.Cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +'------------------------------------------------------------- +' + diff --git a/testautomation/chart2/required/includes/ch2_insert.inc b/testautomation/chart2/required/includes/ch2_insert.inc new file mode 100644 index 000000000000..79923a8198c6 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_insert.inc @@ -0,0 +1,326 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Chart resource test - Menu INSERT +'* +'************************************************************************ +'* +' #1 tInsertTitle +' #1 tInsertAxes +' #1 tInsertGrids +' #1 tInsertLegend +' #1 tInsertDataLabels +' #1 tInsertTrendLines +' #1 tInsertMeanValueLines +' #1 tInsertYErrorBars +' #1 tInsertSpecialCharacter +'* +'\************************************************************************ + +testcase tInsertTitle +'///<u><b>Dialog test after invoking Insert::Title</b></u> + '/// Load simple chart document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Invoke Edit::Object::Edit to enter Inplace Mode + EditObjectEdit + '/// Convert chart to 3D (this will enable all controls in Titles dialog) + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + '/// Invoke Insert::Titles + if fInvokeTitlesDialog() > 0 then + warnlog "Something went wrong trying to invoke Titles dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Check existence of dialog + Kontext "InsertTitleDialog" + Call DialogTest ( InsertTitleDialog ) + '/// Quit dialog using Cancel button + InsertTitleDialog.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertAxes +'///<u><b>Dialog test after invocation of Insert::Axes</b></u> + '/// Load simple test document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Invoke Edit::Object::Edit to enter Inplace Mode + EditObjectEdit + '/// Invoke Insert::Axes + if fInvokeAxesDialog() > 0 then + warnlog "Something went wrong trying to invoke Axes dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Check existence of dialog + Kontext "InsertAxesDialog" + Call DialogTest ( InsertAxesDialog ) + '/// Quit dialog using Cancel button + InsertAxesDialog.Cancel + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertGrids +'///<u><b>Dialog test after invocation of Insert::Grids</b></u> + '/// Load simple test document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Invoke Edit::Object::Edit to enter Inplace Mode + EditObjectEdit + '/// Invoke Insert::Grids + if fInvokeGridsDialog() > 0 then + warnlog "Something went wrong trying to invoke Grids dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Check existence of dialog + Kontext "InsertGridsDialog" + Call DialogTest ( InsertGridsDialog ) + '/// Quit dialog using Cancel button + InsertGridsDialog.Cancel + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertLegend +'///<u><b>Dialog test after invocation of Insert::Legend</b></u> + '/// Load simple test document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Invoke Edit::Object::Edit to enter Inplace Mode + EditObjectEdit + '/// Invoke Insert::Legend + if fInvokeLegendDialog() > 0 then + warnlog "Something went wrong trying to invoke Legend dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + '/// Check existence of dialog + Kontext "InsertLegendDialog" + Call DialogTest ( InsertLegendDialog ) + '/// Quit dialog using Cancel button + InsertLegendDialog.Cancel + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertDataLabels +'///<u><b>Dialog test after invocation of Insert::Data Labels</b></u> + '/// Load simple test document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Invoke Edit::Object::Edit to enter Inplace Mode + EditObjectEdit + '/// Invoke Insert::Data Labels + if fInvokeDataLabelsDialog() > 0 then + warnlog "Something went wrong trying to invoke Labels dialog -> Check this out!" + Call hCloseDocument + goto endsub + endif + '/// Check 'Show Value' to enable all controls + Kontext "InsertLabelsDialog" + if fSetShowValue ( TRUE ) > 0 then + warnlog "Something went wrong trying to check 'Show Value' -> Check this out!" + endif + '/// Check existence of dialog + Call DialogTest ( InsertLabelsDialog ) + '/// Quit dialog using Cancel button + InsertLabelsDialog.Cancel + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertTrendLines +'///<u><b>Dialog test after invocation of Insert::TrendLines</b></u> + '/// Load simple test document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Invoke Edit::Object::Edit to enter Inplace Mode + EditObjectEdit + Kontext "DocumentChart" + printlog "Insert TrendLines" + InsertTrendlines + '/// Check existence of dialog + Kontext "InsertTrendlinesDialog" + Call DialogTest ( InsertTrendlinesDialog ) + '/// Quit dialog using Cancel button + InsertTrendlinesDialog.Cancel + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertMeanValueLines +'///<u><b>Testing Insert::MeanValueLines</b></u> + '/// Load simple test document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Invoke Edit::Object::Edit to enter Inplace Mode + EditObjectEdit + '/// Insert::MeanValueLines + if fInsertMeanValueLines() > 0 then + warnlog "Something went wrong trying to insert mean value lines -> Check this out!" + Call hCloseDocument + goto endsub + endif + Kontext "DocumentChart" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertYErrorBars +'///<u><b>Dialog test after invocation of Insert::YErrorBars</b></u> + '/// Load simple test document + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using navigator + call fSelectFirstOLE + '/// Invoke Edit::Object::Edit to enter Inplace Mode + EditObjectEdit + '/// Invoke Insert::TrendLines + if fInvokeInsertYErrorBarsDialog() > 0 then + warnlog "Something went wrong trying to invoke YErrorBars Lines dialog -> Check this out!" + Call hCloseDocument + goto endsub + endif + '/// Check existence of dialog + Kontext "InsertYErrorBarsDLG" + Call DialogTest ( InsertYErrorBarsDLG ) + '/// Quit dialog using Cancel button + InsertYErrorBarsDLG.Cancel + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------- +' +testcase tInsertSpecialCharacter + printlog "Load simple chart document" + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + printlog "Select chart using navigator" + call fSelectFirstOLE + printlog "Invoke Edit::Object::Edit to enter Inplace Mode" + EditObjectEdit + printlog "Invoke Insert::Titles" + if fInvokeTitlesDialog() > 0 then + warnlog "Something went wrong trying to invoke Titles dialog -> Check this out! (Previous log may help you)" + Call hCloseDocument + goto endsub + endif + Kontext "InsertTitleDialog" + if fSetTitle(MainTitle , "Test title") = 0 then + Kontext "InsertTitleDialog" + InsertTitleDialog.OK + Kontext "DocumentChart" + printlog "Type <TAB> to select the title" + DocumentChart.TypeKeys "<TAB>" , TRUE + DocumentChart.UseMenu + printlog "Select menu 'Insert'" + hMenuSelectNr(4) 'INSERT + printlog "Select menu item 'Special Character'." + hMenuSelectNr(9) 'SPECIAL CHARACTER + printlog "Close the 'Insert Special Character'-dialog." + Kontext "Sonderzeichen" + Call Dialogtest( Sonderzeichen ) + Sonderzeichen.CANCEL + else + warnlog "It was not possible to set the title. Test aborted!" + Kontext "InsertTitleDialog" + InsertTitleDialog.Cancel + endif + Call hCloseDocument +endcase + diff --git a/testautomation/chart2/required/includes/ch2_insert_ctl.inc b/testautomation/chart2/required/includes/ch2_insert_ctl.inc new file mode 100644 index 000000000000..d01f9f8eee5f --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_insert_ctl.inc @@ -0,0 +1,488 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Chart resource test - CTL features +'* +'************************************************************************ +'* +' #1 tTitleTextDirection +' #1 tLegendTextDirection +' #1 tXAxisTextDirection +' #1 tDataSeriesTextDirection +' #1 tEquationTextDirection +' #1 tDataPointTextDirection +' #0 sValidateTextDirection +'* +'\************************************************************************ + +testcase tTitleTextDirection + Dim bCTLSupBefore as boolean + + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + else + printlog "Load test document and save it local as ../user/work/verySimpleChart.ods" + endif + printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support" + bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE) + printlog "Select the first OLE object in the document." + call fSelectFirstOLE + printlog "Edit / Object / Edit" + EditObjectEdit + Kontext "DocumentChart" + printlog "Select the Main Title by using the ChartElememtSelectorListBox in the toolbar (4th entry)" + call fChartSelectElement (4) + printlog "Open the properties dialog by using the FormatSelection button in the toolbar" + FormatSelection.Click + Kontext + printlog "Select the tab page Alignment" + Active.SetPage TabFormatChartTitleAlignment + Kontext "TabFormatChartTitleAlignment" + call DialogTest(TabFormatChartTitleAlignment) + sValidateTextDirection(TextDirection) + TabFormatChartTitleAlignment.Cancel + printlog "Leave the tab page dialog with Cancel" + if bCTLSupBefore <> gCTLSup then + Call ActiveDeactivateCTLSupport(bCTLSupBefore) + printlog "Reset the state of CTL support to the default before this test case has been executed" + endif + printlog "File / Close" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tLegendTextDirection + Dim bCTLSupBefore as boolean + + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + else + printlog "Load test document and save it local as ../user/work/verySimpleChart.ods" + endif + printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support" + bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE) + call fSelectFirstOLE + printlog "Select the first OLE object" + EditObjectEdit + printlog "Edit / Object Edit" + printlog "Format / Legend" + FormatLegend + Kontext + printlog "Select the tab page Position" + Active.SetPage TabLegendPosition + Kontext "TabLegendPosition" + call DialogTest(TabLegendPosition) + sValidateTextDirection(TextDirection) + TabLegendPosition.Cancel + if bCTLSupBefore <> gCTLSup then + Call ActiveDeactivateCTLSupport(bCTLSupBefore) + printlog "Reset the state of CTL support to the default before this test case has been executed" + endif + printlog "File / Close" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tXAxisTextDirection + Dim bCTLSupBefore as boolean + + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + else + printlog "Load test document and save it local as ../user/work/verySimpleChart.ods" + endif + printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support" + bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE) + printlog "Select the first OLE object" + call fSelectFirstOLE + printlog "Edit / Object Edit" + EditObjectEdit + printlog "Format / Axis / X Axis" + FormatAxisXAxis + Kontext + printlog "Select the tab page Label" + Active.SetPage TabChartAxisLabel + Kontext "TabChartAxisLabel" + call DialogTest(TabChartAxisLabel) + sValidateTextDirection(TextDirection) + TabChartAxisLabel.Cancel + printlog "Leave the tab dialog with Cancel" + if bCTLSupBefore <> gCTLSup then + Call ActiveDeactivateCTLSupport(bCTLSupBefore) + printlog "Reset the state of CTL support to the default before this test case has been executed" + endif + printlog "File / Close" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tDataSeriesTextDirection + Dim bCTLSupBefore as boolean + Dim oControlToCheck as object + Dim oControlToCheck2 as object + Dim oControlToCheck3 as object + Dim iCombination as integer + Dim sText as string + + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + else + printlog "Load test document and save it local as ../user/work/verySimpleChart.ods" + endif + printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support" + bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE) + call fSelectFirstOLE + printlog "Select the first OLE object" + printlog "Edit / Object Edit" + EditObjectEdit + printlog "Select DataSeries A by toolbar selectorbox" + call fChartSelectElement (8) + printlog "Insert DataLabels" + Kontext "DocumentChart" + InsertDataLabels + Kontext + Active.Setpage TabDataSeriesLabels + Kontext "TabDataSeriesLabels" + for iCombination = 1 to 7 + select case iCombination + 'Check-box combinations with 1, 2 or 3 enabled check-boxes. + case 1 : oControlToCheck = ShowValue + sText = "Show value as number" + case 2 : oControlToCheck = AsPercentage + sText = "Show value as percentage" + case 3 : oControlToCheck = ShowLabelText + sText = "Show category" + + case 4 : oControlToCheck = ShowValue + oControlToCheck2 = AsPercentage + sText = "Show value as number and Show value as percentage" + case 5 : oControlToCheck = ShowValue + oControlToCheck2 = ShowLabelText + sText = "Show value as number Show category" + case 6 : oControlToCheck2 = AsPercentage + oControlToCheck2 = ShowLabelText + sText = "Show value as percentage and Show category" + + case 7 : oControlToCheck = ShowValue + oControlToCheck2 = AsPercentage + oControlToCheck3 = ShowLabelText + sText = "Show value as number and Show value as percentage and Show category" + + case else : warnlog "Wrong combination entered. Exiting!" + TabDataSeriesLabels.Cancel + call hCloseDocument + goto endsub + end select + 'One checked check-box + if iCombination > 0 AND iCombination < 4 then + if fSetCheckBox(oControlToCheck, TRUE) > 0 then + warnlog "Setting check-box '" & sText & "' failed. Exiting test case" + TabDataSeriesLabels.Cancel + call hCloseDocument + goto endsub + else + printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries." + sValidateTextDirection(TextDirection) + endif + endif + 'Two checked check-boxes + if iCombination > 3 AND iCombination < 7 then + if fSetCheckBox(oControlToCheck, TRUE) > 0 AND fSetCheckBox(oControlToCheck2, TRUE) > 0 then + warnlog "Setting check-box '" & sText & "' failed. Exiting test case" + TabDataSeriesLabels.Cancel + call hCloseDocument + goto endsub + else + printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries." + sValidateTextDirection(TextDirection) + endif + if fSetCheckBox(oControlToCheck2, FALSE) > 0 then + warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case" + TabDataSeriesLabels.Cancel + call hCloseDocument + goto endsub + endif + endif + 'Three checked check-boxes + if iCombination = 7 then + if fSetCheckBox(oControlToCheck, TRUE) > 0 AND fSetCheckBox(oControlToCheck2, TRUE) > 0 AND fSetCheckBox(oControlToCheck3, TRUE) > 0 then + warnlog "Setting check-box '" & sText & "' failed. Exiting test case" + TabDataSeriesLabels.Cancel + call hCloseDocument + goto endsub + else + printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries." + sValidateTextDirection(TextDirection) + endif + if fSetCheckBox(oControlToCheck2, FALSE) > 0 then + warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case" + TabDataSeriesLabels.Cancel + call hCloseDocument + goto endsub + endif + if fSetCheckBox(oControlToCheck3, FALSE) > 0 then + warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case" + TabDataSeriesLabels.Cancel + call hCloseDocument + goto endsub + endif + end if + if fSetCheckBox(oControlToCheck, FALSE) > 0 then + warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case" + TabDataSeriesLabels.Cancel + call hCloseDocument + goto endsub + endif + next iCombination + TabDataSeriesLabels.Cancel + if bCTLSupBefore <> gCTLSup then + Call ActiveDeactivateCTLSupport(bCTLSupBefore) + printlog "Reset the state of CTL support to the default before this test case has been executed" + endif + printlog "File / Close" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tEquationTextDirection + Dim bCTLSupBefore as boolean + + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + else + printlog "Load test document and save it local as ../user/work/verySimpleChart.ods" + endif + printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support" + bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE) + printlog "Select the first OLE object" + call fSelectFirstOLE + printlog "Edit / Object Edit" + EditObjectEdit + printlog "Select DataSeries A by toolbar selectorbox" + call fChartSelectElement (8) + Kontext "DocumentChart" + if fInvokeTrendLinesDialog() > 0 then + warnlog "Something went wrong trying to invoke Trend Lines dialog -> Check this out!" + Call hCloseDocument + goto endsub + endif + Kontext "TabTrendLineType" + Call DialogTest(TabTrendLineType) + printlog "Select Linear radio-button" + Linear.Check + printlog "Check Show Equation check-box" + ShowEquation.Check + printlog "Leave the dialog with OK" + TabTrendLineType.OK + Kontext "DocumentChart" + printlog "Select Equation by toolbar selectorbox" + call fChartSelectElement (10) + printlog "Format / Object properties" + FormatSelection.Click + Kontext + printlog "Count the numbers of tab pages. It should be 7 in CTL mode." + if Active.GetPageCount <> 7 then + warnlog "The count of tab pages is not 7, it is " & Active.GetPageCount & "!" + endif + printlog "Select the Alignment tab page (only available in CTL mode!)" + Active.SetPage TabFormatChartTitleAlignment + Kontext "TabFormatChartTitleAlignment" + Call DialogTest(TabFormatChartTitleAlignment) + printlog "Check that the text direction list-box contains 3 entries." + sValidateTextDirection(TextDirection2) + printlog "Leave the dialog with cancel" + TabFormatChartTitleAlignment.Cancel + if bCTLSupBefore <> gCTLSup then + Call ActiveDeactivateCTLSupport(bCTLSupBefore) + printlog "Reset the state of CTL support to the default before this test case has been executed" + endif + printlog "File / Close" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tDataPointTextDirection + Dim bCTLSupBefore as boolean + Dim oControlToCheck as object + Dim oControlToCheck2 as object + Dim oControlToCheck3 as object + Dim iCombination as integer + Dim sText as string + + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + else + printlog "Load test document and save it local as ../user/work/verySimpleChart.ods" + endif + printlog "Enable the complex text layout (CTL) support under Tools / Options / Language Settings / Languages / Enhanced language support" + bCTLSupBefore = ActiveDeactivateCTLSupport(TRUE) + call fSelectFirstOLE + printlog "Select the first OLE object" + EditObjectEdit + printlog "Edit / Object Edit" + printlog "Select DataSeries A by toolbar selectorbox" + call fChartSelectElement (8) + Kontext "DocumentChart" + printlog "Press F3-key to enter the data series." + DocumentChart.TypeKeys "<F3>" + printlog "Insert / DataLabels" + InsertDataLabels + Kontext + Active.Setpage TabDataPointLabels + Kontext "TabDataPointLabels" + for iCombination = 1 to 7 + select case iCombination + 'Check-box combinations with 1, 2 or 3 enabled check-boxes. + case 1 : oControlToCheck = ShowValue + sText = "Show value as number" + case 2 : oControlToCheck = AsPercentage + sText = "Show value as percentage" + case 3 : oControlToCheck = ShowLabelText + sText = "Show category" + + case 4 : oControlToCheck = ShowValue + oControlToCheck2 = AsPercentage + sText = "Show value as number and Show value as percentage" + case 5 : oControlToCheck = ShowValue + oControlToCheck2 = ShowLabelText + sText = "Show value as number Show category" + case 6 : oControlToCheck2 = AsPercentage + oControlToCheck2 = ShowLabelText + sText = "Show value as percentage and Show category" + + case 7 : oControlToCheck = ShowValue + oControlToCheck2 = AsPercentage + oControlToCheck3 = ShowLabelText + sText = "Show value as number and Show value as percentage and Show category" + + case else : warnlog "Wrong combination entered. Exiting!" + TabDataPointLabels.Cancel + call hCloseDocument + goto endsub + end select + 'One checked check-box + if iCombination > 0 AND iCombination < 4 then + if fSetCheckBox(oControlToCheck, TRUE) > 0 then + warnlog "Setting check-box '" & sText & "' failed. Exiting test case" + TabDataPointLabels.Cancel + call hCloseDocument + goto endsub + else + printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries." + sValidateTextDirection(TextDirection) + endif + endif + 'Two checked check-boxes + if iCombination > 3 AND iCombination < 7 then + if fSetCheckBox(oControlToCheck, TRUE) > 0 AND fSetCheckBox(oControlToCheck2, TRUE) > 0 then + warnlog "Setting check-box '" & sText & "' failed. Exiting test case" + TabDataPointLabels.Cancel + call hCloseDocument + goto endsub + else + printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries." + sValidateTextDirection(TextDirection) + endif + if fSetCheckBox(oControlToCheck2, FALSE) > 0 then + warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case" + TabDataPointLabels.Cancel + call hCloseDocument + goto endsub + endif + endif + 'Three checked check-boxes + if iCombination = 7 then + if fSetCheckBox(oControlToCheck, TRUE) > 0 AND fSetCheckBox(oControlToCheck2, TRUE) > 0 AND fSetCheckBox(oControlToCheck3, TRUE) > 0 then + warnlog "Setting check-box '" & sText & "' failed. Exiting test case" + TabDataPointLabels.Cancel + call hCloseDocument + goto endsub + else + printlog "Check '" & sText & "' and check that text direction-list-box contains 3 entries." + sValidateTextDirection(TextDirection) + endif + if fSetCheckBox(oControlToCheck2, FALSE) > 0 then + warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case" + TabDataPointLabels.Cancel + call hCloseDocument + goto endsub + endif + if fSetCheckBox(oControlToCheck3, FALSE) > 0 then + warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case" + TabDataPointLabels.Cancel + call hCloseDocument + goto endsub + endif + end if + if fSetCheckBox(oControlToCheck, FALSE) > 0 then + warnlog "Unchecking check-box '" & sText & "' failed. Exiting test case" + TabDataPointLabels.Cancel + call hCloseDocument + goto endsub + endif + next iCombination + TabDataPointLabels.Cancel + if bCTLSupBefore <> gCTLSup then + Call ActiveDeactivateCTLSupport(bCTLSupBefore) + printlog "Reset the state of CTL support to the default before this test case has been executed" + endif + printlog "File / Close" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +sub sValidateTextDirection (oThisListtBox as OBJECT) + Dim iEntries as integer + iEntries = 0 + + if oThisListtBox.IsEnabled then + printlog "Get the count of the list-box entries." + iEntries = oThisListtBox.GetItemCount + if iEntries <> 3 then + warnlog "There are " & iEntries &" and not 3 entries in the text direction list-box!" + else + printlog "3 entries in the text direction list-box" + endif + else + warnlog "Text direction is not enabled!" + endif +end sub + diff --git a/testautomation/chart2/required/includes/ch2_menu.inc b/testautomation/chart2/required/includes/ch2_menu.inc new file mode 100644 index 000000000000..d7f5efbee3a5 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_menu.inc @@ -0,0 +1,214 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Resource Test for chart2 main menus +'* +'************************************************************************************************** +'* +' #1 tMainMenu 'Checking the count of menu entries in each menu +'* +'\************************************************************************************************* + +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 + + dim iToolsMenuItemCount as integer + iToolsMenuItemCount = 4 : if ( gPlatform = "osx" ) then iToolsMenuItemCount = 3 + 'Options entry is called Preferences and resides in application MacOS X menu + + printlog "Close all document windows (File / Close)" + Do Until GetDocumentCount = 0 + Call hCloseDocument + Loop + printlog "File / New / Spreadsheet" + call hNewDocument + + printlog "insert a Chart Object" + if fInsertOLE = FALSE then + warnlog "It was not possible to insert a chart as OLE." + Call hCloseDocument + else + Kontext "DocumentCalc" + DocumentCalc.UseMenu + printlog "check if there are 21 items in the FILE menu." + hMenuSelectNr(1) ' FILE + iCount = hMenuItemGetCount() + 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 + + printlog "check if there are 12 items in the FILE/NEW menu." + DocumentCalc.UseMenu + hMenuSelectNr(1) ' FILE + hMenuSelectNr(1) ' NEW + iCount = hMenuItemGetCount() + if (iCount <> 12) then + warnlog "There should 12 items in the FILE/NEW menu but there are " + iCount + " items." + end if + call hMenuClose() ' close the FILE menu + + printlog "check if there are 8 items in the FILE/AUTOPILOT menu." + DocumentCalc.UseMenu + hMenuSelectNr(1) ' FILE + hMenuSelectNr(4) ' AUTOPILOT + iCount = hMenuItemGetCount() + if (iCount <> 8) then + warnlog "There should 8 items in the FILE/AUTOPILOTS menu but there are " + iCount + " items." + end if + call hMenuClose() + + printlog "check if there are 5 items in the EDIT menu." + DocumentCalc.UseMenu + hMenuSelectNr(2) + iCount = hMenuItemGetCount() + if (iCount <> 5) then + warnlog "There should 5 items in the edit menu but there are " + iCount + " items." + end if + call hMenuClose() + + printlog "check if there are 4 items in the VIEW menu." + DocumentCalc.UseMenu + hMenuSelectNr(3) + iCount = hMenuItemGetCount() + if (iCount <> 4) then + warnlog "There should 4 items in the view menu but there are " + iCount + " items." + end if + call hMenuClose() + + printlog "check if there are 5 items in the VIEW/TOOLBAR menu." + DocumentCalc.UseMenu + hMenuSelectNr(3) ' VIEW + hMenuSelectNr(1) ' TOOLBAR + iCount = hMenuItemGetCount() + if (iCount <> 5) then + warnlog "There should 5 items in the VIEW/TOOLBAR menu but there are " + iCount + " items." + end if + call hMenuClose() + + printlog "check if there are 9 items in the INSERT menu." + DocumentCalc.UseMenu + hMenuSelectNr(4) 'INSERT + iCount = hMenuItemGetCount() + if (iCount <> 9) then + warnlog "There should 9 items in the INSERT menu but there are " + iCount + " items." + end if + call hMenuClose() + + printlog "check if there are 13 items in the FORMAT menu." + DocumentCalc.UseMenu + hMenuSelectNr(5) ' FORMAT + iCount = hMenuItemGetCount() + if (iCount <> 13) then + warnlog "There should 13 items in the FORMAT menu but there are " + iCount + " items." + end if + + printlog "check if there are 2 items in the FORMAT/ARRANGEMENT menu." + DocumentCalc.UseMenu + hMenuSelectNr(5) ' FORMAT + hMenuSelectNr(3) ' ARRANGEMENT + iCount = hMenuItemGetCount() + if (iCount <> 2) then + warnlog "There should 2 items in the FORMAT/ARRANGEMENT menu but there are " + iCount + " items." + end if + + printlog "check if there are 6 items in the FORMAT/AXIS menu." + DocumentCalc.UseMenu + hMenuSelectNr(5) ' FORMAT + hMenuSelectNr(6) ' AXIS + iCount = hMenuItemGetCount() + if (iCount <> 6) then + warnlog "There should 6 items in the FORMAT/AXIS menu but there are " + iCount + " items." + end if + + printlog "check if there are 7 items in the FORMAT/GRID menu." + DocumentCalc.UseMenu + hMenuSelectNr(5) ' FORMAT + hMenuSelectNr(7) ' GRID + iCount = hMenuItemGetCount() + if (iCount <> 7) then + warnlog "There should 7 items in the FORMAT/GRID menu but there are " + iCount + " items." + end if + + printlog "check if there are 6 items in the FORMAT/Title menu." + DocumentCalc.UseMenu + hMenuSelectNr(5) ' FORMAT + hMenuSelectNr(4) ' TITLE + iCount = hMenuItemGetCount() + if (iCount <> 8) then + warnlog "There should 8 items in the FORMAT/Title menu but there are " + iCount + " items." + end if + + printlog "check if there are " + iToolsMenuItemCount + " items in the TOOLS menu." + DocumentCalc.UseMenu + hMenuSelectNr(6) + iCount = hMenuItemGetCount() + if (iCount <> iToolsMenuItemCount) then + warnlog "There should " + iToolsMenuItemCount + " items in the tools menu but there are " + iCount + " items." + end if + call hMenuClose() + + printlog "check if there are 4 items in the TOOLS/MACRO menu." + DocumentCalc.UseMenu + hMenuSelectNr(6) + hMenuSelectNr(1) + iCount = hMenuItemGetCount() + if (iCount <> 4) then + warnlog "There should 4 items in the TOOLS/MACRO menu but there are " + iCount + " items." + end if + call hMenuClose() + + printlog "check if there are 5 items in the WINDOW menu." + DocumentCalc.UseMenu + hMenuSelectNr(7) + iCount = hMenuItemGetCount() + if (iCount <> 5) then + warnlog "There should 5 items in the WINDOW menu but there are " + iCount + " items." + end if + call hMenuClose() + + printlog "check if there are 5 or 6 items in the HELP menu. Depends on if it's a patched version" + DocumentCalc.UseMenu + hMenuSelectNr(8) + iCount = hMenuItemGetCount() + 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() + call hCloseDocument + end if +endcase + + diff --git a/testautomation/chart2/required/includes/ch2_ole.inc b/testautomation/chart2/required/includes/ch2_ole.inc new file mode 100644 index 000000000000..6daf6545de41 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_ole.inc @@ -0,0 +1,137 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Chart resource test - section FILE +'* +'************************************************************************ +'* +' #1 tChartOLE +'* +'\************************************************************************ + +testcase tChartOLE ( sCurrentApplication as STRING ) +'///<u><b>Chart as OLE in all applicable applications</b></u> + dim sOutputFile as STRING + dim bCommitDialog as boolean + dim bStatusOfAgent as boolean + + bStatusOfAgent = FALSE + + select case sCurrentApplication + case ("CALC") : bCommitDialog = TRUE + case else : bCommitDialog = FALSE + end select + printlog("Chart as OLE in " & sCurrentApplication) + gApplication = sCurrentApplication + + '/// Open new document + Call hNewDocument + '/// Disabling the Help Agent if enabled. + ToolsOptions + hToolsOptions ( "StarOffice", "General" ) + Kontext "TabSonstigesAllgemein" + if Aktivieren.IsChecked then + bStatusOfAgent = TRUE + printlog "HelpAgent was enabled. Disabling" + Aktivieren.Uncheck + else + printlog "HelpAgent wasn't enabled." + end if + Kontext "ToolsOptionsDlg" + ToolsOptionsDlg.OK + '/// Insert default chart + InsertChart + sleep(2) + if bCommitDialog then + Kontext "ChartWizard" + ChartWizard.OK + sleep(2) + endif + '/// Save file + select case ucase(sCurrentApplication) + case ("CALC") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".ods" ) + case ("IMPRESS") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".odp" ) + case ("DRAW") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".odg" ) + case ("WRITER") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".odt" ) + case ("MASTERDOCUMENT") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".odm" ) + case ("HTML") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".html" ) + case else : warnlog "The modul " & sCurrentApplication & " is not supported in this test case!" + Call hCloseDocument + goto endsub + end select + if hFileSaveAsKill(sOutputFile) then + printlog "OK, successfully saved the test document!" + else + warnlog "Saving the test document failed!" + endif + sleep(2) + '/// Leave implace mode in Spreadsheet, Draw and Impress ... + '/// ... and then select Chart OLE (Green handles) + select case ucase(sCurrentApplication) + case ("CALC") : Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call fSelectFirstOLE + case ("IMPRESS") : call gMouseclick (99,99) + call gMouseclick (50,50) + case ("DRAW") : call gMouseclick (99,99) + call gMouseclick (50,50) + case ("WRITER") : call gMouseclick (99,99) + call gMouseclick (50,50) + Call fSelectFirstOLE + case ("MASTERDOCUMENT") : call gMouseclick (99,99) + case ("HTML") : call gMouseclick (99,99) + call gMouseclick (50,50) + Call fSelectFirstOLE + case else : warnlog "The modul " & sCurrentApplication & " is not supported in this test case!" + Call hCloseDocument + goto endsub + end select + '/// Try if Edit::Object:Edit works for chart OLE + try + EditObjectEdit + sleep(2) + printlog "Edit::Object::Edit seems to work" + catch + warnlog "Edit::Object::Edit seems to fail." + endcatch + + if bStatusOfAgent then + '/// Enabling the HelpAgent if it was enabled at the beginning. + ToolsOptions + hToolsOptions ( "StarOffice", "General" ) + Kontext "TabSonstigesAllgemein" + Aktivieren.Check + Kontext "ToolsOptionsDlg" + ToolsOptionsDlg.OK + end if + '/// Close document + Call hCloseDocument + gApplication = "CALC" +endcase + diff --git a/testautomation/chart2/required/includes/ch2_toolbars.inc b/testautomation/chart2/required/includes/ch2_toolbars.inc new file mode 100644 index 000000000000..32eed54ee370 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_toolbars.inc @@ -0,0 +1,168 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Chart resource test - section toolbars +'* +'************************************************************************ +'* +' #1 tDrawBar +'* +'\************************************************************************ + +testcase tDrawBar + + printlog " Load simple chart document" + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + printlog " Select chart using navigator" + call fSelectFirstOLE + printlog " Invoke Edit::Object::Edit to enter Inplace Mode" + EditObjectEdit + printlog " Verify that the drawbar is visible" + Kontext "DrawBar" + + qaerrorlog "#i107003# disabled because of bug in toolbars" +' if Not DrawBar.Exists then +' Call hToolbarSelect("Drawing", true) +' endif + + printlog " Check if all items on drawbar are available" + if DrawBar.GetItemCount <> 16 then + warnlog "There are " & DrawBar.GetItemCount & " instead of 16 items on drawbar" + endif + printlog " Click on every button on the Drawingbar" + Auswahl.click + Linie.click + LineArrowEnd.click + Rechteck.click + Ellipse.click + Freihand.click + Textobjekt.click + Legende.click + BasicShapes.click + SymbolShapes.click + BlockArrows.click + Flowcharts.click + Callouts.click + Stars.click + printlog " Open menubutton BasicShapes" + BasicShapes.TearOff + Kontext "BasicShapes" + printlog " Check that there are 25 BasicShapes" + if BasicShapes.GetItemCount <> 25 then + warnlog "There are " & BasicShapes.GetItemCount & " instead of 25 BasicShapes" + endif + BasicShapes.close + Kontext "DrawBar" + printlog " Open menubutton SymbolShapes" + SymbolShapes.TearOff + Kontext "SymbolShapes" + printlog " Check that there are 20 SymbolShapes" + if SymbolShapes.GetItemCount <> 20 then + warnlog "There are " & SymbolShapes.GetItemCount & " instead of 25 SymbolShapes" + endif + SymbolShapes.close + Kontext "DrawBar" + printlog " Open menubutton BlockArrows" + BlockArrows.TearOff + Kontext "ArrowShapes" + printlog " Check that there are 30 ArrowShapes" + if ArrowShapes.GetItemCount <> 30 then + warnlog "There are " & ArrowShapes.GetItemCount & " instead of 25 ArrowShapes" + endif + ArrowShapes.close + Kontext "DrawBar" + printlog " Open menubutton Flowcharts" + Flowcharts.TearOff + Kontext "Flowchart" + printlog " Check that there are 32 FlowChartShapes" + if Flowchart.GetItemCount <> 32 then + warnlog "There are " & Flowchart.GetItemCount & " instead of 32 Flowchartshapes" + endif + Flowchart.close + Kontext "DrawBar" + printlog " Open menubutton Callouts" + Callouts.TearOff + Kontext "Callouts" + printlog " Check that there are 7 Callouts" + if Callouts.GetItemCount <> 7 then + warnlog "There are " & Callouts.GetItemCount & " instead of 7 Callouts" + endif + Callouts.close + Kontext "DrawBar" + printlog " Open menubutton Stars" + Stars.TearOff + Kontext "Starshapes" + printlog " Check that there are 13 StarShapes" + if Starshapes.GetItemCount <> 13 then + warnlog "There are " & Starshapes.GetItemCount & " instead of 13 StarShapes" + endif + Starshapes.close + printlog " Insert a shape to the chart by <STRG-RETURN>" + Kontext "DrawBar" + sleep (1) + DrawBar.typekeys "<TAB>",TRUE + DrawBar.typekeys "<TAB>",TRUE + DrawBar.typekeys "<TAB>",TRUE + DrawBar.typekeys "<TAB>",TRUE + DrawBar.typekeys "<MOD1 RETURN>",TRUE + printlog " Rename inserted shape" + Kontext "DocumentChart" + DocumentChart.OpenContextMenu + sleep (1) + hMenuSelectNr (6) + sleep (1) + Kontext "NameDlgObject" + NameField.SetText "ChartShape1" + NameDlgObject.OK + printlog " Leave Chart" + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + printlog "Select chart using navigator" + call fSelectFirstOLE + printlog "Invoke Edit::Object::Edit to enter Inplace Mode" + EditObjectEdit + printlog " Check if shape is still there" + Kontext "DocumentChart" + DocumentChart.typekeys "<SHIFT TAB>",TRUE + Sleep (1) + Kontext "Toolbar" + if ChartElementSelector.GetSelText <> "ChartShape1" then + warnlog "Something is wrong with the shape" + endif + printlog " Leave Chart" + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + printlog " Close document" + Call hCloseDocument + +endcase + diff --git a/testautomation/chart2/required/includes/ch2_view.inc b/testautomation/chart2/required/includes/ch2_view.inc new file mode 100644 index 000000000000..39beac14839c --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_view.inc @@ -0,0 +1,182 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Chart resource test - Menu VIEW +'* +'************************************************************************ +'* +' #1 tViewToolbars +' #1 tViewToolbarsCustomize +' #1 tViewFullScreen +'* +'\************************************************************************ + +testcase tViewToolbars + '///<u><b>Check invocation of View::Toolbars::*</b></u> + '/// Load simple chart document and save it in user's work dorectory + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '/// Select chart using the navigator + call fSelectFirstOLE + '/// Edit / Object / Edit + EditObjectEdit + '/// Convert chart to 3D + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + else + printlog "Converting chart into 3D was successful." + endif + Kontext "Standardbar" + if Standardbar.Exists then + '/// View / Toolbars / Standard + ViewToolbarsStandard + Kontext "Standardbar" + '/// Verifying that the toolbar 'Standard' is disabled + if Standardbar.Exists then + QAErrorLog "#i72537 - Disabling 'Standard' toolbar does not work." + Call hCloseDocument + goto endsub + else + '/// Enabling the toolbar again + ViewToolbarsStandard + end if + else + warnlog "'Standard' toolbar was not visible by default as expected!" + end if + Kontext "Toolbar" + if Toolbar.Exists then + '/// View / Toolbars / Formatting + ViewToolbarsTools + Kontext "Toolbar" + '/// Verifying that the toolbar 'Formatting' is disabled + if Toolbar.Exists then + QAErrorLog "#i72537 - Disabling 'Formatting' toolbar does not work." + Call hCloseDocument + goto endsub + else + '/// Enabling the toolbar again + ViewToolbarsTools + end if + else + warnlog "'Standard' toolbar was not visible by default as expected!" + end if + '/// Close document + Call hCloseDocument +endcase + +'------------------------------------------------------------- + +testcase tViewToolbarsCustomize +'///<u><b>Check Dialog after invocation of View::Toolbars::Customize</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + '///+<li>Invoke View::Toolbars::Customize</li> + ViewToolbarsCustomize + '///+<li>Change to Menus tab-page</li> + Kontext + Active.SetPage TabCustomizeMenu + '///+<li>Check existence of dialog</li> + Call DialogTest ( TabCustomizeMenu ) + '///+<li>Change to Keyboard tab-page</li> + Kontext + Active.SetPage TabTastatur + '///+<li>Check existence of dialog</li> + Call DialogTest ( TabTastatur ) + '///+<li>Change to Toolbars tab-page</li> + Kontext + Active.SetPage TabCustomizeToolbars + '///+<li>Check existence of dialog</li> + Call DialogTest ( TabCustomizeToolbars ) + '///+<li>Change to Events tab-page</li> + Kontext + Active.SetPage TabCustomizeEvents + '///+<li>Check existence of dialog</li> + Call DialogTest ( TabCustomizeEvents ) + '///+<li>Quit dialog</li> + TabCustomizeEvents.cancel + '///+<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +'------------------------------------------------------------- +testcase tViewFullScreen +'///<u><b>Check invocation of View::Fullscren</b></u> + +'///<ul> + '///+<li>Load simple chart document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + '///+<li>Convert chart to 3D (this probably makes the test more risky)</li> + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + '///+<li>Invoke View::Fullscren</li> + ViewFullScreen + '///+<li>Quit fullscreen using CTRL+SHIFT+J</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Mod1 Shift J>" + sleep (2) + '///+<li>Enter fullscreen using CTRL+SHIFT+J</li> + DocumentCalc.TypeKeys "<Mod1 Shift J>" + '///+<li>Quit fullscreen using View::Fullscren</li> + ViewFullScreen + '///<li>Close document</li> + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + Call hCloseDocument +'///</ul> + +endcase +' +'----------------------------------------------------------- +' diff --git a/testautomation/chart2/required/includes/ch2_window.inc b/testautomation/chart2/required/includes/ch2_window.inc new file mode 100644 index 000000000000..407898e228d1 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_window.inc @@ -0,0 +1,63 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Chart resource test - Menu WINDOW +'* +'************************************************************************ +'* +' #1 tWindowNewWindowAndClose +'* +'\************************************************************************ + +testcase tWindowNewWindowAndClose +'///<u><b>Test Window::New Window and Window::Close Window</b></u> + +'///<ul> + '///+<li>Load simple test document</li> + if fLoadVerySimpleChartAndSaveLocal() > 0 then + warnlog "Loading test document seems to have failed -> Check this out!" + goto endsub + endif + '///+<li>Select chart using navigator</li> + call fSelectFirstOLE + '///+<li>Invoke Edit::Object::Edit to enter Inplace Mode</li> + EditObjectEdit + sleep(2) + '///+<li>Invoke Window::New Window</li> + WindowNewWindow + '///+<li>Invoke Window::Close Window</li> + WindowCloseWindow + + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '///+<li>Close document</li>/// + Call hCloseDocument +'///</ul> +endcase + diff --git a/testautomation/chart2/required/includes/ch2_wizard.inc b/testautomation/chart2/required/includes/ch2_wizard.inc new file mode 100644 index 000000000000..df97ba6bda43 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_wizard.inc @@ -0,0 +1,86 @@ +'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 +' <http://www.openoffice.org/license.html> +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : oliver.craemer@oracle.com +'* +'* short description : Create new Chart using the Wizard +'* +'************************************************************************ +'* +' #1 tCreateNewChart +'* +'\************************************************************************ + +testcase tCreateNewChart +'///<u><b>Test creation of new chart using the Chart Wizard</b></u> + dim sInputFile as string + dim sOutputFile as string + sInputFile = convertpath ( gtesttoolpath & "chart2/required/input/spreadsheetFile.ods" ) + sOutputFile = convertpath ( gOfficepath & "user/work/spreadsheetFile.ods" ) + + '/// Load test document <i>gTesttoolPath</i>/chart2/required/input/spreadsheetFile.ods + call hFileOpen(sInputFile) + sleep(2) + '/// Save the document local <i>gOfficepath</i>user/work/spreadsheetFile[.ods] + if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then + warnlog "Saving test document localy failed -> Aborting" + call hCloseDocument + goto endsub + endif + '/// Insert / Chart + InsertChart + sleep(5) + Kontext "ChartWizard" + Call DialogTest ( ChartWizard ) + '/// In the Chart wizard switch to the <i>Chart Type</i> page + Kontext "ChartType" + Call DialogTest ( ChartType ) + '/// Switch to the <i>Data Range</i> page using <DOWN>-key + Kontext "ChartWizard" + GoNext.Click + Kontext "TabChartTypeDataRange" + Call DialogTest ( TabChartTypeDataRange ) + '/// Switch to the <i>Data Series</i> page using <i>Next >></i> button + Kontext "ChartWizard" + GoNext.Click + Kontext "TabChartTypeDataSeries" + Call DialogTest ( TabChartTypeDataSeries ) + '/// Switch to the <i>Chart Elements</i> page using <i>Next >></i> button + Kontext "ChartWizard" + GoNext.Click + Kontext "TabChartTypeChartElements" + Call DialogTest ( TabChartTypeChartElements ) + '/// Create Chart using <i>Finish</i> button + Kontext "ChartWizard" + ChartWizard.OK + sleep(2) + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "<Escape>" + '/// Close document + Call hCloseDocument +endcase + diff --git a/testautomation/chart2/required/input/basetable.sdc b/testautomation/chart2/required/input/basetable.sdc Binary files differnew file mode 100755 index 000000000000..82da646843d4 --- /dev/null +++ b/testautomation/chart2/required/input/basetable.sdc diff --git a/testautomation/chart2/required/input/basetable.sxc b/testautomation/chart2/required/input/basetable.sxc Binary files differnew file mode 100755 index 000000000000..cc42891cf6c6 --- /dev/null +++ b/testautomation/chart2/required/input/basetable.sxc diff --git a/testautomation/chart2/required/input/ch_flexrange01.ods b/testautomation/chart2/required/input/ch_flexrange01.ods Binary files differnew file mode 100755 index 000000000000..71bb586bb925 --- /dev/null +++ b/testautomation/chart2/required/input/ch_flexrange01.ods diff --git a/testautomation/chart2/required/input/ch_flexrange02.ods b/testautomation/chart2/required/input/ch_flexrange02.ods Binary files differnew file mode 100755 index 000000000000..e0121839998d --- /dev/null +++ b/testautomation/chart2/required/input/ch_flexrange02.ods diff --git a/testautomation/chart2/required/input/ch_flexrange03.ods b/testautomation/chart2/required/input/ch_flexrange03.ods Binary files differnew file mode 100755 index 000000000000..8c60082f143c --- /dev/null +++ b/testautomation/chart2/required/input/ch_flexrange03.ods diff --git a/testautomation/chart2/required/input/ch_flexrange04.ods b/testautomation/chart2/required/input/ch_flexrange04.ods Binary files differnew file mode 100755 index 000000000000..57562d9ba8f6 --- /dev/null +++ b/testautomation/chart2/required/input/ch_flexrange04.ods diff --git a/testautomation/chart2/required/input/ch_flexrange05.odt b/testautomation/chart2/required/input/ch_flexrange05.odt Binary files differnew file mode 100755 index 000000000000..9c753580640e --- /dev/null +++ b/testautomation/chart2/required/input/ch_flexrange05.odt diff --git a/testautomation/chart2/required/input/ch_flexrange06.odt b/testautomation/chart2/required/input/ch_flexrange06.odt Binary files differnew file mode 100755 index 000000000000..04d164a4754c --- /dev/null +++ b/testautomation/chart2/required/input/ch_flexrange06.odt diff --git a/testautomation/chart2/required/input/ch_flexrange07.odt b/testautomation/chart2/required/input/ch_flexrange07.odt Binary files differnew file mode 100755 index 000000000000..03206d618ad4 --- /dev/null +++ b/testautomation/chart2/required/input/ch_flexrange07.odt diff --git a/testautomation/chart2/required/input/ch_flexrange08.odt b/testautomation/chart2/required/input/ch_flexrange08.odt Binary files differnew file mode 100755 index 000000000000..cb02ee9efa2b --- /dev/null +++ b/testautomation/chart2/required/input/ch_flexrange08.odt diff --git a/testautomation/chart2/required/input/spreadsheetFile.ods b/testautomation/chart2/required/input/spreadsheetFile.ods Binary files differnew file mode 100755 index 000000000000..904b55bb5535 --- /dev/null +++ b/testautomation/chart2/required/input/spreadsheetFile.ods diff --git a/testautomation/chart2/required/input/verySimpleChart.ods b/testautomation/chart2/required/input/verySimpleChart.ods Binary files differnew file mode 100755 index 000000000000..50cb116a1b4a --- /dev/null +++ b/testautomation/chart2/required/input/verySimpleChart.ods |