From 0726d12d9b6161a9711cb6fd9749bf36c662889f Mon Sep 17 00:00:00 2001 From: Joerg Sievers Date: Fri, 13 Jun 2008 13:27:03 +0000 Subject: changed structure which will be included into the CWS process. --- .../chart2/required/ch2_chart_data_dlg_impress.bas | 61 + .../ch2_flexible_source_range_selection.bas | 71 ++ testautomation/chart2/required/ch2_updt_calc.bas | 149 +++ .../chart2/required/includes/ch2_datadialogue.inc | 341 ++++++ .../chart2/required/includes/ch2_file.inc | 410 +++++++ .../ch2_flexible_source_range_selection.inc | 947 +++++++++++++++ .../ch2_flexible_source_range_selection01.inc | 799 ++++++++++++ .../chart2/required/includes/ch2_format.inc | 1267 ++++++++++++++++++++ .../chart2/required/includes/ch2_format1.inc | 826 +++++++++++++ .../chart2/required/includes/ch2_insert.inc | 299 +++++ .../chart2/required/includes/ch2_menu.inc | 237 ++++ .../chart2/required/includes/ch2_ole.inc | 143 +++ .../chart2/required/includes/ch2_toolbars.inc | 47 + .../chart2/required/includes/ch2_view.inc | 188 +++ .../chart2/required/includes/ch2_window.inc | 69 ++ .../chart2/required/includes/ch2_wizard.inc | 92 ++ testautomation/chart2/required/input/basetable.sdc | Bin 0 -> 28672 bytes testautomation/chart2/required/input/basetable.sxc | Bin 0 -> 5500 bytes .../chart2/required/input/ch_flexrange01.ods | Bin 0 -> 98073 bytes .../chart2/required/input/ch_flexrange02.ods | Bin 0 -> 6849 bytes .../chart2/required/input/ch_flexrange03.ods | Bin 0 -> 32530 bytes .../chart2/required/input/ch_flexrange04.ods | Bin 0 -> 20799 bytes .../chart2/required/input/ch_flexrange05.odt | Bin 0 -> 7305 bytes .../chart2/required/input/ch_flexrange06.odt | Bin 0 -> 7303 bytes .../chart2/required/input/ch_flexrange07.odt | Bin 0 -> 13104 bytes .../chart2/required/input/ch_flexrange08.odt | Bin 0 -> 13280 bytes .../chart2/required/input/spreadsheetFile.ods | Bin 0 -> 6337 bytes .../chart2/required/input/verySimpleChart.ods | Bin 0 -> 10429 bytes 28 files changed, 5946 insertions(+) create mode 100755 testautomation/chart2/required/ch2_chart_data_dlg_impress.bas create mode 100644 testautomation/chart2/required/ch2_flexible_source_range_selection.bas create mode 100755 testautomation/chart2/required/ch2_updt_calc.bas create mode 100755 testautomation/chart2/required/includes/ch2_datadialogue.inc create mode 100755 testautomation/chart2/required/includes/ch2_file.inc create mode 100755 testautomation/chart2/required/includes/ch2_flexible_source_range_selection.inc create mode 100755 testautomation/chart2/required/includes/ch2_flexible_source_range_selection01.inc create mode 100755 testautomation/chart2/required/includes/ch2_format.inc create mode 100755 testautomation/chart2/required/includes/ch2_format1.inc create mode 100755 testautomation/chart2/required/includes/ch2_insert.inc create mode 100644 testautomation/chart2/required/includes/ch2_menu.inc create mode 100755 testautomation/chart2/required/includes/ch2_ole.inc create mode 100755 testautomation/chart2/required/includes/ch2_toolbars.inc create mode 100755 testautomation/chart2/required/includes/ch2_view.inc create mode 100755 testautomation/chart2/required/includes/ch2_window.inc create mode 100755 testautomation/chart2/required/includes/ch2_wizard.inc create mode 100755 testautomation/chart2/required/input/basetable.sdc create mode 100755 testautomation/chart2/required/input/basetable.sxc create mode 100755 testautomation/chart2/required/input/ch_flexrange01.ods create mode 100755 testautomation/chart2/required/input/ch_flexrange02.ods create mode 100755 testautomation/chart2/required/input/ch_flexrange03.ods create mode 100755 testautomation/chart2/required/input/ch_flexrange04.ods create mode 100755 testautomation/chart2/required/input/ch_flexrange05.odt create mode 100755 testautomation/chart2/required/input/ch_flexrange06.odt create mode 100755 testautomation/chart2/required/input/ch_flexrange07.odt create mode 100755 testautomation/chart2/required/input/ch_flexrange08.odt create mode 100755 testautomation/chart2/required/input/spreadsheetFile.ods create mode 100755 testautomation/chart2/required/input/verySimpleChart.ods (limited to 'testautomation/chart2/required') diff --git a/testautomation/chart2/required/ch2_chart_data_dlg_impress.bas b/testautomation/chart2/required/ch2_chart_data_dlg_impress.bas new file mode 100755 index 000000000000..04b1a3c83698 --- /dev/null +++ b/testautomation/chart2/required/ch2_chart_data_dlg_impress.bas @@ -0,0 +1,61 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_chart_data_dlg_impress.bas,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@Sun.Com +'* +'* short description : Resource Test for the Chart Data Dialogue in Impress. +'* +'\************************************************************************************************ + +sub main + use "chart2\required\includes\ch2_datadialogue.inc" + Call hStatusIn("Chart2", "ch2_chart_data_dlg_impress.bas") + printlog "--------------------------------------------" + printlog "C h a r t D a t a D i a l o g Updatetest" + printlog "--------------------------------------------" + + printLog "----------- tChartDataDialogue -----------" + call tChartDataDialogueButtons + call tChartDataDialogueFieldsUndo + Call hStatusOut +end sub +' +'------------------------------------------------------------------------------- +' +sub LoadIncludeFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + Call GetUseFiles + gApplication = "Impress" +end sub + diff --git a/testautomation/chart2/required/ch2_flexible_source_range_selection.bas b/testautomation/chart2/required/ch2_flexible_source_range_selection.bas new file mode 100644 index 000000000000..d96a3033e3bd --- /dev/null +++ b/testautomation/chart2/required/ch2_flexible_source_range_selection.bas @@ -0,0 +1,71 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_flexible_source_range_selection.bas,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/*********************************************************************** +'* +'* owner : joerg.sievers@sun.com +'* +'* short description : Updatetest for Flexible Source Range Selection +'* +'\*********************************************************************** + +sub main + use "chart2\required\includes\ch2_flexible_source_range_selection.inc" + use "chart2\required\includes\ch2_flexible_source_range_selection01.inc" + use "chart2\tools\ch_tools_common.inc" + use "chart2\tools\ch_tools_chart_type.inc" + Call hStatusIn("Chart2", "ch2_flexible_source_range_selection.bas") + printlog "----------------------------------------------" + printlog "Updatetest for Flexible Source Range Selection" + printlog "----------------------------------------------" + printlog "------------ Chart in Spreadsheet ------------" + gApplication = "Calc" + Call tDataRangeWizardCalc + Call tDataSeriesWizardCalc + Call tDataRangeDialogCalc + Call tDataSeriesDialogCalc + printlog "-------------- Chart in Writer ---------------" + gApplication = "Writer" + Call tDataRangeWizardWriter + Call tDataSeriesWizardWriter + Call tDataRangeDialogWriter + Call tDataSeriesDialogWriter + Call hStatusOut +end sub +' +'------------------------------------------------------------------------------- +' +sub LoadIncludeFiles + use "global\system\includes\master.inc" + use "global\system\includes\gvariabl.inc" + Call GetUseFiles + gApplication = "Calc" +end sub diff --git a/testautomation/chart2/required/ch2_updt_calc.bas b/testautomation/chart2/required/ch2_updt_calc.bas new file mode 100755 index 000000000000..1a260734d0ee --- /dev/null +++ b/testautomation/chart2/required/ch2_updt_calc.bas @@ -0,0 +1,149 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_updt_calc.bas,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@sun.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.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 tFileSaveAsSDC + call tFileSaveAsVOR + 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 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 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 tdummyToolbar + printLog Chr(13) + "--------- Chart2 as OLE object ---------" + Call tChartOLE("WRITER") + Call tChartOLE("CALC") + Call tChartOLE("IMPRESS") + Call tChartOLE("DRAW") + Call tChartOLE("HTMLDOKUMENT") + Call tChartOLE("MASTERDOC") + 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" + Call GetUseFiles + gApplication = "Calc" +end sub + diff --git a/testautomation/chart2/required/includes/ch2_datadialogue.inc b/testautomation/chart2/required/includes/ch2_datadialogue.inc new file mode 100755 index 000000000000..4fce4169b3c6 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_datadialogue.inc @@ -0,0 +1,341 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_datadialogue.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* Owner : joerg.sievers@sun.com +'* +'* short description : Resource-test for the Chart Data Dialogue. +'* +'******************************************************************* +'* +' #1 tChartDataDialogueButtons +' #1 tChartDataDialogueFieldsUndo +'* +'\******************************************************************* + +testcase tChartDataDialogueButtons + '/// Create new impress document + printlog "Create new impress document" + call hNewDocument + Kontext "DocumentImpress" + '/// Insert a new Chart-object, via the Menu: 'Insert - Chart'. + Printlog " Insert a new Chart-object, via the Menu: 'Insert - Chart'." + InsertChart + WaitSlot() + '/// Press 'TAB' once to select the object + printlog " Press 'TAB' once to select the object." + DocumentImpress.TypeKeys "" + '/// Click the button 'RETURN' / 'ENTER' to enter the Chart-Data-dialogue + printlog " Click the button 'Return', to enter the Chart-Data-dialogue." + DocumentImpress.TypeKeys "" + Kontext "DocumentChart" + '/// Open context menu + printlog "Open context menu" + DocumentChart.OpenContextMenu + '/// Select the third entry + printlog "Select the third entry" + hMenuSelectNr (3) + sleep (1) + Kontext "Diagramdata" + call DialogTest ( Diagramdata ) + '/// Check if the diagram data dialogue came up + printlog "Check if the diagram data dialogue came up" + if Diagramdata.Exists then + printlog " Diagramdata came up just as expected." + else + warnlog " Diagramdata didnt come up as expected." + call hCloseDocument + goto endsub + end if + '/// Check if the 'Insert Row'-button is enabled. + printlog "Check if the 'Insert Row'-button is enabled." + if InsertRow.isEnabled then + printlog " InsertRow was correctly enabled." + else + warnlog " InsertRow wasnt enabled, but should have been." + end if + '/// Check if the 'Swap Columns'-button is disabled. + printlog "Check if the 'Swap Columns'-button is disabled." + if SwapColumns.isEnabled then + warnlog " SwapColumns was enabled, but should have been disabled." + else + printlog " SwapColumns was correctly disabled." + end if + '/// Check if the 'Swap Rows'-button is enabled. + printlog "Check if the 'Swap Rows'-button is enabled." + if SwapRows.isEnabled then + printlog " SwapRows was correctly enabled." + else + warnlog " SwapRows wasnt enabled, but should have been." + end if + '/// Check if the 'Delete Row'-button is enabled. + printlog "Check if the 'Delete Row'-button is enabled." + if DeleteRow.isEnabled then + printlog " DeleteRow was correctly enabled." + else + warnlog " DeleteRow wasnt enabled, but should have been." + end if + '/// Check if the 'Delete Column'-button is enabled. + printlog "Check if the 'Delete Column'-button is enabled." + if DeleteColumn.isEnabled then + warnlog " DeleteColumn was enabled, but should have been disabled." + else + printlog " DeleteColumn was correctly disabled." + end if + '/// Press 'TAB' to enter the Data-fields, followed by 'SHIFT TAB' end up in the first field. + printlog "Press 'TAB' to enter the Data-fields, followed by 'SHIFT TAB' end up in the first field." + Kontext "Diagramdata" + Diagramdata.TypeKeys "", true + Diagramdata.TypeKeys "", true + '/// Set the text in the marked field to '111'. Then move to the next field by pressing 'TAB'. + printlog " Set the text in the marked field to '111'. Then move to the next field by pressing 'TAB'." + Tables.TypeKeys "111", true + Diagramdata.TypeKeys "", true + '/// Set the text in the marked field to '222'. Then move to the next field by pressing 'TAB'. + printlog " Set the text in the marked field to '222'. Then move to the next field by pressing 'TAB'." + Tables.TypeKeys "222", true + Diagramdata.TypeKeys "", true + '/// Set the text in the marked field to '333'. Then move to the next field by pressing 'TAB'. ///' + printlog " Set the text in the marked field to '333'. Then move back to the first field by pressing 'SHIFT TAB' twice." + Tables.TypeKeys "333", true + 'Do one more TAB, then three DOWNs, and check that the SwapColumn and SwapRow Icons are disabled. + Tables.TypeKeys "", true + Tables.TypeKeys "", 3, true + if SwapColumns.isEnabled then + warnlog " SwapColumns was enabled, but should have been disabled." + else + printlog " SwapColumns was correctly disabled." + end if + if SwapRows.isEnabled then + warnlog " SwapRows should have been disabled, but was enabled." + else + printlog " SwapRows was correctly disabled." + end if + '/// Return to the upper left corner. + printlog "Return to the upper left corner." + Tables.TypeKeys "", 3, true + Tables.TypeKeys "", 3, true + '/// Click the button 'Insert Row'. + printlog " Click the button 'Insert Row'." + InsertRow.Click + '/// Click the second button of the six in the upper left corner: Insert Column + printlog " Click the button 'Insert Column'." + InsertColumn.Click + '/// Check if a new Column got inserted. And if it's unnamed. + Tables.TypeKeys "", true + Tables.TypeKeys "", true + if GetClipboard <> "" then + warnlog " Inserting a new column in the DataTable didn't seem to work." + endif + Diagramdata.TypeKeys "", 5, true + if DataSeriesLabel.GetText <> "" then + warnlog " Error when inserting a new Column: the Label for the Column doesn't appear to be clear. Was:" +DataSeriesLabel.GetText + endif + Tables.TypeKeys "", true + '/// Click the third button of the six in the upper left corner: 'Delete Row'. ///' + printlog " Click the button 'Delete Row'." + DeleteRow.Click + Tables.TypeKeys "", true + Tables.TypeKeys "", true + if GetClipboard <> "" then + warnlog " Inserting a new column in the DataTable didn't seem to work." + endif + '/// Press 'TAB' three times to enter the column we wish to delete. ///' + printlog " Press 'TAB' three times to enter the column we wish to delete." + Tables.TypeKeys "", 3, true + '/// Click the button 'Delete Column'. + printlog " Click the button 'Delete Column'." + DeleteColumn.Click + '/// Check if the Column got deleted. + printlog " Check if the Column got deleted." + Tables.TypeKeys "", 2, true + Tables.TypeKeys "", true + if GetClipboard <> "" then + warnlog " Error when deleting a Column." + end if + Tables.TypeKeys "", 3, true + Tables.TypeKeys "", true + if GetClipboard = "2,4" OR GetClipboard = "2.4" then + printlog " DeleteColumn worked as expected." + else + warnlog " Error when deleting a Column." + end if + '/// Click the button 'Swap Columns'. + printlog " Click the button 'Swap Columns'." + SwapColumns.Click + Tables.TypeKeys "", true + Tables.TypeKeys "", true + if GetClipboard = "8,8" OR GetClipboard = "8.8" then + printlog " SwapColumns worked as expected." + else + warnlog " Error when Swapping a Column." + end if + '/// Click the button 'Swap Rows'. + printlog " Click the button 'Swap Rows'." + SwapRows.Click + '/// Check the result + Tables.TypeKeys "", 4, true + Tables.TypeKeys "", true + if GetClipboard = "1,5" OR GetClipboard = "1.5" then + printlog " SwapRows worked as expected." + else + warnlog " Error when Swapping a Row." + end if + '/// Close the dialogue + printlog " Close the dialogue." + Diagramdata.Close + '/// End of test. Close the document. + printlog " End of test. Closing the document." + Call hCloseDocument +endcase +' +'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +' +testcase tChartDataDialogueFieldsUndo + printlog " tChartDataDialogueFieldsUndo starts" + Call hNewDocument + Kontext "DocumentImpress" + '/// Insert a new Chart-object, via the Menu: 'Insert - Chart'. + printlog " Insert a new Chart-object, via the Menu: 'Insert - Chart'." + InsertChart + WaitSlot() + '/// Press 'TAB' once to select the object + printlog " Press 'TAB' once to select the object." + DocumentImpress.TypeKeys "" + '/// Click the button 'RETURN' / 'ENTER' to enter the Chart-Data-dialogue + printlog " Click the button 'Return', to enter the Chart-Data-dialogue." + DocumentImpress.TypeKeys "" + Kontext "DocumentChart" + '/// Open context menu + printlog "Open context menu" + DocumentChart.OpenContextMenu + '/// Select third entry + printlog "Select third entry" + hMenuSelectNr (3) + sleep (1) + Kontext "Diagramdata" + call DialogTest ( Diagramdata ) + '/// Check if the dialogue came up. + printlog "Check if the dialogue came up." + if Diagramdata.Exists then + printlog " Diagramdata came up just as expected." + else + warnlog " Diagramdata didnt come up as expected. Please contact the test-administrator." + call hCloseDocument + goto endsub + end if + '/// Type the word 'Great' in the Label-textfield (for the Column). + printlog " Typing the word 'Great' in the Label-textfield (for the Column), and checking that it remained changed after leaving the field." + DataSeriesLabel.SetText "Great" + '/// Press 'TAB', followed by 'SHIFT TAB'. To jump from and back to the field. (and deselect and select it again). + printlog " Press 'TAB', followed by 'SHIFT TAB'. To jump from and back to the field. (and deselect and select it again)" + Diagramdata.TypeKeys "" + Diagramdata.TypeKeys "" + '/// Compare the written text with what the field now contains. + printlog " Compare the written text with what the field now contains." + if DataSeriesLabel.GetText <> "Great" then + warnlog " The field 'DataSeriesLabel' didn't get set. Should be 'Great', but was '" + DataSeriesLabel.GetText + "'." + endif + '/// Inside the Tables: Press the 'TAB'-key seven times. + printlog " Inside the Tables: Press the 'TAB'-key seven times." + Tables.TypeKeys "", 7 + '/// Inside the Tables: Check if you can type the numbers '774433', followed by 'TAB', and '774411'. + printlog " Inside the Tables: Check if you can type the numbers '774433', followed by 'TAB', and '774411'." + try + Tables.TypeKeys "774433", true + Tables.TypeKeys "", true + Tables.TypeKeys "774411", true + Tables.TypeKeys "", true + Tables.TypeKeys "", true + if GetClipboard <> "774433" then + warnlog " Writing the value '774433' in the DataTable didn't seem to work." + endif + Tables.TypeKeys "", true + Tables.TypeKeys "", true + if GetClipboard <> "774411" then + warnlog " Writing the value '774411' in the DataTable didn't seem to work." + endif + catch + warnlog " Either we're not at the right position, or the Table-fields doesn't become editable onto selection." + endcatch + '/// Close the dialogue + printlog " Close the dialogue." + Diagramdata.Close + '/// Try if we can Undo the changes with 'Edit - Undo'. + printlog "Try if we can Undo the changes with 'Edit - Undo'." + Kontext "DocumentImpress" + DatabaseUndo + '/// And then we enter the dialogue again, to check if the values has returned to what they were before we changed them. + printlog "And then we enter the dialogue again, to check if the values has returned to what they were before we changed them." + '/// One press on 'TAB' to select the object ///' + printlog " Click the button 'TAB', to select the object." + DocumentImpress.TypeKeys "" + '/// Followed by one press on "RETURN" / "ENTER" to enter the Chart-Data-dialogue ///' + printlog " Click the button 'Return', to enter the Chart-Data-dialogue." + DocumentImpress.TypeKeys "" + Kontext "DocumentChart" + '/// Open context menu + printlog "Open context menu" + DocumentChart.OpenContextMenu + '/// Select third entry + printlog "Select third entry" + hMenuSelectNr (3) + sleep (1) + Kontext "Diagramdata" + '/// Inside the Tables: Press the 'TAB'-key 14 times. + printlog " Inside the Tables: Press the 'TAB'-key 14 times." + Tables.TypeKeys "", 14 + '/// Inside the Tables: Check if the values has returned to what they were before changing them. + printlog " Inside the Tables: Check if the values has returned to what they were before changing them." + Tables.TypeKeys "", true + if GetClipboard <> "774433" then + if GetClipboard = "9,02" OR GetClipboard = "9.02" then + printlog " Edit-Undo worked fine." + else + warnlog " Edit-Undo didn't seem to work on the values in the Dialogue." + end if + else + warnlog " Edit-Undo didn't work on the values in the Dialogue." + end if + '/// Check if the Label we earlier named 'Great', now has changed back. + printlog " Check if the Label we earlier named 'Great', now has changed back." + if DataSeriesLabel.GetText = "Great" then + warnlog " The field 'DataSeriesLabel' didn't change back." + endif + '/// Close the dialogue + printlog " Close the dialogue." + Diagramdata.Close + '/// End of test. Close the document. + printlog " End of test. Closing the document." + Call hCloseDocument +endcase + diff --git a/testautomation/chart2/required/includes/ch2_file.inc b/testautomation/chart2/required/includes/ch2_file.inc new file mode 100755 index 000000000000..8f08954208e3 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_file.inc @@ -0,0 +1,410 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_file.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@sun.com +'* +'* short description : Chart resource test - Menu FILE +'* +'************************************************************************ +'* +' #1 tFileClose +' #1 tFileSaveAsOTS +' #1 tFileSaveAsSXC +' #1 tFileSaveAsSTC +' #1 tFileSaveAsXLS +' #1 tFileSaveAsXLT +' #1 tFileSaveAsSDC +' #1 tFileSaveAsVOR +' #1 tFileReload +'* +'\************************************************************************ + +testcase tFileClose +'///Dialog test after invocation of File::CloseSave the test file as OpenDocument Spreadsheet Template (.ots) + 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 "" + 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 +'///Save the test file as StarOffice 6.0/7 Spreadsheet (.sxc) + 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 "" + '/// 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 +'///Save the test file as StarOffice 6.0/7 Spreadsheet Template (.stc) + 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 "" + '/// 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 +'///Save the test file as Microsoft Excel 97/2000/XP (.xls) + Dim sOutputFile as string + + sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.xls" ) + + '/// Load simple chart document Testtoolpath/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 + 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 "" + '/// 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 "" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFileSaveAsXLT +'///Save the test file as Microsoft Excel 97/2000/XP Template(.xlt) + Dim sOutputFile as string + + sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.xlt" ) + + '/// Load simple chart document Testtoolpath/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 + 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 "" + '/// 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 "" + Call hCloseDocument +endcase +' +'------------------------------------------------------------- +' +testcase tFileSaveAsSDC +'///Save the test file as StarCalc 5.0 (.sdc) + Dim sOutputFile as string + + sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.sdc" ) + + '/// 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 (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 "" + '/// Save document as StarCalc 5.0 (.sdc) + if NOT hFileSaveAsWithFilterKill ( sOutputFile , "StarCalc 5.0" ) then + warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting" + call hCloseDocument + goto endsub + endif + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +endcase +' +'------------------------------------------------------------- +' +testcase tFileSaveAsVOR +'///Save the test file as StarCalc 5.0 Template(.vor) + Dim sOutputFile as string + + sOutputFile = convertpath( gOfficepath & "user/work/verySimpleChart.vor" ) + + '/// 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 (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 "" + '/// Save document as StarCalc 5.0 Template(.vor) + if NOT hFileSaveAsWithFilterKill ( sOutputFile , "StarCalc 5.0 Vorlage/Template" ) then + warnlog "Saving test document as '" & sOutputFile & "' failed -> Aborting" + call hCloseDocument + goto endsub + endif + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + 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 "" + 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_flexible_source_range_selection.inc b/testautomation/chart2/required/includes/ch2_flexible_source_range_selection.inc new file mode 100755 index 000000000000..69521946dbd1 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_flexible_source_range_selection.inc @@ -0,0 +1,947 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_flexible_source_range_selection.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/*********************************************************************** +'* +'* owner : joerg.sievers@sun.com +'* +'* short description : Updatetest for Flexible Source Range Selection in spreadsheets +'* +'************************************************************************ +'* +' #1 tDataRangeWizardCalc ' Updatetest for tabpage DataRange via chart wizard +' #1 tDataSeriesWizardCalc ' Updatetest for tabpage DataSeries via chart wizard +' #1 tDataRangeDialogCalc ' Updatetest for tabpage DataRange via data ranges dialog +' #1 tDataSeriesDialogCalc ' Updatetest for tabpage DataSeries via data ranges dialog +' #1 fOpenTestDocumentAndInsertChart ' Sub routine which is being used by two test cases +'* +'\*********************************************************************** + +testcase tDataRangeWizardCalc + dim sDataRange as string + dim sInputFile as string + sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange01.ods") + + '/// Open test document gtesttoolpath/chart2/required/input/ch_flexrange01.ods + printlog "Open test document gtesttoolpath/chart2/required/input/ch_flexrange01.ods" + if fOpenTestDocumentAndInsertChart(sInputFile) then + Kontext "ChartType" + '///Choose the Chart type bar (should be the second in the top-down list) + 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." + warnlog "Testcase aborted" + Kontext "ChartWizard" + ChartWizard.Cancel + call hCloseDocument + goto endsub + endif + '///Switch to tabpage Data Range + printlog "Switch to tabpage Data Range" + Kontext "ChartWizard" + GoNext.Click + Kontext "TabChartTypeDataRange" + call DialogTest ( TabChartTypeDataRange ) + '///Check that the data range in edit field has the value $ChartFlexRange.$B$3:$E$6 + printlog "heck that the data range in edit field has the value $ChartFlexRange.$B$3:$E$6" + Kontext "TabChartTypeDataRange" + sDataRange = DataRange.GetText + if sDataRange <> "$ChartFlexRange.$B$3:$E$6" then + warnlog "This is not the expected datarange, it is " & sDataRange & " but should be $ChartFlexRange.$B$3:$E$6" + else + printlog " Datarange is correct" + endif + '///Check if -Data series in rows- is enabled + printlog "Check if -Data series in rows- is enabled" + if Rows.IsEnabled then + printlog " Data series in rows is enabled" + else + warnlog "Data series in rows is disabled" + endif + '///Check if -Data series in columns- is enabled and chosen + printlog "Check if -Data series in columns- is enabled and chosen" + if Columns.IsEnabled then + printlog " Data series in columns is enabled" + if Columns.IsChecked then + printlog " and checked" + else + warnlog "Data series in columns is not checked" + endif + else + warnlog "Data series in columns is disabled" + endif + '///Check if -First row as label- is enabled and checked + printlog "Check if -First row as label- is enabled and checked" + if FirstRowAsLabel.IsEnabled then + printlog " First row as label is enabled" + if FirstRowAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First row as label is not checked" + endif + else + warnlog "First row as label is disabled" + endif + '///Check if -First column as label- is enabled and not checked + printlog "Check if -First column as label- is enabled and not checked" + if FirstColumnAsLabel.IsEnabled then + printlog " First column as label is enabled" + if FirstColumnAsLabel.IsChecked then + warnlog "First column as label is checked" + else + printlog " and not checked" + endif + else + warnlog "First column as label is disabled" + endif + '///Press button Range Chooser + printlog "Press button Range Chooser" + SelectDataRange.Click + '///Enter invalid range $ChartFlexRange.$B$3:$E$0 and close Range Chooser + printlog "Enter invalid range $ChartFlexRange.$B$3:$E$0 and close Range Chooser" + Kontext "AcceptOrRejectChangesArea" + AreaEditField.SetText "$ChartFlexRange.$B$3:$E$0" + ShrinkButton.Click + '///Check if -Data series in rows- is disabled + printlog "Check if -Data series in rows- is disabled" + Kontext "TabChartTypeDataRange" + if NOT Rows.IsEnabled then + printlog " Data series in rows is disabled" + else + warnlog "Data series in rows is enabled, but should be disabled" + endif + '///Check if -Data series in columns- is disabled + printlog "Check if -Data series in columns- is disabled" + if NOT Columns.IsEnabled then + printlog " Data series in columns is disabled" + else + warnlog "Data series in columns is enabled, but should be disabled" + endif + '///Check if -First row as label- is disabled + printlog "Check if -First row as label- is disabled" + if NOT FirstRowAsLabel.IsEnabled then + printlog " First row as label is disabled" + else + warnlog "First row as label is enabled, but should be disabled" + endif + '///Check if -First column as label- is disabled + printlog "Check if -First column as label- is disabled" + if NOT FirstColumnAsLabel.IsEnabled then + printlog " First Column as label is disabled" + else + warnlog "First Column as label is enabled, but should be disabled" + endif + '///Check if Back, Next and Finish does not work + printlog "Check if Back, Next and Finish does not work" + Kontext "ChartWizard" + GoBack.Click + Kontext "TabChartTypeDataRange" + if FirstColumnAsLabel.IsVisible then + printlog " Success: Back button does not work" + else + warnlog "Back button is not functionless" + Kontext "ChartWizard" + GoNext.Click + endif + '///Enter valid range $ChartFlexRange.$B$3:$E$6 + printlog "Enter valid range $ChartFlexRange.$B$3:$E$6" + Kontext "TabChartTypeDataRange" + DataRange.SetText "$ChartFlexRange.$B$3:$E$6" + '///Check if -Data series in rows- is enabled + printlog "Check if -Data series in rows- is enabled" + if Rows.IsEnabled then + printlog " Data series in rows is enabled" + else + warnlog "Data series in rows is disabled" + endif + '///Check if -Data series in columns- is enabled and chosen + printlog "Check if -Data series in columns- is enabled and chosen" + if Columns.IsEnabled then + printlog " Data series in columns is enabled" + if Columns.IsChecked then + printlog " and checked" + else + warnlog "Data series in columns is not checked" + endif + else + warnlog "Data series in rows is disabled" + endif + '///Check if -First row as label- is enabled and checked + printlog "Check if -First row as label- is enabled and checked" + if FirstRowAsLabel.IsEnabled then + printlog " First row as label is enabled" + if FirstRowAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First row as label is not checked" + endif + else + warnlog "First row as label is disabled" + endif + '///Check if -First column as label- is enabled and not checked + printlog "Check if -First column as label- is enabled and not checked" + if FirstColumnAsLabel.IsEnabled then + printlog " First column as label is enabled" + if FirstColumnAsLabel.IsChecked then + warnlog "First column as label is checked" + else + printlog " and not checked" + endif + else + warnlog "First column as label is disabled" + endif + '///Press Cancel button + printlog "Press Cancel button" + Kontext "ChartWizard" + ChartWizard.Cancel + '///Close document + printlog "Close document" + Call hCloseDocument + else + warnlog "It was not possible to open the test document." + endif +endcase +' +'------------------------------------------------------------------------- +' +testcase tDataSeriesWizardCalc + dim sInputFile as string + dim iDataSeries as integer + dim sDataRanges as string + dim sRangeFor as string + dim sCategories as string + sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange02.ods") + '///Open test document gTestToolPath/chart2/required/input/ch_flexrange02.ods + printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange02.ods" + if fOpenTestDocumentAndInsertChart(sInputFile) then + '///Choose the Chart type XY (SCATTER) (should be the second in the top-down list) + Kontext "ChartType" + printlog "Choose the Chart type XY (SCATTER) (should be the second in the top-down list)" + if fSetChartType( "xy" ) > 0 then + warnlog "Something went wrong setting chart type to XY (SCATTER)." + Kontext "ChartWizard" + ChartWizard.Cancel + call hCloseDocument + goto endsub + endif + Kontext "ChartWizard" + '/// Click on Next button + printlog "Click on Next button" + GoNext.Click + '/// Click on Next button + printlog "Click on Next button" + GoNext.Click + Kontext "TabChartTypeDataSeries" + if RangeFor.IsVisible then + printlog " Switching to tabpage was successfull" + else + warnlog "Switching to tabpage Data Series failed" + Kontext "ChartWizard" + ChartWizard.Cancel + call hCloseDocument + goto endsub + endif + call DialogTest ( TabChartTypeDataSeries ) + '///Check if the data series listbox is enabled and contains three entries + printlog "Check if the data series listbox is enabled and contains three entries" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 3 then + printlog " All 3 data series are available" + else + warnlog "There are " & iDataSeries & " data series instead of 3" + endif + '///Check if the ADD button is enabled and click the button + printlog "Check if the ADD button is enabled and click the button" + if AddButton.IsEnabled then + printlog " ADD button is enabled" + AddButton.Click + else + warnlog "ADD button is not enabled" + endif + '///Check if there are now four entries in the data series listbox + printlog "Check if there are now four entries in the data series listbox" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 4 then + printlog " Adding a data series was successfull" + else + warnlog "There are " & iDataSeries & " data series instead of 4" + endif + '///Check if the second data series was added below the highlighted one + printlog "Check if the second data series was added below the highlighted one" + if DataSeries.GetSelIndex = 2 then + printlog " The new data series was inserted below the highlighted (first) one" + else + warnlog "The new dataseries was not inserted below the highlighted one" + endif + '///Check if the REMOVE button is enabled and click the button + printlog "Check if the REMOVE button is enabled and click the button" + if RemoveButton.IsEnabled then + printlog " REMOVE button is enabled" + RemoveButton.Click + else + warnlog "REMOVE button is not enabled" + endif + '///Check if there are now 3 entries in the data series listbox + printlog "Check if there are now 3 entries in the data series listbox" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 3 then + printlog " Removing a data series was successfull" + else + warnlog "There are " & iDataSeries & " data series instead of 3" + endif + '///Use UP button and verify that it it disabled on first entry + printlog "Use UP button on last data series and verify that it it disabled on first entry" + DataSeries.Select(3) + if MoveUp.IsEnabled then + printlog " The MoveUp button is enabled" + '/// Click on Move Up button twice." + printlog "Click on Move Up button twice." + MoveUp.Click + MoveUp.Click + else + warnlog "The MoveUp button is disabled" + endif + if DataSeries.GetSelIndex = 1 then + printlog " Moving data series was successfull" + if MoveUp.IsEnabled then + warnlog "MoveUp button is not disabled on first entry" + else + printlog " and MoveUp button is disabled on first enty" + endif + else + warnlog "Moving data series was not successfull" + endif + '///Use DOWN button and verify that it is disabled on last entry + printlog "Use DOWN button and verify that it is disabled on last entry" + DataSeries.Select(1) + if MoveDown.IsEnabled then + printlog " The MoveDown button is enabled" + '/// Click Move Down button twice + printlog "Click Move Down button twice" + MoveDown.Click + MoveDown.Click + else + warnlog "The MoveDown button is disabled" + endif + if DataSeries.GetSelIndex = 3 then + printlog " Moving data series was successfull" + if MoveDown.IsEnabled then + warnlog "MoveDown button is not disabled on first entry" + else + printlog " and MoveDown button is disabled on first enty" + endif + else + warnlog "Moving data series was not successfull" + endif + '///Select first entry in Data Ranges + printlog "Select first entry in Data Ranges" + DataRanges.Select(1) + '///Verify that the range matches the one in edit field + printlog "Verify that the range matches the one in edit field" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + sRangeFor = RangeFor.GetText + if sDataRanges = sRangeFor then + printlog " Both ranges are matching" + else + warnlog "The ranges does not match: " & sDataRanges & sRangeFor + endif + '///Select second entry in Data Ranges + printlog "Select second entry in Data Ranges" + DataRanges.Select 2 + + '///Check that the range in the edit field has changed, too. + printlog "Check that the range in the edit field has changed, too." + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + sRangeFor = RangeFor.GetText + if sDataRanges = sRangeFor then + printlog " Both ranges are matching" + else + warnlog "The ranges does not match" & sDataRanges & sRangeFor + endif + '///Change the range in edit field + printlog "Change the range in edit field" + RangeFor.SetText "$ChartFlexRange.$D$5:$D$6;$ChartFlexRange.$D$8" + '///Check that the range in Data Ranges has changed, too + printlog "Check that the range in Data Ranges has changed, too" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + if sDataRanges = "$ChartFlexRange.$D$5:$D$6;$ChartFlexRange.$D$8" then + printlog " The data range has also changed" + else + warnlog "The data range has not changed" + endif + '///Click on Range Chooser and change the range + printlog "Click on Range Chooser and change the range" + SelectRange.Click + Kontext "AcceptOrRejectChangesArea" + '/// Enter $ChartFlexRange.$D$5:$D$6 in edit field + printlog "Enter $ChartFlexRange.$D$5:$D$6 in edit field" + AreaEditField.SetText "$ChartFlexRange.$D$5:$D$6" + '/// Click on Shirnk button + printlog "Click on Shirnk button" + ShrinkButton.Click + '///Check if the range in the Data ranges has been changed + printlog "Check if the range in Data ranges has changed" + Kontext "TabChartTypeDataSeries" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + if sDataRanges = "$ChartFlexRange.$D$5:$D$6" then + printlog " The data range has also changed" + else + warnlog "The data range has not changed" + endif + '///Edit range for Data Labels + printlog "Edit range for Data Labels" + '/// Set text $ChartFlexRange.$C$15:$C$16 in categories + printlog "Set text $ChartFlexRange.$C$15:$C$16 in categories" + Categories.SetText "$ChartFlexRange.$C$15:$C$16" + sCategories = Categories.GetText + '/// Validate the changes have not been modified + printlog "Validate the changes have not been modified" + if sCategories = "$ChartFlexRange.$C$15:$C$16" then + printlog " The range has been modified" + else + warnlog "Modifiing the range was not successfull" + endif + '///Click on Range Chooser and change the range + printlog "Click on Range Chooser and change the range" + SelectCategories.Click + Kontext "AcceptOrRejectChangesArea" + '/// Set text $ChartFlexRange.$C$5:$C$6 in the edit field + printlog "Set text $ChartFlexRange.$C$5:$C$6 in the edit field" + AreaEditField.SetText "$ChartFlexRange.$C$5:$C$6" + '/// Click on Shrink button + printlog "Click on Shrink button" + ShrinkButton.Click + '///Verify that the range is taken + printlog "Verify that the range is taken" + Kontext "TabChartTypeDataSeries" + sCategories = Categories.GetText + if sCategories = "$ChartFlexRange.$C$5:$C$6" then + printlog " The range has been modified" + else + warnlog "Modifiing the range was not successfull" + endif + '///Enter invalid range $ChartFlexRange.$C$5:$C$ + printlog "Enter invalid range $ChartFlexRange.$C$5:$C$" + Categories.SetText "$ChartFlexRange.$C$5:$C$" + Kontext "ChartWizard" + '/// Click on the Back button + printlog "Click on the Back button" + GoBack.Click + Kontext "TabChartTypeDataSeries" + if Categories.IsVisible then + printlog " Success: Back button is disabled" + else + warnlog "Back button is not functionless" + Kontext "ChartWizard" + GoNext.Click + endif + '///Enter $ChartFlexRange.$C$5:$C$6 - a valid range + printlog "Enter $ChartFlexRange.$C$5:$C$6 - a valid range" + Categories.SetText "$ChartFlexRange.$C$5:$C$6" + '///Press Range Chooser for Data Lables + printlog "Press Range Chooser" + SelectCategories.Click + '/// Press -key + printlog "Press -key" + Kontext "AcceptOrRejectChangesArea" + AreaEditField.TypeKeys "" + '///Enter a semicolon and the second range $ChartFlexRange.$C$8 + printlog "Enter a semicolon and the second range $ChartFlexRange.$C$8" + AreaEditField.TypeKeys ";$ChartFlexRange.$C$8" + '///Close Range Chooser + printlog "Close Range Chooser" + ShrinkButton.Click + '///Verify that there is a multiple range + printlog "Verify that there is a multiple range" + Kontext "TabChartTypeDataSeries" + sCategories = Categories.GetText + if sCategories = "$ChartFlexRange.$C$5:$C$6;$ChartFlexRange.$C$8" then + printlog " The range has been modified to a multiple range" + else + warnlog "Modifiing the range was not successfull" + endif + '///Press Cancel button + printlog "Press Cancel button" + Kontext "ChartWizard" + ChartWizard.Cancel + '///Close document + printlog "Close document" + Call hCloseDocument + else + warnlog "It was not possible to open the test document." + endif +endcase + +'------------------------------------------------------------------------- + +testcase tDataRangeDialogCalc + dim sDataRange as string + dim sInputFile as string + sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange03.ods" ) + + '///Open test document gTestToolPath/chart2/required/input/ch_flexrange03.ods + printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange03.ods" + if fOpenTestDocumentAndSelectDataRange(sInputFile) then + '///Check data range in edit field is $ChartFlexRange.$D$4:$G$6;$ChartFlexRange.$C$5:$G$6;$ChartFlexRange.$C$4 + printlog "Check if the data range in edit field is $ChartFlexRange.$D$4:$G$6;$ChartFlexRange.$C$5:$G$6;$ChartFlexRange.$C$4" + Kontext "TabChartTypeDataRange" + sDataRange = DataRange.GetText + if sDataRange <> "$ChartFlexRange.$D$4:$G$6;$ChartFlexRange.$C$5:$G$6;$ChartFlexRange.$C$4" then + warnlog "This is not the expected datarange, it is " & sDataRange & " but should be $ChartFlexRange.$D$4:$G$6;$ChartFlexRange.$C$5:$G$6;$ChartFlexRange.$C$4" + else + printlog " Datarange is correct" + endif + '///Check if -Data series in columns- is enabled + printlog "Check if -Data series in columns- is enabled" + if Columns.IsEnabled then + printlog " Data series in columns is enabled" + else + warnlog "Data series in columns is disabled" + endif + '///Check if -Data series in rows- is enabled and chosen + printlog "Check if -Data series in columns- is enabled and chosen" + if Rows.IsEnabled then + printlog " Data series in rows is enabled" + if rows.IsChecked then + printlog " and checked" + else + warnlog "Data series in rows is not checked" + endif + else + warnlog "Data series in rows is disabled" + endif + '///Check if -First row as label- is enabled and checked + printlog "Check if -First row as label- is enabled and checked" + if FirstRowAsLabel.IsEnabled then + printlog " First row as label is enabled" + if FirstRowAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First row as label is not checked" + endif + else + warnlog "First row as label is disabled" + endif + '///Check if -First column as label- is enabled and checked + printlog "Check if -First column as label- is enabled and checked" + if FirstColumnAsLabel.IsEnabled then + printlog " First column as label is enabled" + if FirstColumnAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First column as label is not checked" + endif + else + warnlog "First column as label is disabled" + endif + '///Press button Range Chooser + printlog "Press button Range Chooser" + SelectDataRange.Click + '///Enter an $ChartFlexRange.$B$3:$E$0 in Range Chooser and close Range Chooser + printlog "Enter $ChartFlexRange.$B$3:$E$0 in Range Chooser and close Range Chooser" + Kontext "AcceptOrRejectChangesArea" + AreaEditField.SetText "$ChartFlexRange.$B$3:$E$0" + ShrinkButton.Click + '///Check if -Data series in rows- is disabled + printlog "Check if -Data series in rows- is disabled" + Kontext "TabChartTypeDataRange" + if NOT Rows.IsEnabled then + printlog " Data series in rows is disabled" + else + warnlog "Data series in rows is enabled, but should be disabled" + endif + '///Check if -Data series in columns- is disabled + printlog "Check if -Data series in columns- is disabled" + if NOT Columns.IsEnabled then + printlog " Data series in columns is disabled" + else + warnlog "Data series in columns is enabled, but should be disabled" + endif + '///Check if -First row as label- is disabled + printlog "Check if -First row as label- is disabled" + if NOT FirstRowAsLabel.IsEnabled then + printlog " First row as label is disabled" + else + warnlog "First row as label is enabled, but should be disabled" + endif + '///Check if -First column as label- is disabled + printlog "Check if -First column as label- is disabled" + if NOT FirstColumnAsLabel.IsEnabled then + printlog " First Column as label is disabled" + else + warnlog "First Column as label is enabled, but should be disabled" + endif + '///Check that OK button is disabled + printlog "Check if OK button is disabled" + try + Kontext "TabChartTypeDataRange" + TabChartTypeDataRange.OK + warnlog "The OK button is not disabled" + goto endsub + catch + printlog " The OK button is disabled" + endcatch + '///Enter a valid multiple range + printlog "Enter a valid range" + Kontext "TabChartTypeDataRange" + DataRange.SetText "$ChartFlexRange.$C$4:$G$6;$ChartFlexRange.$C$8:$G$8" + '///Check if -Data series in columns- is enabled + printlog "Check if -Data series in columns- is enabled" + if Columns.IsEnabled then + printlog " Data series in columns is enabled" + else + warnlog "Data series in columns is disabled" + endif + '///Check if -Data series in rows- is enabled and chosen + printlog "Check if -Data series in columns- is enabled and chosen" + if Rows.IsEnabled then + printlog " Data series in rows is enabled" + if rows.IsChecked then + printlog " and checked" + else + warnlog "Data series in rows is not checked" + endif + else + warnlog "Data series in rows is disabled" + endif + '///Check if -First row as label- is enabled and checked + printlog "Check if -First row as label- is enabled and checked" + if FirstRowAsLabel.IsEnabled then + printlog " First row as label is enabled" + if FirstRowAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First row as label is not checked" + endif + else + warnlog "First row as label is disabled" + endif + '///Check if -First column as label- is enabled and checked + printlog "Check if -First column as label- is enabled and checked" + if FirstColumnAsLabel.IsEnabled then + printlog " First column as label is enabled" + if FirstColumnAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First column as label is not checked" + endif + else + warnlog "First column as label is disabled" + endif + '///Press Cancel button + printlog "Press Cancel button" + Kontext "TabChartTypeDataRange" + TabChartTypeDataRange.Cancel + '///Close document + printlog "Close document" + Call hCloseDocument + else + warnlog "It was not possible to open the test document." + endif +endcase +' +'------------------------------------------------------------------------- +' +testcase tDataSeriesDialogCalc + dim sInputFile as string + dim iDataSeries as integer + dim sDataRanges as string + dim sRangeFor as string + dim sCategories as string + sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange04.ods") + '///Open test document gTestToolPath/chart2/required/input/ch_flexrange04.ods + printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange04.ods" + if fOpenTestDocumentAndSelectDataRange(sInputFile) then + Kontext + '///Switch to tabpage Data Series + Active.SetPage TabChartTypeDataSeries + Kontext "TabChartTypeDataSeries" + '///Check if the data series listbox is enabled and contains one entry + printlog "Check if the data series listbox is enabled and contains one entry" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 1 then + printlog " One data serie is available" + else + warnlog "There are " & iDataSeries & " data series instead of 1" + endif + '///Check if the ADD button is enabled and click the button + printlog "Check if the ADD button is enabled and click the button" + if AddButton.IsEnabled then + printlog " ADD button is enabled" + AddButton.Click + else + warnlog "ADD button is not enabled" + endif + '///Check if there are now two entries in the data series listbox + printlog "Check if there are now two entries in the data series listbox" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 2 then + printlog " Adding a data series was successfull" + else + warnlog "There are " & iDataSeries & " data series instead of 2" + endif + '///Check if the new data series was added below the highlighted one + printlog "Check if the new data series was added below the highlighted one" + if DataSeries.GetSelIndex = 2 then + printlog " The new data series was inserted below the highlighted (first) one" + else + warnlog "The new dataseries was not inserted below the highlighted one" + endif + '///Use UP button and verify that it it disabled on first entry + printlog "Use UP button on last data series and verify that it it disabled on first entry" + DataSeries.Select(2) + if MoveUp.IsEnabled then + printlog " The MoveUp button is enabled" + MoveUp.Click + else + warnlog "The MoveUp button is disabled" + endif + if DataSeries.GetSelIndex = 1 then + printlog " Moving data series was successfull" + if MoveUp.IsEnabled then + warnlog "MoveUp button is not disabled on first entry" + else + printlog " and MoveUp button is disabled on first enty" + endif + else + warnlog "Moving data series was not successfull" + endif + '///Use DOWN button and verify that it is disabled on last entry + printlog "Use DOWN button and verify that it is disabled on last entry" + DataSeries.Select(1) + if MoveDown.IsEnabled then + printlog " The MoveDown button is enabled" + MoveDown.Click + else + warnlog "The MoveDown button is disabled" + endif + if DataSeries.GetSelIndex = 2 then + printlog " Moving data series was successfull" + if MoveDown.IsEnabled then + warnlog "MoveDown button is not disabled on first entry" + else + printlog " and MoveDown button is disabled on first enty" + endif + else + warnlog "Moving data series was not successfull" + endif + '///Check if the REMOVE button is enabled and click the button + printlog "Check if the REMOVE button is enabled and click the button" + if RemoveButton.IsEnabled then + printlog " REMOVE button is enabled" + RemoveButton.Click + else + warnlog "REMOVE button is not enabled" + endif + '///Check if there are now one entry in the data series listbox + printlog "Check if there are now one entry in the data series listbox" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 1 then + printlog " Removing a data series was successfull" + else + warnlog "There are " & iDataSeries & " data series instead of 1" + endif + '///Select first entry in Data Ranges + printlog "Select first entry in Data Ranges" + DataRanges.Select(1) + '///Verify that the range for NAME matches the one in edit field + printlog "Verify that the range for NAME matches the one in edit field" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText(1,4) + sRangeFor = RangeFor.GetText + if sDataRanges = sRangeFor then + printlog " Both ranges are matching" + else + warnlog "The ranges does not match: " & sDataRanges & sRangeFor + endif + '///Select second entry in Data Ranges + printlog "Select second entry in Data Ranges" + DataRanges.Select(2) + '///Check that the range in the edit field has changed too + printlog "Check that the range in the edit field has changed too" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText(1,4) + sRangeFor = RangeFor.GetText + if sDataRanges = sRangeFor then + printlog " Both ranges are matching" + else + warnlog "The ranges does not match" & sDataRanges & sRangeFor + endif + '///Change the range in edit field + printlog "Change the range in edit field" + RangeFor.SetText "$ChartFlexRange.$D$5:$D$10" + '///Check that the range in Data Ranges has changed too + printlog "Check that the range in Data Ranges has changed too" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + if sDataRanges = "$ChartFlexRange.$D$5:$D$10" then + printlog " The data range has also changed" + else + warnlog "The data range has not changed" + endif + '///Click on Range Chooser and change the range + printlog "Click on Range Chooser and change the range" + SelectRange.Click + Kontext "AcceptOrRejectChangesArea" + AreaEditField.SetText "$ChartFlexRange.$D$5:$D$12" + ShrinkButton.Click + '///Check if the range in the Data ranges has changed + printlog "Check if the range in Data ranges has changed" + Kontext "TabChartTypeDataSeries" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + if sDataRanges = "$ChartFlexRange.$D$5:$D$12" then + printlog " The data range has also changed" + else + warnlog "The data range has not changed" + endif + '///Edit range for Categories + printlog "Edit range for Categories" + Categories.SetText "$ChartFlexRange.$B$5:$B$10" + sCategories = Categories.GetText + if sCategories = "$ChartFlexRange.$B$5:$B$10" then + printlog " The range has been modified" + else + warnlog "Modifiing the range was not successfull" + endif + '///Click on Range Chooser and change the range to $ChartFlexRange.$B$5:$B$12 + printlog "Click on Range Chooser and change the range to $ChartFlexRange.$B$5:$B$12" + SelectCategories.Click + Kontext "AcceptOrRejectChangesArea" + AreaEditField.SetText "$ChartFlexRange.$B$5:$B$12" + ShrinkButton.Click + '///Verify that the range is taken + printlog "Verify that the range is taken" + Kontext "TabChartTypeDataSeries" + sCategories = Categories.GetText + if sCategories = "$ChartFlexRange.$B$5:$B$12" then + printlog " The range has been modified" + else + warnlog "Modifiing the range was not successfull" + endif + '///Enter $ChartFlexRange.$B$5:$B$ as an invalid range + printlog "Enter $ChartFlexRange.$B$5:$B$ as an invalid range" + Categories.SetText "$ChartFlexRange.$B$5:$B$" + '///Check that the OK button does not work + printlog "Check that the OK button does not work" + try + Kontext "TabChartTypeDataSeries" + TabChartTypeDataSeries.OK + warnlog "The OK button is not disabled" + goto endsub + catch + printlog " The OK button is disabled" + endcatch + '///Enter as valid range $ChartFlexRange.$B$5:$B$12 + printlog "Enter as valid range $ChartFlexRange.$B$5:$B$12" + Kontext "TabChartTypeDataSeries" + Categories.SetText "$ChartFlexRange.$B$5:$B$12" + '///Press Range Chooser + printlog "Press Range Chooser" + SelectCategories.Click + '///Move cursor to the end + printlog "Move cursor to the end" + Kontext "AcceptOrRejectChangesArea" + AreaEditField.TypeKeys "" + '///Enter a semicolon and the second range $ChartFlexRange.$B$14 + printlog "Enter a semicolon and the second range $ChartFlexRange.$B$14" + AreaEditField.TypeKeys ";$ChartFlexRange.$B$14" + '///Close Range Chooser + printlog "Close Range Chooser" + ShrinkButton.Click + '///Verify that there is a multiple range + printlog "Verify that there is a multiple range" + Kontext "TabChartTypeDataSeries" + sCategories = Categories.GetText + if sCategories = "$ChartFlexRange.$B$5:$B$12;$ChartFlexRange.$B$14" then + printlog " The range has been modified to a multiple range" + else + warnlog "Modifiing the range was not successfull" + endif + '///Press Cancel button + printlog "Press Cancel button" + Kontext "TabChartTypeDataSeries" + TabChartTypeDataSeries.Cancel + '///Close document + printlog "Close document" + Call hCloseDocument + else + warnlog "It was not possible to open the test document." + endif +endcase +' +'------------------------------------------------------------------------- +' +function fOpenTestDocumentAndInsertChart(sInputFile as string) as BOOLEAN + fOpenTestDocumentAndInsertChart = FALSE + call hFileOpen(sInputFile) + sleep(2) + Kontext "DocumentCalc" + '/// Type + printlog "Type " + DocumentCalc.TypeKeys "" + '/// Type twice cursor key + printlog "Type twice cursor key" + DocumentCalc.TypeKeys "" , 2 + '/// Type thrice cursor key + printlog "Type thrice cursor key" + DocumentCalc.TypeKeys "" , 3 + '/// Menu Insert chart to open chart wizard + printlog "Menu Insert chart to open chart wizard" + InsertChart + try + WaitSlot() + fOpenTestDocumentAndInsertChart = TRUE + catch + fOpenTestDocumentAndInsertChart = FALSE + endcatch +end function + diff --git a/testautomation/chart2/required/includes/ch2_flexible_source_range_selection01.inc b/testautomation/chart2/required/includes/ch2_flexible_source_range_selection01.inc new file mode 100755 index 000000000000..be32c15cb521 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_flexible_source_range_selection01.inc @@ -0,0 +1,799 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_flexible_source_range_selection01.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/*********************************************************************** +'* +'* owner : joerg.sievers@sun.com +'* +'* short description : Updatetest for Flexible Source Range Selection in Writer +'* +'************************************************************************ +'* +' #1 tDataRangeWizardWriter ' Updatetest for tabpage DataRange via chart wizard +' #1 tDataSeriesWizardWriter ' Updatetest for tabpage DataSeries via chart wizard +' #1 tDataRangeDialogWriter ' Updatetest for tabpage DataRange via data ranges dialog +' #1 tDataSeriesDialogWriter ' Updatetest for tabpage DataSeries via data ranges dialog +' #1 fOpenWriterTestDocumentAndInsertChart ' Sub routine to load test documents +'* +'\*********************************************************************** + +testcase tDataRangeWizardWriter + dim sDataRange as string + dim sInputFile as string + sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange05.odt") + '///Open test document gTestToolPath/chart2/required/input/ch_flexrange05.odt + printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange05.odt" + if fOpenWriterTestDocumentAndInsertChart(sInputFile) then + '///Choose the Chart type line (should be the fifth in the top-down list) + printlog "Choose the Chart type line (should be the fifth in the top-down list)" + if fSetChartType( "line" ) > 0 then + warnlog "Something went wrong setting chart type to Line." + Kontext "ChartWizard" + ChartWizard.Cancel + call hCloseDocument + goto endsub + endif + Kontext "ChartWizard" + '/// Click Next button + GoNext.Click + Kontext "TabChartTypeDataRange" + call DialogTest ( TabChartTypeDataRange ) + '///Check data range in edit field value (ChartFlexRange.A1:E5) + printlog "Check data range in edit field value (ChartFlexRange.A1:E5)" + Kontext "TabChartTypeDataRange" + sDataRange = DataRange.GetText + if sDataRange <> "ChartFlexRange.A1:E5" then + warnlog "This is not the expected datarange, it is " & sDataRange & " but should be ChartFlexRange.A1:E5" + else + printlog " Datarange is correct" + endif + '///Check if -Data series in rows- is enabled + printlog "Check if -Data series in rows- is enabled" + if Rows.IsEnabled then + printlog " Data series in rows is enabled" + else + warnlog "Data series in rows is disabled" + endif + '///Check if -Data series in columns- is enabled and chosen + printlog "Check if -Data series in columns- is enabled and chosen" + if Columns.IsEnabled then + printlog " Data series in columns is enabled" + if Columns.IsChecked then + printlog " and checked" + else + warnlog "Data series in columns is not checked" + endif + else + warnlog "Data series in columns is disabled" + endif + '///Check if -First row as label- is enabled and checked + printlog "Check if -First row as label- is enabled and checked" + if FirstRowAsLabel.IsEnabled then + printlog " First row as label is enabled" + if FirstRowAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First row as label is not checked" + endif + else + warnlog "First row as label is disabled" + endif + '///Check if -First column as label- is enabled checked + printlog "Check if -First column as label- is enabled checked" + if FirstColumnAsLabel.IsEnabled then + printlog " First column as label is enabled" + if FirstColumnAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First column as label is not checked" + endif + else + warnlog "First column as label is disabled" + endif + '///Enter invalid range ChartFlexRange.A1:E + printlog "Enter invalid range ChartFlexRange.A1:E" + DataRange.SetText "ChartFlexRange.A1:E" + '///Check if -Data series in rows- is disabled + printlog "Check if -Data series in rows- is disabled" + Kontext "TabChartTypeDataRange" + if NOT Rows.IsEnabled then + printlog " Data series in rows is disabled" + else + warnlog "Data series in rows is enabled, but should be disabled" + endif + '///Check if -Data series in columns- is disabled + printlog "Check if -Data series in columns- is disabled" + if NOT Columns.IsEnabled then + printlog " Data series in columns is disabled" + else + warnlog "Data series in columns is enabled, but should be disabled" + endif + '///Check if -First row as label- is disabled + printlog "Check if -First row as label- is disabled" + if NOT FirstRowAsLabel.IsEnabled then + printlog " First row as label is disabled" + else + warnlog "First row as label is enabled, but should be disabled" + endif + '///Check if -First column as label- is disabled + printlog "Check if -First column as label- is disabled" + if NOT FirstColumnAsLabel.IsEnabled then + printlog " First Column as label is disabled" + else + warnlog "First Column as label is enabled, but should be disabled" + endif + '///Check that Back, Next and Finish does not work + printlog "Check that Back, Next and Finish does not work" + kontext "ChartWizard" + GoBack.Click + kontext "TabChartTypeDataRange" + if FirstColumnAsLabel.IsVisible then + printlog " Success: Back button does not work" + else + warnlog "Back button is not functionless" + Kontext "ChartWizard" + GoNext.Click + endif + '///Enter valid range ChartFlexRange.A1:E5 + printlog "Enter valid range ChartFlexRange.A1:E5" + kontext "TabChartTypeDataRange" + DataRange.SetText "ChartFlexRange.A1:E5" + '///Check if -Data series in rows- is enabled + printlog "Check if -Data series in rows- is enabled" + if Rows.IsEnabled then + printlog " Data series in rows is enabled" + else + warnlog "Data series in rows is disabled" + endif + '///Check if -Data series in columns- has been enabled and chosen + printlog "Check if -Data series in columns- has been enabled and chosen" + if Columns.IsEnabled then + printlog " Data series in columns is enabled" + if Columns.IsChecked then + printlog " and checked" + else + warnlog "Data series in columns is not checked" + endif + else + warnlog "Data series in rows is disabled" + endif + '///Check if -First row as label- is enabled and checked + printlog "Check if -First row as label- is enabled and checked" + if FirstRowAsLabel.IsEnabled then + printlog " First row as label is enabled" + if FirstRowAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First row as label is not checked" + endif + else + warnlog "First row as label is disabled" + endif + '///Check if -First column as label- is enabled checked + printlog "Check if -First column as label- is enabled and checked" + if FirstColumnAsLabel.IsEnabled then + printlog " First column as label is enabled" + if FirstColumnAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First column as label is not checked" + endif + else + warnlog "First column as label is disabled" + endif + '///Press Cancel button + printlog "Press Cancel button" + Kontext "ChartWizard" + ChartWizard.Cancel + '///Close document + printlog "Close document" + Call hCloseDocument + else + warnlog "It was not possible to open the test document." + endif +endcase +' +'------------------------------------------------------------------------- +' +testcase tDataSeriesWizardWriter + dim sInputFile as string + dim iDataSeries as integer + dim sDataRanges as string + dim sRangeFor as string + dim sCategories as string + sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange06.odt" ) + '///Open test document gTestToolPath/chart2/required/input/ch_flexrange06.odt + printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange06.odt" + if fOpenWriterTestDocumentAndInsertChart(sInputFile) then + '///Choose the Chart type area (should be the fourth in the top-down list) + printlog "Choose the Chart type area (should be the fourth in the top-down list)" + Kontext "ChartType" + if fSetChartType( "area" ) > 0 then + warnlog "Something went wrong setting chart type to area." + Kontext "ChartWizard" + ChartWizard.Cancel + call hCloseDocument + goto endsub + endif + Kontext "ChartWizard" + '/// Click Next button + GoNext.Click + '/// Click Next button + GoNext.Click + Kontext "TabChartTypeDataSeries" + if RangeFor.IsVisible then + printlog " Switching to tabpage was successfull" + else + warnlog "Switching to tabpage Data Series was not successfull" + goto endsub + endif + call DialogTest ( TabChartTypeDataSeries ) + '///Check if the data series listbox is enabled and contains four entries + printlog "Check if the data series listbox is enabled and contains four entries" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 4 then + printlog " All 4 data series are available" + else + warnlog "There are " & iDataSeries & " data series instead of 4" + endif + '///Check if the ADD button is enabled and click the button + printlog "Check if the ADD button is enabled and click the button" + if AddButton.IsEnabled then + printlog " ADD button is enabled" + AddButton.Click + else + warnlog "ADD button is not enabled" + endif + '///Check if there are now five entries in the data series listbox + printlog "Check if there are now five entries in the data series listbox" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 5 then + printlog " Adding a data series was successfull" + else + warnlog "There are " & iDataSeries & " data series instead of 5" + endif + '///Check if the new data series was added below the highlighted one + printlog "Check if the new data series was added below the highlighted one" + if DataSeries.GetSelIndex = 2 then + printlog " The new data series was inserted below the highlighted (first) one" + else + warnlog "The new dataseries was not inserted below the highlighted one" + endif + '///Check if the REMOVE button is enabled and click the button + printlog "Check if the REMOVE button is enabled and click the button" + if RemoveButton.IsEnabled then + printlog " REMOVE button is enabled" + RemoveButton.Click + else + warnlog "REMOVE button is not enabled" + endif + '///Check if there are now four entries in the data series listbox + printlog "Check if there are now four entries in the data series listbox" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 4 then + printlog " Removing a data series was successfull" + else + warnlog "There are " & iDataSeries & " data series instead of 4" + endif + '/// Select third entry + printlog "Select third entry" + DataSeries.Select(3) + if MoveUp.IsEnabled then + printlog " The MoveUp button is enabled" + '/// The Move Up button should be enabled + printlog "The Move Up button should be enabled" + '/// Click the Move Up button twice + printlog "Click the Move Up button twice" + MoveUp.Click + MoveUp.Click + else + warnlog "The MoveUp button is disabled" + endif + if DataSeries.GetSelIndex = 1 then + printlog " Moving data series was successfull" + if MoveUp.IsEnabled then + warnlog "MoveUp button is not disabled on first entry" + else + printlog " and MoveUp button is disabled on first enty" + endif + else + warnlog "Moving data series was not successfull" + endif + '/// Select second entry + printlog "Select second entry" + DataSeries.Select(2) + if MoveDown.IsEnabled then + printlog " The MoveDown button is enabled" + '/// If Move Down button is enabled + printlog "If Move Down button is enabled" + '/// Click Move Down button twice + printlog "Click Move Down button twice" + MoveDown.Click + MoveDown.Click + else + warnlog "The MoveDown button is disabled" + endif + if DataSeries.GetSelIndex = 4 then + printlog " Moving data series was successfull" + if MoveDown.IsEnabled then + warnlog "MoveDown button is not disabled on first entry" + else + printlog " and MoveDown button is disabled on first enty" + endif + else + warnlog "Moving data series was not successfull" + endif + '///Select first entry in Data Ranges + printlog "Select first entry in Data Ranges" + DataRanges.Select(1) + '///Verify that the range matches the one in edit field + printlog "Verify that the range matches the one in edit field" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + sRangeFor = RangeFor.GetText + if sDataRanges = sRangeFor then + printlog " Both ranges are matching" + else + warnlog "The ranges does not match: " & sDataRanges & sRangeFor + endif + '///Select second entry in Data Ranges + printlog "Select second entry in Data Ranges" + DataRanges.Select(2) + '///Check that the range in the edit field has changed, too + printlog "Check that the range in the edit field has changed, too" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + sRangeFor = RangeFor.GetText + if sDataRanges = sRangeFor then + printlog " Both ranges are matching" + else + warnlog "The ranges does not match" & sDataRanges & sRangeFor + endif + '///Change the range in edit field + printlog "Change the range in edit field" + RangeFor.SetText "ChartFlexRange.B2:B4" + '///Check that the range in Data Ranges has changed, too + printlog "Check that the range in Data Ranges has changed, too" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + if sDataRanges = "ChartFlexRange.B2:B4" then + printlog " The data range has also changed" + else + warnlog "The data range has not changed" + endif + '/// Set ChartFlexRange.A2:A4 as range for categories + printlog "Set ChartFlexRange.A2:A4 as range for categories" + Categories.SetText "ChartFlexRange.A2:A4" + sCategories = Categories.GetText + if sCategories = "ChartFlexRange.A2:A4" then + printlog " The range has been modified" + else + warnlog "Modifiing the range was not successfull" + endif + '///Enter invalid range ChartFlexRange.A2:A + printlog "Enter invalid range ChartFlexRange.A2:A" + Categories.SetText "ChartFlexRange.A2:A" + '///Check that the BACK button is disabled + printlog "Check that the BACK button does not work" + kontext "ChartWizard" + GoBack.Click + kontext "TabChartTypeDataSeries" + if Categories.IsVisible then + printlog " Success: Back button does not work" + else + warnlog "Back button is not functionless" + Kontext "ChartWizard" + GoNext.Click + endif + '///Enter valid range ChartFlexRange.A2:A5 + printlog "Enter valid range ChartFlexRange.A2:A5" + Categories.SetText "ChartFlexRange.A2:A5" + '///Press Cancel button + printlog "Press Cancel button" + Kontext "ChartWizard" + ChartWizard.Cancel + '///Close document + printlog "Close document" + Call hCloseDocument + else + warnlog "It was not possible to open the test document." + endif +endcase +' +'------------------------------------------------------------------------- +' +testcase tDataRangeDialogWriter + dim sDataRange as string + dim sInputFile as string + sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange07.odt") + '///Open test document gTestToolPath/chart2/required/input/ch_flexrange07.odt + printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange07.odt" + if fOpenTestDocumentAndSelectDataRange(sInputFile) then + '///Check data range in edit field (ChartFlexRange.A2:A3;ChartFlexRange.B1:E3) + printlog "Check data range in edit field" + Kontext "TabChartTypeDataRange" + sDataRange = DataRange.GetText + if sDataRange <> "ChartFlexRange.A2:A3;ChartFlexRange.B1:E3" then + warnlog "This is not the expected datarange, it is " & sDataRange & " but should be ChartFlexRange.A2:A3;ChartFlexRange.B1:E3" + else + printlog " Datarange is correct" + endif + '///Check if -Data series in columns- is enabled and chosen + printlog "Check if -Data series in columns- is enabled and chosen" + if Columns.IsEnabled then + printlog " Data series in columns is enabled" + if Columns.IsChecked then + printlog " and checked" + else + warnlog "Data series in columns is not checked" + endif + else + warnlog "Data series in columns is disabled" + endif + '///Check if -Data series in rows- is enabled + printlog "Check if -Data series in rows- is enabled" + if Rows.IsEnabled then + printlog " Data series in rows is enabled" + else + warnlog "Data series in rows is disabled" + endif + '///Check if -First row as label- is enabled and checked + printlog "Check if -First row as label- is enabled and checked" + if FirstRowAsLabel.IsEnabled then + printlog " First row as label is enabled" + if FirstRowAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First row as label is not checked" + endif + else + warnlog "First row as label is disabled" + endif + '///Check if -First column as label- is enabled and checked + printlog "Check if -First column as label- is enabled and checked" + if FirstColumnAsLabel.IsEnabled then + printlog " First column as label is enabled" + if FirstColumnAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First column as label is not checked" + endif + else + warnlog "First column as label is disabled" + endif + '///Enter invalid range ChartFlexRange.A1:E + printlog "Enter invalid range ChartFlexRange.A1:E" + DataRange.SetText "ChartFlexRange.A1:E" + '///Check that -Data series in rows- is disabled + printlog "Check that -Data series in rows- is disabled" + Kontext "TabChartTypeDataRange" + if NOT Rows.IsEnabled then + printlog " Data series in rows is disabled" + else + warnlog "Data series in rows is enabled, but should be disabled" + endif + '///Check that -Data series in columns- is disabled + printlog "Check that -Data series in columns- is disabled" + if NOT Columns.IsEnabled then + printlog " Data series in columns is disabled" + else + warnlog "Data series in columns is enabled, but should be disabled" + endif + '///Check if -First row as label- is disabled + printlog "Check if -First row as label- is disabled" + if NOT FirstRowAsLabel.IsEnabled then + printlog " First row as label is disabled" + else + warnlog "First row as label is enabled, but should be disabled" + endif + '///Check if -First column as label- is disabled + printlog "Check if -First column as label- is disabled" + if NOT FirstColumnAsLabel.IsEnabled then + printlog " First Column as label is disabled" + else + warnlog "First Column as label is enabled, but should be disabled" + endif + '///Check that OK button is disabled + printlog "Check that OK button is disabled" + try + Kontext "TabChartTypeDataRange" + TabChartTypeDataRange.OK + warnlog "The OK button is not disabled" + goto endsub + catch + printlog " The OK button is disabled" + endcatch + '///Enter valid range ChartFlexRange.A1:E3 + printlog "Enter valid range ChartFlexRange.A1:E3" + kontext "TabChartTypeDataRange" + DataRange.SetText "ChartFlexRange.A1:E3" + '///Check if -Data series in columns- is enabled and chosen + printlog "Check if -Data series in columns- is enabled and chosen" + if Columns.IsEnabled then + printlog " Data series in columns is enabled" + if Columns.IsChecked then + printlog " and checked" + else + warnlog "Data series in columns is not checked" + endif + else + warnlog "Data series in columns is disabled" + endif + '///Check if -Data series in rows- is enabled + printlog "Check if -Data series in rows- is enabled" + if Rows.IsEnabled then + printlog " Data series in rows is enabled" + else + warnlog "Data series in rows is disabled" + endif + '///Check if -First row as label- is enabled and checked + printlog "Check if -First row as label- is enabled and checked" + if FirstRowAsLabel.IsEnabled then + printlog " First row as label is enabled" + if FirstRowAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First row as label is not checked" + endif + else + warnlog "First row as label is disabled" + endif + '///Check if -First column as label- is enabled and checked + printlog "Check if -First column as label- is enabled and checked" + if FirstColumnAsLabel.IsEnabled then + printlog " First column as label is enabled" + if FirstColumnAsLabel.IsChecked then + printlog " and checked" + else + warnlog "First column as label is not checked" + endif + else + warnlog "First column as label is disabled" + endif + '///Press Cancel button + printlog "Press Cancel button" + Kontext "TabChartTypeDataRange" + TabChartTypeDataRange.Cancel + '///Close document + printlog "Close document" + Call hCloseDocument + else + warnlog "It was not possible to open the test document." + endif +endcase +' +'------------------------------------------------------------------------- +' +testcase tDataSeriesDialogWriter + dim sInputFile as string + dim iDataSeries as integer + dim sDataRanges as string + dim sRangeFor as string + dim sCategories as string + sInputFile = convertpath(gTestToolPath & "chart2/required/input/ch_flexrange08.odt") + + '/// Open test document gTestToolPath/chart2/required/input/ch_flexrange08.odt + printlog "Open test document gTestToolPath/chart2/required/input/ch_flexrange08.odt" + if fOpenTestDocumentAndSelectDataRange(sInputFile) then + Kontext + '/// Switching to tab page Data Series + printlog "Switching to tab page Data Series" + active.SetPage TabChartTypeDataSeries + Kontext "TabChartTypeDataSeries" + call DialogTest ( TabChartTypeDataSeries ) + '///Check if the data series listbox is enabled and contains four entries + printlog "Check if the data series listbox is enabled and contains four entries" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 4 then + printlog " One data serie is available" + else + warnlog "There are " & iDataSeries & " data series instead of four" + endif + '///Check if the ADD button is enabled and click the button + printlog "Check if the ADD button is enabled and click the button" + if AddButton.IsEnabled then + printlog " ADD button is enabled" + AddButton.Click + else + warnlog "ADD button is not enabled" + endif + '///Check if there are now five entries in the data series listbox + printlog "Check if there are now five entries in the data series listbox" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 5 then + printlog " Adding a data series was successfull" + else + warnlog "There are " & iDataSeries & " data series instead of five" + endif + '///Check if the new data series was added below the highlighted one + printlog "Check if the new data series was added below the highlighted one" + if DataSeries.GetSelIndex = 2 then + printlog " The new data series was inserted below the highlighted (first) one" + else + warnlog "The new dataseries was not inserted below the highlighted one" + endif + '///Check if the REMOVE button is enabled and click the button + printlog "Check if the REMOVE button is enabled and click the button" + if RemoveButton.IsEnabled then + printlog " REMOVE button is enabled" + RemoveButton.Click + else + warnlog "REMOVE button is not enabled" + endif + '///Check if there are now four entries in the data series listbox + printlog "Check if there are now four entries in the data series listbox" + iDataSeries = DataSeries.GetItemCount + if iDataSeries = 4 then + printlog " Removing a data series was successfull" + else + warnlog "There are " & iDataSeries & " data series instead of 4" + endif + '///Use UP button and verify that it it disabled on first entry + printlog "Use UP button and verify that it it disabled on first entry" + DataSeries.Select(2) + if MoveUp.IsEnabled then + printlog " The MoveUp button is enabled" + MoveUp.Click + else + warnlog "The MoveUp button is disabled" + endif + if DataSeries.GetSelIndex = 1 then + printlog " Moving data series was successfull" + if MoveUp.IsEnabled then + warnlog "MoveUp button is not disabled on first entry" + else + printlog " and MoveUp button is disabled on first enty" + endif + else + warnlog "Moving data series was not successfull" + endif + '///Use DOWN button thrice and verify that it is disabled on last entry + printlog "Use DOWN button thrice and verify that it is disabled on last entry" + DataSeries.Select(1) + if MoveDown.IsEnabled then + printlog " The MoveDown button is enabled" + MoveDown.Click + MoveDown.Click + MoveDown.Click + else + warnlog "The MoveDown button is disabled" + endif + if DataSeries.GetSelIndex = 4 then + printlog " Moving data series was successfull" + if MoveDown.IsEnabled then + warnlog "MoveDown button is not disabled on first entry" + else + printlog " and MoveDown button is disabled on first enty" + endif + else + warnlog "Moving data series was not successfull" + endif + '///Select first entry in Data Ranges + printlog "Select first entry in Data Ranges" + DataRanges.Select(1) + '///Verify that the range matches the one in edit field + printlog "Verify that the range matches the one in edit field" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + sRangeFor = RangeFor.GetText + if sDataRanges = sRangeFor then + printlog " Both ranges are matching" + else + warnlog "The ranges does not match: " & sDataRanges & sRangeFor + endif + '///Select second entry in Data Ranges + printlog "Select second entry in Data Ranges" + DataRanges.Select(2) + '///Check that the range in the edit field has changed,too + printlog "Check that the range in the edit field has changed,too" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + sRangeFor = RangeFor.GetText + if sDataRanges = sRangeFor then + printlog " Both ranges are matching" + else + warnlog "The ranges does not match" & sDataRanges & sRangeFor + endif + '///Change the range in edit field to ChartFlexRange.B2:B3 + printlog "Change the range in edit field to ChartFlexRange.B2:B3" + RangeFor.SetText "ChartFlexRange.B2:B3" + '///Check that the range in Data Ranges has changed, too + printlog "Check that the range in Data Ranges has changed, too" + 'GetSelText(line,column) is a new parameter since CWS:SRC680gh13 + 'Instead of 1,2 there must be 1,4 used becqause there are two invisible + 'label-columns in that treelist-box + sDataRanges = DataRanges.GetSelText (1,4) + if sDataRanges = "ChartFlexRange.B2:B3" then + printlog " The data range has also changed" + else + warnlog "The data range has not changed" + endif + '///Edit range for Categories (ChartFlexRange.A2:A3) + printlog "Edit range for Categories (ChartFlexRange.A2:A3)" + Categories.SetText "ChartFlexRange.A2:A3" + sCategories = Categories.GetText + if sCategories = "ChartFlexRange.A2:A3" then + printlog " The range has been modified" + else + warnlog "Modifiing the range was not successfull" + endif + '///Enter invalid range ChartFlexRange.A2:A + printlog "Enter invalid range ChartFlexRange.A2:A" + Categories.SetText "ChartFlexRange.A2:A" + '///Check that the OK button is disabled + printlog "Check that the OK button is disabled" + try + Kontext "TabChartTypeDataSeries" + TabChartTypeDataSeries.OK + warnlog "The OK button is not disabled" + goto endsub + catch + printlog " The OK button is disabled" + endcatch + '///Enter valid range ChartFlexRange.A2:A4 + printlog "Enter valid range ChartFlexRange.A2:A4" + kontext "TabChartTypeDataSeries" + Categories.SetText "ChartFlexRange.A2:A4" + '///Press Cancel button + printlog "Press Cancel button" + Kontext "TabChartTypeDataSeries" + TabChartTypeDataSeries.Cancel + '///Close document + printlog "Close document" + Call hCloseDocument + else + warnlog "It was not possible to open the test document." + endif +endcase +' +'------------------------------------------------------------------------- +' +function fOpenWriterTestDocumentAndInsertChart(sInputFile as STRING) as BOOLEAN + fOpenWriterTestDocumentAndInsertChart = FALSE + call hFileOpen(sInputFile) + sleep(2) + '///Menu Insert Object Chart to open chart wizard + printlog "Menu Insert Object Chart to open chart wizard" + InsertObjectChart + WaitSlot() + fOpenWriterTestDocumentAndInsertChart = TRUE +end function + diff --git a/testautomation/chart2/required/includes/ch2_format.inc b/testautomation/chart2/required/includes/ch2_format.inc new file mode 100755 index 000000000000..a2ef42d7c5e7 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_format.inc @@ -0,0 +1,1267 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_format.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@sun.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 +'* +'\************************************************************************ + +testcase tFormatObjectProperties + Dim iCountTabPg as integer + + iCountTabPg = 0 + +'///Dialog test after invoking Format::Object Properties... + '/// 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" + DocumentChart.TypeKeys "" , 3 + '/// Invoke Format::ObjectProperties + FormatObjectProperties + '/// Select tab page Aligment + Kontext + iCountTabPg = Active.GetPageCount + if iCountTabPg <> 7 then + warnlog "Edit::Properties on a data series should have 7 tab pages but has " & iCountTabPg & "." + else + printlog "Edit::Properties on a data series has 7 tab pages." + endif + Active.SetPage TabDataSeriesLabels + '/// Check if tab page series labels exists + Kontext "TabDataSeriesLabels" + call DialogTest ( TabDataSeriesLabels ) + '/// Close dialog with Cancel-button + TabDataSeriesLabels.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + else + warnlog "It was not possible to select the chart object!" + endif + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tFormatObjectPropertiesPieChart + Dim iCountTabPg as integer + + iCountTabPg = 0 + +'///Dialog test after invoking Format::Object Properties... on a pie chart + '/// 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 third object in Chart using TAB key (data series) + Kontext "DocumentChart" + DocumentChart.TypeKeys "" , 3 + '/// Invoke Format::ObjectProperties + FormatObjectProperties + '/// Select tab page Aligment + Kontext + iCountTabPg = Active.GetPageCount + if iCountTabPg <> 7 then + warnlog "Edit::Properties on a data series of a pie chart should have 7 tab pages but has " & iCountTabPg & "." + else + printlog "Edit::Properties on a data series on a pie chart has 7 tab pages." + endif + Active.SetPage TabChartPieOpetions + '/// Check if tab page Options exists + Kontext "TabChartPieOpetions" + call DialogTest ( TabChartPieOpetions ) + '/// Close dialog with Cancel-button + TabChartPieOpetions.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + else + warnlog "It was not possible to select the chart object!" + endif + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatPositonAndSize +'///Dialog test after invoking Format::PositionAndSize + '/// 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 "" + '/// 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 "" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatArrangement + QAErrorLog "#i63017# - Should be only enabled to sort data curves; testcase has to be designed." +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatTitleMaintitle +'///Dialog test after invoking Format::Title::MainTitle + '/// 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 "" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatTitleSubtitle +'///Dialog test after invoking Format::Title::Subtitle + '/// 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 +'///Dialog test after invoking Format::Title::X Axis Title + '/// 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 +'///Dialog test after invoking Format::Title::Y Axis Title + '/// 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 +'///Dialog test after invoking Format::Title::Z Axis Title + '/// 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 +'///Dialog test after invoking Format::Title::All Titles + '/// 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 "" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatAxisXAxis +'///Dialog test after invoking Format::Axis::X Axis + + + '/// 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 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 + '/// 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::X Axis + FormatAxisXAxis + '/// Goto tab page Line + Kontext + Active.SetPage TabFormatChartLine + '/// Check if tab page Line exists + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + + '/// 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 Label + Kontext + Active.SetPage TabChartAxisLabel + '/// Check if tab page Label exists + Kontext "TabChartAxisLabel" + call DialogTest ( TabChartAxisLabel ) + + '/// Goto tab page Scale + Kontext + Active.SetPage TabChartAxisScale + '/// Check if tab page Scale exists + Kontext "TabChartAxisScale" + call DialogTest ( TabChartAxisScale ) + + '/// Goto tab page Numbers + Kontext + Active.SetPage TabChartAxisNumbers + '/// Check if tab page Numbers exists + Kontext "TabChartAxisNumbers" + call DialogTest ( TabChartAxisNumbers ) + + '/// Close dialog + TabChartAxisNumbers.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument + + +endcase +'------------------------------------------------------------- +testcase tFormatAxisYAxis +'///Dialog test after invoking Format::Axis::Y Axis + + + '/// 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 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 + '/// 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::Y Axis + FormatAxisYAxis + '/// Goto tab page Characters + Kontext + Active.SetPage TabFont + '/// Check if tab page Characters exists + Kontext "TabFont" + call DialogTest ( TabFont ) + + '/// 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 ) + + '/// Goto tab page Font Effects + Kontext + Active.SetPage TabFontEffects + '/// Check if tab page Font Effects exists + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + + '/// Goto tab page Numbers + Kontext + Active.SetPage TabChartAxisNumbers + '/// Check if tab page Numbers exists + Kontext "TabChartAxisNumbers" + call DialogTest ( TabChartAxisNumbers ) + + '/// Goto tab page Scale + Kontext + Active.SetPage TabChartAxisScale + '/// Check if tab page Scale exists + Kontext "TabChartAxisScale" + call DialogTest ( TabChartAxisScale ) + + '/// Close dialog + TabChartAxisScale.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument + + +endcase + '------------------------------------------------------------- +testcase tFormatAxisZAxis +'///Dialog test after invoking Format::Axis::Z Axis + + + '/// 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 "" + Call hCloseDocument + + +endcase +'------------------------------------------------------------- +testcase tFormatAxisSecondaryXAxis +'///Dialog test after invoking Format::Axis::Secondary X Axis + + + '/// 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 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 + '/// 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::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" + '/// 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 + '/// 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 + + '/// Invoke Format::Axis::Secondary X Axis + FormatAxisSecondaryXAxis + '/// 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 Numbers + Kontext + Active.SetPage TabChartAxisNumbers + '/// Check if tab page Numbers exists + Kontext "TabChartAxisNumbers" + call DialogTest ( TabChartAxisNumbers ) + + '/// Goto tab page Line + Kontext + Active.SetPage TabFormatChartLine + '/// Check if tab page Line exists + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + + '/// Goto tab page Scale + Kontext + Active.SetPage TabChartAxisScale + '/// Check if tab page Scale exists + Kontext "TabChartAxisScale" + call DialogTest ( TabChartAxisScale ) + + '/// 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 "" + Call hCloseDocument + + +endcase +'------------------------------------------------------------- +testcase tFormatAxisSecondaryYAxis +'///Dialog test after invoking Format::Axis::Secondary Y Axis + + + '/// 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) + '/// 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" + '/// Check Secondary Y Axis Title + 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 + '/// 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 + + '/// Invoke Format::Axis::Secondary Y Axis + FormatAxisSecondaryYAxis + '/// Goto tab page Scale + Kontext + Active.SetPage TabChartAxisScale + '/// Check if tab page Scale exists + Kontext "TabChartAxisScale" + call DialogTest ( TabChartAxisScale ) + + '/// Goto tab page Characters + Kontext + Active.SetPage TabFont + '/// Check if tab page Characters exists + Kontext "TabFont" + call DialogTest ( TabFont ) + + '/// Goto tab page Numbers + Kontext + Active.SetPage TabChartAxisNumbers + '/// Check if tab page Numbers exists + Kontext "TabChartAxisNumbers" + call DialogTest ( TabChartAxisNumbers ) + + '/// 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 ) + + '/// Goto tab page Font Effects + Kontext + Active.SetPage TabFontEffects + '/// Check if tab page Font Effects exists + Kontext "TabFontEffects" + call DialogTest ( TabFontEffects ) + + '/// Close dialog + TabFontEffects.Cancel + '/// Close document + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument + + +endcase + +'------------------------------------------------------------- +testcase tFormatAxisAllAxes +'///Dialog test after invoking Format::Axis::All Axes + + + '/// 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 "" + Call hCloseDocument + + +endcase + diff --git a/testautomation/chart2/required/includes/ch2_format1.inc b/testautomation/chart2/required/includes/ch2_format1.inc new file mode 100755 index 000000000000..ea92f41d4536 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_format1.inc @@ -0,0 +1,826 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_format1.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@sun.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 +'///Dialog test after invoking Format::Grid::X Axis Main Grid + +'///
    + '///+
  • 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 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 + '///+
  • 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 Main Grid X Axis
  • + 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 + '///+
  • 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 Main Grid
  • + FormatGridXAxisMainGrid + '///+
  • Check if tab-page Line exists
  • + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + '///+
  • Close dialog
  • + TabFormatChartLine.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +'------------------------------------------------------------- +testcase tFormatYAxisMainGrid +'///Dialog test after invoking Format::Grid::Y Axis Main Grid + +'///
    + '///+
  • 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 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 + '///+
  • Invoke Format::Grid::Y Axis Main Grid
  • + FormatGridYAxisMainGrid + '///+
  • Check if tab-page Line exists
  • + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + '///+
  • Close dialog
  • + TabFormatChartLine.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +'------------------------------------------------------------- +testcase tFormatZAxisMainGrid +'///Dialog test after invoking Format::Grid::Z Axis Main Grid + +'///
    + '///+
  • 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 LINE
  • + 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 + '///+
  • Change Chart type Variant to #4 (3D Variant)
  • + 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 + '///+
  • 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 Main Grid Z Axis
  • + 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 + '///+
  • 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::Z Axis Main Grid
  • + FormatGridZAxisMainGrid + '///+
  • Check if tab-page Line exists
  • + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + '///+
  • Close dialog
  • + TabFormatChartLine.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatXAxisMinorGrid +'///Dialog test after invoking Format::Grid::X Axis Minor Grid + '/// 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 "" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatYAxisMinorGrid +'///Dialog test after invoking Format::Grid::Y Axis Minor Grid + +'///
    + '///+
  • 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 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 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 Y Axis
  • + 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 + '///+
  • 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::Y Axis Minor Grid
  • + FormatGridYAxisMinorGrid + '///+
  • Check if tab-page Line exists
  • + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + '///+
  • Close dialog
  • + TabFormatChartLine.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +' +'------------------------------------------------------------------------------- +' +testcase tFormatAllAxesGrids +'///Dialog test after invoking Format::Grid::All Grids + +'///
    + '///+
  • 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
  • + 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 + '///+
  • Change Chart type Variant to #4 (3D Variant)
  • + 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 + '///+
  • 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::Grid::All Grids
  • + FormatGridAllAxisGrids + '///+
  • Check if tab-page Line exists
  • + Kontext "TabFormatChartLine" + call DialogTest ( TabFormatChartLine ) + '///+
  • Close dialog
  • + TabFormatChartLine.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +'------------------------------------------------------------- +testcase tFormatLegend +'///Dialog test after invoking Format::Legend + +'///
    + '///+
  • 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 PIE
  • + 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 + '///+
  • 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::Legend
  • + FormatLegend + '///+
  • 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 Position
  • + Kontext + active.SetPage TabLegendPosition + '///+
  • Check if tab-page Alignment exists
  • + Kontext "TabLegendPosition" + call DialogTest ( TabLegendPosition ) + '///+
  • Close dialog
  • + TabLegendPosition.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +'------------------------------------------------------------- +testcase tFormatChartWall +'///Dialog test after invoking Format::Chart Wall + +'///
    + '///+
  • 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 Wall
  • + FormatChartWall + '///+
  • 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 ) + + '///+
  • Close dialog
  • + TabTransparency.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +'------------------------------------------------------------- +testcase tFormatChartFloor +'///Dialog test after invoking Format::Chart Floor + +'///
    + '///+
  • 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) + '///+
  • Convert chart to 3D (this will enable the Chart Floor)
  • + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + '///+
  • Invoke Format::Chart Floor
  • + FormatChartFloor + '///+
  • 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 Borders
  • + Kontext + active.SetPage TabFormatChartBorders + '///+
  • Check if tab-page Borders exists
  • + Kontext "TabFormatChartBorders" + call DialogTest ( TabFormatChartBorders ) + + '///+
  • Close dialog
  • + TabFormatChartBorders.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +'------------------------------------------------------------- +testcase tFormatChartArea +'///Dialog test after invoking Format::Chart Area + +'///
    + '///+
  • 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 Area
  • + FormatChartArea + '///+
  • 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 Area
  • + Kontext + active.SetPage TabArea + '///+
  • Check if tab-page Area exists
  • + Kontext "TabArea" + call DialogTest ( TabArea ) + + '///+
  • Close dialog
  • + TabArea.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +'------------------------------------------------------------- +testcase tFormatChartType +'///Dialog test after invoking Format::Chart Type + +'///
    + '///+
  • 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
  • + FormatChartType + '///+
  • Check if Chart Type dialog exists
  • + Kontext "ChartType" + call DialogTest ( ChartType ) + '///+
  • Change Chart type to LINE
  • + 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 + '///+
  • Invoke Smooth Lines Properties
  • + 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 + '///+
  • Check if the Smooth Line Properties dialog exists
  • + Kontext "SmoothLineProperties" + call DialogTest ( SmoothLineProperties ) + '///+
  • Close Smooth Lines Properties
  • + 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 + '///+
  • Close dialog
  • + Kontext "ChartType" + ChartType.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +'------------------------------------------------------------- +testcase tFormatDataRanges +'///Dialog test after invoking Format::Data Ranges + +'///
    + '///+
  • 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::Data Ranges
  • + FormatDataRanges + '///+
  • Goto tab-page Data Range
  • + Kontext + active.SetPage TabFormatDataRangesDataRange + '///+
  • Check if tab-page Data Range exists
  • + Kontext "TabFormatDataRangesDataRange" + call DialogTest ( TabFormatDataRangesDataRange ) + qaErrorLog "Implode dialog using range select button when feature is implemented" + + '///+
  • Goto tab-page Data Series
  • + Kontext + active.SetPage TabFormatDataRangesDataSeries + '///+
  • Check if tab-page Data Series exists
  • + Kontext "TabFormatDataRangesDataSeries" + call DialogTest ( TabFormatDataRangesDataSeries ) + MoveDown.Click + qaErrorLog "Implode dialog using range select button when feature is implemented" + + '///+
  • Close dialog
  • + TabFormatDataRangesDataSeries.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +'------------------------------------------------------------- +testcase tFormat3DView +'///Dialog test after invoking Format::3D View + +'///
    + '///+
  • 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) + '///+
  • Convert chart to 3D
  • + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + '///+
  • Invoke Format::3D View
  • + Format3DView + '///+
  • Goto tab-page Perspective
  • + Kontext + active.SetPage TabFormat3DViewGeometry + '///+
  • Check if tab-page Perspective exists
  • + Kontext "TabFormat3DViewGeometry" + call DialogTest ( TabFormat3DViewGeometry ) + + '///+
  • Goto tab-page Appearance
  • + Kontext + active.SetPage TabFormat3DViewAppearance + '///+
  • Check if tab-page Appearance exists
  • + Kontext "TabFormat3DViewAppearance" + call DialogTest ( TabFormat3DViewAppearance ) + + '///+
  • Goto tab-page Illumination
  • + Kontext + active.SetPage TabFormat3DViewIllumination + '///+
  • Check if tab-page Illumination exists
  • + Kontext "TabFormat3DViewIllumination" + call DialogTest ( TabFormat3DViewIllumination ) + '///+
  • Click Color select button
  • + ColorSelect.Click + '///+
  • Check if Color dialog exists
  • + Kontext "FarbeDLG" + call DialogTest ( FarbeDLG ) + '///+
  • Close dialog
  • + FarbeDLG.Cancel + Kontext "TabFormat3DViewIllumination" + + '///+
  • Click Ambient Light select button
  • + AmbientLightSelect.Click + '///+
  • Check if Color dialog exists
  • + Kontext "FarbeDLG" + call DialogTest ( FarbeDLG ) + '///+
  • Close dialog
  • + FarbeDLG.Cancel + + '///+
  • Close dialog
  • + Kontext "TabFormat3DViewIllumination" + TabFormat3DViewIllumination.Cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +'------------------------------------------------------------- +' + diff --git a/testautomation/chart2/required/includes/ch2_insert.inc b/testautomation/chart2/required/includes/ch2_insert.inc new file mode 100755 index 000000000000..68bab270d44d --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_insert.inc @@ -0,0 +1,299 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_insert.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@sun.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 +'///Dialog test after invoking Insert::Title + '/// 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 "" + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertAxes +'///Dialog test after invocation of Insert::Axes + '/// 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 "" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertGrids +'///Dialog test after invocation of Insert::Grids + '/// 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 "" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertLegend +'///Dialog test after invocation of Insert::Legend + '/// 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 "" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertDataLabels +'///Dialog test after invocation of Insert::Data Labels + '/// 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 "" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertTrendLines +'///Dialog test after invocation of Insert::TrendLines + '/// 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 fInvokeTrendLinesDialog() > 0 then + warnlog "Something went wrong trying to invoke Trend Lines dialog -> Check this out!" + Call hCloseDocument + goto endsub + endif + '/// Check existence of dialog + Kontext "InsertTrendlinesDialog" + Call DialogTest ( InsertTrendlinesDialog ) + '/// Quit dialog using Cancel button + InsertTrendlinesDialog.Cancel + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------------------- +' +testcase tInsertMeanValueLines +'///Testing Insert::MeanValueLines + '/// 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 +'///Dialog test after invocation of Insert::YErrorBars + '/// 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 "" + '/// Close document + Call hCloseDocument +endcase +' +'------------------------------------------------------------- +' +testcase tInsertSpecialCharacter + qaErrorLog "#125905# - Insert / SpecialCharacter doesn't work corrcetly in title dialog." +endcase + diff --git a/testautomation/chart2/required/includes/ch2_menu.inc b/testautomation/chart2/required/includes/ch2_menu.inc new file mode 100644 index 000000000000..bf151c8d78eb --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_menu.inc @@ -0,0 +1,237 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_menu.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@sun.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. + + '/// Close all document windows (File / Close) + Do Until GetDocumentCount = 0 + Call hCloseDocument + Loop + + '/// File / New / Spreadsheet + printlog "open a new spreadsheet" + call hNewDocument + + '/// Insert a Chart Object + 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 + '/// check if there are 21 items in the FILE menu. + printlog "check if there are 21 items in the FILE menu." + hMenuSelectNr(1) ' FILE + iCount = hMenuItemGetCount() + if (iCount <> 21 ) then + warnlog "There should be 21 items in the file menu but there are " + iCount + " items." + end if + call hMenuClose() ' close the FILE menu + + '/// check if there are 12 items in the FILE/NEW 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 + + '/// check if there are 8 items in the FILE/AUTOPILOT menu. + printlog "check if there are 8 items in the FILE/AUTOPILOT menu." + DocumentCalc.UseMenu + hMenuSelectNr(1) ' FILE + hMenuSelectNr(4) ' AUTOPILOT + iCount = hMenuItemGetCount() + if (gOOO) then + if (iCount <> 10) then + warnlog "There should 10 items in the FILE/AUTOPILOTS menu but there are " + iCount + " items." + end if + else + if (iCount <> 8) then + warnlog "There should 8 items in the FILE/AUTOPILOTS menu but there are " + iCount + " items." + end if + endif + call hMenuClose() + + '/// check if there are 5 items in the EDIT menu. + 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() + + '/// check if there are 4 items in the VIEW menu. + 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() + + '/// check if there are 4 items in the VIEW/TOOLBAR menu. + printlog "check if there are 4 items in the VIEW/TOOLBAR menu." + DocumentCalc.UseMenu + hMenuSelectNr(3) ' VIEW + hMenuSelectNr(1) ' TOOLBAR + iCount = hMenuItemGetCount() + if (iCount <> 4) then + warnlog "There should 4 items in the VIEW/TOOLBAR menu but there are " + iCount + " items." + end if + call hMenuClose() + + '/// check if there are 9 items in the INSERT menu. + printlog "check if there are 9 items in the INSERT menu." + DocumentCalc.UseMenu + hMenuSelectNr(4) + iCount = hMenuItemGetCount() + if (iCount <> 9) then + warnlog "There should 9 items in the INSERT menu but there are " + iCount + " items." + end if + call hMenuClose() + + + '/// check if there are 13 items in the FORMAT menu. + 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 + + '/// check if there are 2 items in the FORMAT/ARRANGEMENT menu. + printlog "check if there are 2 items in the FORMAT/ARRANGEMENT menu." + DocumentCalc.UseMenu + hMenuSelectNr(5) ' FORMAT + hMenuSelectNr(3) ' AXIS + iCount = hMenuItemGetCount() + if (iCount <> 2) then + warnlog "There should 2 items in the FORMAT/ARRANGEMENT menu but there are " + iCount + " items." + end if + + '/// check if there are 6 items in the FORMAT/AXIS menu. + printlog "check if there are 6 items in the FORMAT/AXIS menu." + DocumentCalc.UseMenu + hMenuSelectNr(5) ' FORMAT + hMenuSelectNr(5) ' AXIS + iCount = hMenuItemGetCount() + if (iCount <> 6) then + warnlog "There should 6 items in the FORMAT/AXIS menu but there are " + iCount + " items." + end if + + '/// check if there are 7 items in the FORMAT/GRID menu. + printlog "check if there are 7 items in the FORMAT/GRID menu." + DocumentCalc.UseMenu + hMenuSelectNr(5) ' FORMAT + hMenuSelectNr(6) ' GRID + iCount = hMenuItemGetCount() + if (iCount <> 7) then + warnlog "There should 7 items in the FORMAT/GRID menu but there are " + iCount + " items." + end if + + '/// check if there are 8 items in the FORMAT/TITLE menu. + 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 + + + '/// check if there are 13 items in the TOOLS menu. + printlog "check if there are 13 items in the TOOLS menu." + DocumentCalc.UseMenu + hMenuSelectNr(5) + iCount = hMenuItemGetCount() + if (iCount <> 13) then + warnlog "There should 13 items in the tools menu but there are " + iCount + " items." + end if + call hMenuClose() + + '/// check if there are 4 items in the TOOLS/MACRO menu. + 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() + + '/// check if there are 5 items in the WINDOW menu. + 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() + + '/// check if there are 5 or 6 items in the HELP menu. Depends on if it's a patched version + 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 <> 6 AND iCount <> 5 ) 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 100755 index 000000000000..cec750820d17 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_ole.inc @@ -0,0 +1,143 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_ole.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@sun.com +'* +'* short description : Chart resource test - section FILE +'* +'************************************************************************ +'* +' #1 tChartOLE +'* +'\************************************************************************ + +testcase tChartOLE ( sCurrentApplication as STRING ) +'///Chart as OLE in all applicable applications + 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 ("MASTERDOC") : sOutputFile = ( gOfficePath & ConvertPath("user\work\") & "tChartOLE_" & sCurrentApplication & ".odm" ) + case ("HTMLDOKUMENT") : 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 "" + 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 ("MASTERDOC") : call gMouseclick (99,99) + case ("HTMLDOKUMENT") : 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 100755 index 000000000000..9e0ab011c7f2 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_toolbars.inc @@ -0,0 +1,47 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_toolbars.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@sun.com +'* +'* short description : Chart resource test - section toolbars +'* +'************************************************************************ +'* +' #1 tdummyToolbar +'* +'\************************************************************************ + +testcase tdummyToolbar + QAErrorLog "Implement test for toolbar features when toolbars are ready" +endcase + diff --git a/testautomation/chart2/required/includes/ch2_view.inc b/testautomation/chart2/required/includes/ch2_view.inc new file mode 100755 index 000000000000..b502bdae49ac --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_view.inc @@ -0,0 +1,188 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_view.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@sun.com +'* +'* short description : Chart resource test - Menu VIEW +'* +'************************************************************************ +'* +' #1 tViewToolbars +' #1 tViewToolbarsCustomize +' #1 tViewFullScreen +'* +'\************************************************************************ + +testcase tViewToolbars + '///Check invocation of View::Toolbars::* + '/// 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 +'///Check Dialog after invocation of View::Toolbars::Customize + +'///
    + '///+
  • 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 + '///+
  • Invoke View::Toolbars::Customize
  • + ViewToolbarsCustomize + '///+
  • Change to Menus tab-page
  • + Kontext + Active.SetPage TabCustomizeMenu + '///+
  • Check existence of dialog
  • + Call DialogTest ( TabCustomizeMenu ) + '///+
  • Change to Keyboard tab-page
  • + Kontext + Active.SetPage TabTastatur + '///+
  • Check existence of dialog
  • + Call DialogTest ( TabTastatur ) + '///+
  • Change to Toolbars tab-page
  • + Kontext + Active.SetPage TabCustomizeToolbars + '///+
  • Check existence of dialog
  • + Call DialogTest ( TabCustomizeToolbars ) + '///+
  • Change to Events tab-page
  • + Kontext + Active.SetPage TabCustomizeEvents + '///+
  • Check existence of dialog
  • + Call DialogTest ( TabCustomizeEvents ) + '///+
  • Quit dialog
  • + TabCustomizeEvents.cancel + '///+
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +'------------------------------------------------------------- +testcase tViewFullScreen +'///Check invocation of View::Fullscren + +'///
    + '///+
  • 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 probably makes the test more risky)
  • + if NOT fConvertChartTo3D() then + warnlog "Conversion of chart to 3D failed -> Quit testcase" + Call hCloseDocument + goto endsub + endif + '///+
  • Invoke View::Fullscren
  • + ViewFullScreen + '///+
  • Quit fullscreen using CTRL+SHIFT+J
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + sleep (2) + '///+
  • Enter fullscreen using CTRL+SHIFT+J
  • + DocumentCalc.TypeKeys "" + '///+
  • Quit fullscreen using View::Fullscren
  • + ViewFullScreen + '///
  • Close document
  • + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + Call hCloseDocument +'///
+ +endcase +' +'----------------------------------------------------------- +' diff --git a/testautomation/chart2/required/includes/ch2_window.inc b/testautomation/chart2/required/includes/ch2_window.inc new file mode 100755 index 000000000000..08171219bbad --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_window.inc @@ -0,0 +1,69 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_window.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@sun.com +'* +'* short description : Chart resource test - Menu WINDOW +'* +'************************************************************************ +'* +' #1 tWindowNewWindowAndClose +'* +'\************************************************************************ + +testcase tWindowNewWindowAndClose +'///Test Window::New Window and Window::Close Window + +'///
    + '///+
  • 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 + sleep(2) + '///+
  • Invoke Window::New Window
  • + WindowNewWindow + '///+
  • Invoke Window::Close Window
  • + WindowCloseWindow + + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + '///+
  • Close document
  • /// + Call hCloseDocument +'///
+endcase + diff --git a/testautomation/chart2/required/includes/ch2_wizard.inc b/testautomation/chart2/required/includes/ch2_wizard.inc new file mode 100755 index 000000000000..98310d4c3544 --- /dev/null +++ b/testautomation/chart2/required/includes/ch2_wizard.inc @@ -0,0 +1,92 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: ch2_wizard.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-13 14:27:01 $ +'* +'* This file is part of OpenOffice.org. +'* +'* OpenOffice.org is free software: you can redistribute it and/or modify +'* it under the terms of the GNU Lesser General Public License version 3 +'* only, as published by the Free Software Foundation. +'* +'* OpenOffice.org is distributed in the hope that it will be useful, +'* but WITHOUT ANY WARRANTY; without even the implied warranty of +'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +'* GNU Lesser General Public License version 3 for more details +'* (a copy is included in the LICENSE file that accompanied this code). +'* +'* You should have received a copy of the GNU Lesser General Public License +'* version 3 along with OpenOffice.org. If not, see +'* +'* for a copy of the LGPLv3 License. +'* +'/************************************************************************ +'* +'* owner : joerg.sievers@sun.com +'* +'* short description : Create new Chart using the Wizard +'* +'************************************************************************ +'* +' #1 tCreateNewChart +'* +'\************************************************************************ + +testcase tCreateNewChart +'///Test creation of new chart using the Chart Wizard + 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 gTesttoolPath/chart2/required/input/spreadsheetFile.ods + call hFileOpen(sInputFile) + sleep(2) + '/// Save the document local gOfficepathuser/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 Chart Type page + Kontext "ChartType" + Call DialogTest ( ChartType ) + '/// Switch to the Data Range page using -key + Kontext "ChartWizard" + GoNext.Click + Kontext "TabChartTypeDataRange" + Call DialogTest ( TabChartTypeDataRange ) + '/// Switch to the Data Series page using Next >> button + Kontext "ChartWizard" + GoNext.Click + Kontext "TabChartTypeDataSeries" + Call DialogTest ( TabChartTypeDataSeries ) + '/// Switch to the Chart Elements page using Next >> button + Kontext "ChartWizard" + GoNext.Click + Kontext "TabChartTypeChartElements" + Call DialogTest ( TabChartTypeChartElements ) + '/// Create Chart using Finish button + Kontext "ChartWizard" + ChartWizard.OK + sleep(2) + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + '/// Close document + Call hCloseDocument +endcase + diff --git a/testautomation/chart2/required/input/basetable.sdc b/testautomation/chart2/required/input/basetable.sdc new file mode 100755 index 000000000000..82da646843d4 Binary files /dev/null and b/testautomation/chart2/required/input/basetable.sdc differ diff --git a/testautomation/chart2/required/input/basetable.sxc b/testautomation/chart2/required/input/basetable.sxc new file mode 100755 index 000000000000..cc42891cf6c6 Binary files /dev/null and b/testautomation/chart2/required/input/basetable.sxc differ diff --git a/testautomation/chart2/required/input/ch_flexrange01.ods b/testautomation/chart2/required/input/ch_flexrange01.ods new file mode 100755 index 000000000000..71bb586bb925 Binary files /dev/null and b/testautomation/chart2/required/input/ch_flexrange01.ods differ diff --git a/testautomation/chart2/required/input/ch_flexrange02.ods b/testautomation/chart2/required/input/ch_flexrange02.ods new file mode 100755 index 000000000000..e0121839998d Binary files /dev/null and b/testautomation/chart2/required/input/ch_flexrange02.ods differ diff --git a/testautomation/chart2/required/input/ch_flexrange03.ods b/testautomation/chart2/required/input/ch_flexrange03.ods new file mode 100755 index 000000000000..8c60082f143c Binary files /dev/null and b/testautomation/chart2/required/input/ch_flexrange03.ods differ diff --git a/testautomation/chart2/required/input/ch_flexrange04.ods b/testautomation/chart2/required/input/ch_flexrange04.ods new file mode 100755 index 000000000000..57562d9ba8f6 Binary files /dev/null and b/testautomation/chart2/required/input/ch_flexrange04.ods differ diff --git a/testautomation/chart2/required/input/ch_flexrange05.odt b/testautomation/chart2/required/input/ch_flexrange05.odt new file mode 100755 index 000000000000..9c753580640e Binary files /dev/null and b/testautomation/chart2/required/input/ch_flexrange05.odt differ diff --git a/testautomation/chart2/required/input/ch_flexrange06.odt b/testautomation/chart2/required/input/ch_flexrange06.odt new file mode 100755 index 000000000000..04d164a4754c Binary files /dev/null and b/testautomation/chart2/required/input/ch_flexrange06.odt differ diff --git a/testautomation/chart2/required/input/ch_flexrange07.odt b/testautomation/chart2/required/input/ch_flexrange07.odt new file mode 100755 index 000000000000..03206d618ad4 Binary files /dev/null and b/testautomation/chart2/required/input/ch_flexrange07.odt differ diff --git a/testautomation/chart2/required/input/ch_flexrange08.odt b/testautomation/chart2/required/input/ch_flexrange08.odt new file mode 100755 index 000000000000..cb02ee9efa2b Binary files /dev/null and b/testautomation/chart2/required/input/ch_flexrange08.odt differ diff --git a/testautomation/chart2/required/input/spreadsheetFile.ods b/testautomation/chart2/required/input/spreadsheetFile.ods new file mode 100755 index 000000000000..904b55bb5535 Binary files /dev/null and b/testautomation/chart2/required/input/spreadsheetFile.ods differ diff --git a/testautomation/chart2/required/input/verySimpleChart.ods b/testautomation/chart2/required/input/verySimpleChart.ods new file mode 100755 index 000000000000..50cb116a1b4a Binary files /dev/null and b/testautomation/chart2/required/input/verySimpleChart.ods differ -- cgit v1.2.3