From 192009e0282b015b07a872b3eac40454bfff4e2b Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Wed, 26 Aug 2009 09:55:20 +0000 Subject: CWS-TOOLING: integrate CWS fillednetchart 2009-07-22 17:48:07 +0200 oc r274255 : #i103584# new testcase for fillednetchart added 2009-07-22 17:42:41 +0200 oc r274254 : #i103584# Case 8 set to maximum 4 because of new fillednetchart 2009-07-13 17:29:40 +0200 iha r273946 : CWS-TOOLING: rebase CWS fillednetchart to trunk@273858 (milestone: DEV300:m52) 2009-07-03 15:04:36 +0200 dr r273704 : #i102667# import/export of filled radar charts 2009-07-03 09:50:28 +0200 dr r273680 : #i102677# import filled radar charts from MSOOXML 2009-06-11 18:21:05 +0200 iha r272896 : #i64752# filled net chart 2009-06-11 17:30:46 +0200 iha r272892 : #i64752# filled net chart 2009-06-11 17:07:11 +0200 iha r272889 : #i64752# filled net chart 2009-06-11 16:25:01 +0200 iha r272883 : #i64752# filled net chart 2009-06-11 16:15:10 +0200 iha r272878 : #i64752# filled net chart --- testautomation/chart2/optional/ch2_lvl1_wizard.bas | 2 + .../optional/includes/wizard/ch2_lvl1_wizard2.inc | 130 +++++++++++++++++++++ .../chart2/tools/ch_tools_chart_type.inc | 4 +- 3 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard2.inc diff --git a/testautomation/chart2/optional/ch2_lvl1_wizard.bas b/testautomation/chart2/optional/ch2_lvl1_wizard.bas index 4e96ca2d0819..cc0b1a8938e2 100755 --- a/testautomation/chart2/optional/ch2_lvl1_wizard.bas +++ b/testautomation/chart2/optional/ch2_lvl1_wizard.bas @@ -49,11 +49,13 @@ sub main use "chart2\tools\ch_tools_tab_pages.inc" use "chart2\tools\ch_tools_select.inc" use "chart2\optional\includes\wizard\ch2_lvl1_wizard.inc" + use "chart2\optional\includes\wizard\ch2_lvl1_wizard2.inc" Call hStatusIn ( "Chart2", "ch2_lvl1_wizard.bas" ) Call tCreateNew3DChart Call tCreateNewLineChart Call tCreateNewBubbleChart + Call tCreateNewFilledNetChart Call hStatusOut end sub diff --git a/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard2.inc b/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard2.inc new file mode 100644 index 000000000000..1fc47ae73662 --- /dev/null +++ b/testautomation/chart2/optional/includes/wizard/ch2_lvl1_wizard2.inc @@ -0,0 +1,130 @@ +'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_lvl1_wizard2.inc,v $ +'* +'* $Revision: 1.2 $ +'* +'* last change: $Author: obo $ $Date: 2008-07-22 10:36:56 $ +'* +'* 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 : oliver.craemer@sun.com +'* +'* short description : New chart types +'* +'************************************************************************ +'* +' #1 tCreateNewFilledNetChart ' Create a new filled netchart and check the preserved values +'* +'\************************************************************************ + +testcase tCreateNewFilledNetChart + Dim sInputFile as STRING + Dim sOutputFile as STRING + Dim sControlString as STRING + Dim iChartVariant as integer + Dim iChartVariantText as string + + + sInputFile = convertpath ( gTesttoolPath & "chart2/optional/input/randomData.ods" ) + sOutputFile = convertpath ( gOfficePath & "user/work/tCreateNewFilledChart.ods" ) + + + printlog "Load test document TesttoolPath/chart2/optional/input/randomData.ods" + call hFileOpen(sInputFile) + sleep(2) + printlog "Save document as OfficePath/user/work/tCreateNewFilledNetChart.ods" + if NOT hFileSaveAsWithFilterKill ( sOutputFile , "calc8" ) then + warnlog "Saving test document localy failed -> Aborting" + call hCloseDocument + goto endsub + endif + printlog "Insert / Chart" + InsertChart + sleep(5) + Kontext "ChartType" + if NOT ChartType.Exists(5) then + warnlog "Chart Wizard was not visible. EXITING!" + goto endsub + else + printlog "Chart Wizard visible." + end if + printlog "Choose the Chart type net (should be the eights in the top-down list)" + if fSetChartType( "net" ) > 0 then + warnlog "Something went wrong setting chart type to BAR." + endif + printlog "Select 4th chart variant from left (filled)" + if fSetChartTypeVariant( 4 ) > 0 then + warnlog "Something went wrong setting chart type VARIANT." + endif + printlog "Create Chart by clicking Finish-button" + Kontext "ChartWizard" + ChartWizard.OK + sleep(2) + printlog "File / Save" + FileSave + Kontext "DocumentCalc" + printlog "Press twice -key" + DocumentCalc.TypeKeys "" , 2 + printlog "File / Close document" + Call hCloseDocument + sleep(2) + printlog "Open saved file again" + call hFileOpen(sOutputFile) + sleep(2) + printlog "Open the Navigator (F5)" + printlog "Select the first OLE object in the Navigator" + call fSelectFirstOLE + printlog "Edit / Object / Edit to enter Inplace Mode" + EditObjectEdit + printlog "Format / Chart Type" + FormatChartType + Kontext "ChartType" + if ChartType.Exists(2) then + printlog "Check if chart type is NET CHART" + if ChooseType.GetSelIndex <> 8 then + warnlog "Selected chart type wasn't preserved after save and reload." + endif + printlog "Check if chart variant is Filled Net CHART (4th variant in non-CTL versions from the left)" + if Variant.GetSelIndex <> 4 then + warnlog "Selected chart type variant wasn't preserved after save and reload." + end if + printlog "Leave Chart Type dialog with Cancel" + Kontext "ChartType" + if ChartType.Exists(2) then + ChartType.Cancel + else + warnlog "ChartType dialog was not visible!?" + end if + else + warnlog "Chart Type dialog was not up!" + end if + printlog "Press ESCAPE button (deselecting the OLE object)" + Kontext "DocumentCalc" + DocumentCalc.TypeKeys "" + printlog "Close document" + Call hCloseDocument +endcase diff --git a/testautomation/chart2/tools/ch_tools_chart_type.inc b/testautomation/chart2/tools/ch_tools_chart_type.inc index 0ab824aef05f..1dd55c54c291 100644 --- a/testautomation/chart2/tools/ch_tools_chart_type.inc +++ b/testautomation/chart2/tools/ch_tools_chart_type.inc @@ -254,8 +254,8 @@ function fSetChartTypeVariant ( iChartTypeVariant as INTEGER ) as INTEGER iMaximumVariant = 3 endif case 7 : iMaximumVariant = 1 - case 4, 8 : iMaximumVariant = 3 - case 3, 5, 6, 9 : iMaximumVariant = 4 + case 4 : iMaximumVariant = 3 + case 3, 5, 6, 8 ,9 : iMaximumVariant = 4 case 10 : iMaximumVariant = 2 end select -- cgit