flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cframp...@apache.org
Subject svn commit: r1417139 [2/4] - in /incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid: ./ Assets/ Properties/ Properties/Assets/ Properties/Baselines/ SWFs/ SWFs/Assets/ Styles/ Styles/Baselines/
Date Tue, 04 Dec 2012 19:58:29 GMT
Added: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_columngroup.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_columngroup.mxml?rev=1417139&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_columngroup.mxml (added)
+++ incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_columngroup.mxml Tue Dec  4 19:58:21 2012
@@ -0,0 +1,454 @@
+<?xml version="1.0" encoding="utf-8"?>
+<UnitTester testDir="components/AdvancedDataGrid/Properties/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="AdvancedDataGridColumnGroupMain.mxml">
+
+    <!-- this set of lines form a template that must be in each unit test -->
+    <mx:Script>
+    <![CDATA[
+    public static function init(o:DisplayObject):void
+    {
+    }                   
+    ]]>
+    </mx:Script>
+    <mx:Metadata>
+    <![CDATA[
+        [Mixin]
+    ]]>
+    </mx:Metadata>  
+    <!-- end of set of lines that must be in each unit test -->
+    <mx:Script>
+    <![CDATA[
+    
+        import mx.collections.*;
+        import mx.controls.NumericStepper;
+        [Bindable]
+        private var ac:ArrayCollection = new ArrayCollection(); 
+        import mx.formatters.CurrencyFormatter;
+        import mx.styles.StyleManager;  
+        [Embed(source="Assets/horizontal_Separator_Skin.gif")]public var myhorskin:Class; 
+        import mx.controls.advancedDataGridClasses.*;
+        public var companies:AdvancedDataGridColumn = new AdvancedDataGridColumn("Company");
+        public  var quarters:AdvancedDataGridColumn = new AdvancedDataGridColumn("Quarter");
+        public  var india:AdvancedDataGridColumn = new AdvancedDataGridColumn("India");
+        public  var veeranistan:AdvancedDataGridColumn = new AdvancedDataGridColumn("Veeranistan");
+        public  var pareestan:AdvancedDataGridColumn = new AdvancedDataGridColumn("Pareestan");
+        public  var licenses:AdvancedDataGridColumn = new AdvancedDataGridColumn("Licenses");
+        public var countries:AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup();
+        public var toplevel:AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup();
+        [Bindable]
+                public var hierarch_data:Array = [ 
+        
+        { feature:"ADG", children:[ 
+                { feature:"ADG", subFeature:"Multi column sorting", startDate:{day:"Monday", Year:2007}, endDate:"1/07/07" },
+                { feature:"ADG", subFeature:"Custom rows", startDate:{day:"Monday", Year:2009}, endDate:"01/18/07" },
+                { feature:"ADG", subFeature:"Tree Views", startDate:{day:"Monday", Year:2006}, endDate:"01/29/07" }, 
+                { feature:"ADG", subFeature:"Collections", startDate:{day:"Monday", Year:2004},  endDate:"04/25/07" }
+        ] }
+        
+        ];
+
+        [Bindable]
+                private var mydata:ArrayCollection = new ArrayCollection ([
+                {Company:"Adobe", Quarter:1, India:"2 million", Veeranistan:"2 million", Pareestan:"3 million", Licenses:433764538},
+                {Company:"IBM", Quarter:1, India:"9 million", Veeranistan:"1 million", Pareestan:"5 million", Licenses:456789002},
+                {Company:"KaashifSoft", Quarter:1, India:"99 million", Veeranistan:"99 million", Pareestan:"99 million", Licenses:456712340},
+                {Company:"NisheetSoft", Quarter:1, India:"0 million", Veeranistan:"0 million", Pareestan:"0 million", Licenses:456782313},
+                {Company:"Microsoft", Quarter:1, India:"6 million", Veeranistan:"5 million", Pareestan:"6 million", Licenses:354216789},
+                {Company:"Satyam", Quarter:1, India:"1 million", Veeranistan:"3 million", Pareestan:"2 million", Licenses:325146789},
+                {Company:"Subex", Quarter:1, India:"2 million", Veeranistan:"9 million", Pareestan:"1 million", Licenses:321456978},
+                {Company:"Infosys", Quarter:1, India:"0.89 million", Veeranistan:"12 million", Pareestan:"4.5 million", Licenses:321475689},        
+                {Company:"MCAfee", Quarter:1, India:"3 million", Veeranistan:"5.98 million", Pareestan:"6.2 million", Licenses:321467589},
+                {Company:"MPhasis", Quarter:1, India:"2 million", Veeranistan:"1.5 million", Pareestan:"6.7 million", Licenses:123456789},
+                {Company:"Symphony", Quarter:1, India:"3.4 million", Veeranistan:"6.1 million", Pareestan:"7.8 million", Licenses:341256789},
+                {Company:"Wipro", Quarter:1, India:"5 million", Veeranistan:"2 million", Pareestan:"7 million", Licenses:321654789},
+                {Company:"Google", Quarter:1, India:"3 million", Veeranistan:"4 million", Pareestan:"1 million", Licenses:321458769 } ]);
+        
+        public function createColumnGroups():void {
+        
+        countries.headerText="Countries";
+        
+        toplevel.headerText="Top Level";
+                
+                var countriesarr:Array = new Array();
+                var toplevelarr:Array = new Array();
+                countriesarr.push(india);
+                countriesarr.push(pareestan);
+                countriesarr.push(veeranistan);
+                toplevelarr.push(quarters);
+                application.mydatagrid.dataProvider=mydata;
+                countries.children = countriesarr;
+                toplevelarr.push(countries);
+                toplevel.children=toplevelarr;
+        application.mydatagrid.groupedColumns=[companies, toplevel, licenses]; 
+        application.mydatagrid.dataProvider.refresh();
+        companies.dataField="Company";
+        quarters.dataField="Quarter";
+        licenses.dataField="Licenses";
+        }
+        
+        public function groupedData():void {
+        
+        var mygroup:GroupingCollection2 = new GroupingCollection2();
+        mygroup.source=mydata;
+        var group:Grouping = new Grouping();
+        group.fields = [new GroupingField("Company"), new GroupingField("Licenses")];
+        group.label = "Company";
+        mygroup.grouping = group; 
+        mygroup.refresh();
+        application.mydatagrid.dataProvider = mygroup;
+        application.mydatagrid.validateNow();
+        }
+        
+        public function insertColumns():void {
+        
+        var mycols:AdvancedDataGridColumn = new AdvancedDataGridColumn("ggg");
+                var mycolsarr:Array = application.mydatagrid.groupedColumns;
+                mycolsarr.push(mycols);
+        application.mydatagrid.groupedColumns = mycolsarr;
+        }
+        
+        public function insertColumngroups():void
+                 {
+                var mycolgroup:AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup();
+                mycolgroup.headerText = "topmost ";
+                var mycolsarr:Array = new Array(application.mydatagrid.groupedColumns[0]);
+                    mycolgroup.children = mycolsarr;            
+                    var tempCols:Array = application.mydatagrid.groupedColumns.slice(1,application.mydatagrid.groupedColumns.length); 
+                    application.mydatagrid.groupedColumns = [mycolgroup].concat(tempCols); 
+                    
+                }
+                
+                public function hierarchicaldata_setter():void {
+                    var hierarchs:HierarchicalData = new HierarchicalData();
+                hierarchs.source = hierarch_data;
+                    application.mydatagrid..dataProvider = hierarchs;
+                companies.dataField = "feature";    
+                quarters.dataField = "subFeature";
+                licenses.dataField = "endDate";
+                }
+                
+                public function vrHeight():void {
+                         
+                           for(var i:int=0;i<20;i++)
+                           {
+                             var rnd:* = Math.random();
+                             var obj:Object = {Company:"column-A0",Quarter:"column-B"+rnd,India:"column-C"+rnd,Veeranistan:"Column-D"+rnd,Pareestan:"Column-E"+rnd,Licenses:"Column-F"+rnd}
+                             ac.addItem(obj);
+                           }
+                           
+                             application.mydatagrid.dataProvider = ac;
+                             application.mydatagrid.variableRowHeight = true;
+                             application.mydatagrid.wordWrap = true;
+                            }
+                            
+                            public function headerRenderer():void {
+                            
+                            countries.headerRenderer = new ClassFactory(mx.controls.NumericStepper);
+                            toplevel.headerRenderer = new ClassFactory(mx.controls.TextArea);
+                            quarters.headerRenderer = new ClassFactory(mx.controls.TextInput);
+                            
+                            }
+                            
+                            public function customHeaderRenderer():void {
+                            
+                            toplevel.headerRenderer = new ClassFactory(myheads);
+                            
+                            }
+                            public function visibleColumns():void {
+                            
+                            toplevel.visible = false;
+                            }
+                            
+                            public function headerSkin():void {
+                            StyleManager.getStyleDeclaration("AdvancedDataGrid").setStyle("headerHorizontalSeparatorSkin",myhorskin);
+                            }
+                            public function myStyleFunction(data:Object,col:AdvancedDataGridColumn):Object          {
+                                   return { color:0xFF0000};
+                        }
+
+                            public function myFormatting():void {
+                            
+                            application.mydatagrid.styleFunction = myStyleFunction;
+                            mydata.refresh();
+                        var forms:CurrencyFormatter = new CurrencyFormatter();
+                        forms.currencySymbol = "$";
+                        createColumnGroups();
+                        licenses.formatter = forms;
+                        application.mydatagrid.dataProvider.refresh();
+
+                            }
+                            public function myColumnSpan():void {
+                            
+                                var renders:AdvancedDataGridRendererProvider = new AdvancedDataGridRendererProvider();      
+                                renders.column = companies;
+                                var renderarr:Array = new Array();
+                                renders.dataField = "Company";
+                                renders.columnSpan = 2;
+                                renders.renderer = new ClassFactory(mx.controls.NumericStepper);
+                                renderarr.push(renders);
+                        application.mydatagrid.rendererProviders = renderarr;
+                            
+                            }
+                            
+                            public function generateXML():void {
+                             
+                             application.mydatagrid.dataProvider = application.comps;
+                            }
+                            
+        ]]>
+    </mx:Script>
+    <testCases>
+    
+    <TestCase testID="use_grouped_data_mirroring" keywords="[Grouped_data_mirroring]">
+            <setup>
+            <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            <RunCode code="groupedData()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="application.mydatagrid.expandAll()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            </setup>
+            <body>
+            <WaitForEffectsToEnd />
+              <SetStyle styleName="layoutDirection" value="rtl" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+             <CompareBitmap target="mydatagrid" url="../Properties/Baselines/use_grouped_data_mirroring.png" timeout="5000"/>
+            
+            </body>
+            </TestCase>
+
+              
+                                                  
+    <!--
+            <TestCase testID="create_column_group" keywords="[dsdsf]">
+                <setup>
+                <RunCode code="createColumnGroups()" />
+                </setup>
+                <body>
+                 <WaitForEffectsToEnd />
+                <DispatchMouseEvent target="mydatagrid" type="mouseOver" stageX="230.65" stageY="125"/>
+                <WaitForEffectsToEnd />
+                <Pause timeout = "1000"/>
+                 <CompareBitmap target="mydatagrid" url="../Properties/Baselines/adg_columngroups.png"/>
+                </body>
+            </TestCase>
+            -->
+            <TestCase testID="use_grouped_data" keywords="[Grouped_data]">
+            <setup>
+            <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            <RunCode code="groupedData()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="application.mydatagrid.expandAll()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            </setup>
+            <body>
+            <WaitForEffectsToEnd />
+             
+            <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_groupedview_withcolgroups.png" timeout="5000"/>
+            </body>
+            </TestCase>
+            
+            <TestCase testID="set_editable_item" keywords="[Item editable]">
+            <setup>
+            <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete" /> 
+                        <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            <SetProperty target="mydatagrid" propertyName="editable" value="item" />
+            </setup>
+            <body>
+            <WaitForEffectsToEnd />
+            
+            <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_itemeditable_withcolgroups.png" timeout="5000"/>
+            <AssertPropertyValue target="mydatagrid" propertyName="editable" value="item"/>
+            </body>
+            </TestCase>
+            
+            
+            <TestCase testID="set_group_item" keywords="[group editable]">
+            <setup>
+              <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/> 
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            <RunCode code="groupedData()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                        <RunCode code="application.mydatagrid.expandAll()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+
+              <SetProperty target="mydatagrid" propertyName="editable" value="group" />
+            </setup>
+                <body>
+                <WaitForEffectsToEnd />
+                
+                <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_groupeditable_withcolgroups.png" timeout="5000"/>
+                <AssertPropertyValue target="mydatagrid" propertyName="editable" value="group"/>
+                </body>
+            </TestCase>
+            
+            <TestCase testID="set_both_editable" keywords="[both editable]">
+                <setup>
+                <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/> 
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" /><RunCode code="groupedData()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="application.mydatagrid.expandAll()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+
+                  <SetProperty target="mydatagrid" propertyName="editable" value="item group" />
+                </setup>
+                    <body>
+                    <WaitForEffectsToEnd />
+                    
+                    <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_groupeditable_withcolgroups.png" timeout="5000"/>
+                    <AssertPropertyValue target="mydatagrid" propertyName="editable" value="item group"/>
+                    </body>
+                </TestCase>
+
+            <TestCase testID="insert_columns" keywords="[insert columns]">
+            <setup>
+            <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            <RunCode code="insertColumns()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            </setup>
+            <body>
+            <WaitForEffectsToEnd />
+            
+            <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_insertcolumn_withcolgroups.png" timeout="5000"/>
+            </body>
+            </TestCase>
+            
+            <TestCase testID="insert_columngroup" keywords="[insert columns]">
+            <setup>
+            <RunCode code="insertColumngroups()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            </setup>
+            <body>
+            <WaitForEffectsToEnd />
+            
+            <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_insertcolumngroups.png" timeout="5000"/>
+            </body>
+            </TestCase>
+            
+            <TestCase testID="hierarchical_data" keywords="[hierarchical data]">
+            <setup>
+            <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            <RunCode code="hierarchicaldata_setter()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="application.mydatagrid.expandAll()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            </setup>
+            <body>
+            <WaitForEffectsToEnd />
+            
+                <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_hierarch_data_colgroups.png" timeout="5000"/>
+            </body>
+            </TestCase>
+            <!--
+            <TestCase testID="XML_DataProvider_setter" keywords="[XML Data]">
+            <setup>
+            <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            <RunCode code="generateXML()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            </setup>
+            <body>
+            <WaitForEffectsToEnd />
+            <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_hierarch_data_colgroups.png"/>
+            </body>
+            </TestCase>
+             -->
+            
+                 <TestCase testID="Row_Count_with_ColumnGroups" keywords="[RowCount]">
+                 <setup>
+                 <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+                 </setup>
+                 <body>
+                 <SetProperty propertyName="rowCount" value="2" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                 <WaitForEffectsToEnd />
+                 
+                  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_rowcount_withcolgroups.png" timeout="5000"/>
+                 </body>
+                 </TestCase>
+                 
+                                 
+               <!--  <TestCase testID="Header_horizontal_separator_skin" keywords="[Header horizontal separator skin]" >
+                 <setup>
+                 <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            <RunCode code="headerSkin()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+                 </setup>
+                 <body>
+                 <WaitForEffectsToEnd />
+                 
+                   <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_headerSkin_withcolgroups.png" timeout="5000"/>
+                 </body>
+                 </TestCase> -->
+                 
+                 <TestCase testID="Formatting_with_column_groups" keywords="[Formatters]">
+                 <setup>
+                 <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            <RunCode code="myFormatting()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+                 </setup>
+                 <body>
+                 <WaitForEffectsToEnd />
+                 
+                  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_formatting_withcolgroups.png" timeout="5000"/>
+                 </body>
+                 </TestCase>
+                 
+                 <TestCase testID="Column_Span" keywords="[ColumnSpan]">
+                 <setup>
+                 <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            <RunCode code="myColumnSpan()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+                 </setup>
+                 <body>
+                 <WaitForEffectsToEnd />
+                 
+                 <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_columnspanning_withcolgroups.png" timeout="5000"/>
+                 </body>
+            
+            </TestCase>
+            <!--
+            <TestCase testID="Variable_Row_Height" keywords="[VR Height]">
+            <setup>
+            <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            <RunCode code="vrHeight()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            </setup>
+            <body>
+                  <SetProperty propertyName="variableRowHeight" value="true" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                  <SetProperty propertyName="wordWrap" value="true" target="mydatagrid" />
+                  <WaitForEffectsToEnd />
+                  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_variablerowheight_wordwrap_withcolgroups.png"/>
+                 </body>
+                 </TestCase>
+                 
+                   -->   
+                 
+        <TestCase testID="Header_Renderer" keywords="[Header Renderer]">
+            <setup>
+                <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+                <RunCode code="headerRenderer()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            </setup>
+            <body>
+                <WaitForEffectsToEnd />
+                
+                <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_headerrenderer_withcolgroups.png" timeout="5000"/>
+            </body>
+            </TestCase>
+            
+            <TestCase testID="Custom_Header_Renderer" keywords="[Custom header renderer]">
+            <setup>
+                <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                <RunCode code="createColumnGroups()" />
+                <RunCode code="customHeaderRenderer()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+            </setup>
+            <body>
+                <WaitForEffectsToEnd />
+                
+                <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_customheaderrenderer_withcolgroups.png" timeout="5000"/>
+            </body>
+        </TestCase>
+                 
+        <TestCase testID="Visibility_of_columns" keywords="[Visiblity]">
+            <setup>
+                <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                <RunCode code="createColumnGroups()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+                <RunCode code="visibleColumns()" waitTarget="mydatagrid" waitEvent="updateComplete" />
+            </setup>
+            <body>
+                <WaitForEffectsToEnd />
+                
+                <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_visible_withcolgroups.png" timeout="5000"/>
+            </body>
+        </TestCase>
+    </testCases>
+</UnitTester>

Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_columngroup.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_columngroup.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties.mxml?rev=1417139&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties.mxml (added)
+++ incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties.mxml Tue Dec  4 19:58:21 2012
@@ -0,0 +1,614 @@
+<?xml version="1.0" encoding="utf-8"?>
+<UnitTester testDir="components/AdvancedDataGrid/Properties/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="AdvancedDataGridMain.mxml">
+
+	<!-- this set of lines form a template that must be in each unit test -->
+	<mx:Script>
+	<![CDATA[
+	public static function init(o:DisplayObject):void
+	{
+	}					
+	]]>
+	</mx:Script>
+	<mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+	</mx:Metadata>	
+	<!-- end of set of lines that must be in each unit test -->
+
+	<mx:Script>
+	<![CDATA[
+	import mx.controls.DateChooser;
+	import mx.controls.AdvancedDataGrid;
+	import mx.controls.advancedDataGridClasses.*
+	 import mx.collections.GroupingField;
+        import mx.collections.Grouping;
+	import mx.containers.Canvas;
+	import mx.styles.StyleManager;
+	import mx.managers.SystemManager;
+	import mx.collections.*;
+	public var mydatagrid:AdvancedDataGrid
+	public var mybox:Canvas;
+	public function genericCleanUp():void
+	{
+	 mydatagrid= stringToObject ("mydatagrid") as AdvancedDataGrid;
+	 mybox = stringToObject ("box") as Canvas;
+	 mybox = new Canvas();
+		mydatagrid = new AdvancedDataGrid();
+		
+		application.startIt();
+		
+	}
+	public function addItems():void
+	{
+	   for(var i:int=0;i<15;i++)
+	   {
+	      var obj:Object={col1:'one'+i,col2:i,col3:'three'+i}
+	      application.mydatagrid.dataProvider.addItem(obj);
+	   }
+	   
+	}
+        public function addBigItems():void
+        {
+           application.mydatagrid.height=250;
+            application.mydatagrid.dataProvider.removeAll()
+            var str1:String=" "
+            var str2:String="two two "
+            var str3:String=" "
+            var dummytext:String ="The Quick Brown Fox Jumped over the lazy dog"
+            for(var i:int=0;i<25;i++)
+            {
+                for(var j:int=0;j<5;j++)
+                {
+                   str1+=dummytext;
+                   str3+=dummytext;
+                }
+                var obj:Object = {col1:str1,col2:str2+i,col3:str3}
+                application.mydatagrid.dataProvider.addItem(obj);
+            }
+            trace(application.mydatagrid.rowHeight);
+        }
+        private function getItem():String
+        {
+           return application.mydatagrid.dataProvider.getItemAt(0).col2;
+        }
+        private function setWidth():void
+        {
+           application.mydatagrid.width=100;
+        }
+        private function showSelectedItem():void
+        {
+           application.ti.text= String(application.mydatagrid.editedItemPosition.columnIndex);
+        }
+        private function resetWidth():void
+        {
+           application.mydatagrid.horizontalScrollPolicy="off"
+           application.mydatagrid.width=250;
+           
+        }
+        private function getCurrentSelection():String
+        {
+           return String(application.mydatagrid.dataProvider.getItemAt(application.mydatagrid.selectedIndex).col2)
+        }
+        private function getCurrentSelections():String
+        {
+           var count:Number =0;
+               if(application.mydatagrid.dataProvider.getItemAt(application.mydatagrid.selectedIndices[0]).col2==3)
+              {
+                count++
+              }
+              if(application.mydatagrid.dataProvider.getItemAt(application.mydatagrid.selectedIndices[1]).col2==2)
+	      {
+	        count++
+              }
+              if(application.mydatagrid.dataProvider.getItemAt(application.mydatagrid.selectedIndices[2]).col2==0)
+	      {
+	        count++
+              }
+              
+           return String(count);
+        }
+        private function setSelectedIndices():void
+        {
+        
+           application.mydatagrid.selectedIndices=[1,3,4];
+        }
+        
+         public function startApp():void
+	{
+	  application.startIt();
+        }
+        private function changeColWidth():void
+        {
+          application.mydatagrid.columns[0].width=20
+          if(application.mydatagrid.columns[0].width==30)
+          {
+            application.ti.text="pass"
+          }
+        }
+        private function setEditedItemPosition():void
+        {
+          application.mydatagrid.editedItemPosition={rowIndex:1,columnIndex:1};
+        }
+        
+        private function setHSpos():void
+        {
+          application.mydatagrid.horizontalScrollPosition++;
+          if(application.mydatagrid.horizontalScrollPosition==1)
+          {
+            application.ti.text="pass";
+          }
+        }
+        private function addCols():void
+        {
+          var dgc:AdvancedDataGridColumn = new AdvancedDataGridColumn()
+          dgc.dataField="col1";
+          dgc.headerText = "new column1"
+          dgc.width=100
+          var dgc1:AdvancedDataGridColumn = new AdvancedDataGridColumn()
+	  dgc1.dataField="col1";
+	  dgc1.headerText = "new column2"
+          dgc1.width=100
+          application.mydatagrid.columns=[dgc,dgc1];
+        }
+        private function geteditorInstance():void
+        {
+          if(application.mydatagrid.editedItemRenderer!=null)
+	  {
+	     application.ti.text="pass";
+          }
+        }
+        private function getitemeditorinstance():void
+        {
+           if(application.mydatagrid.itemEditorInstance!=null)
+	   {
+	   	     application.ti.text="pass";
+           }
+        }
+        private function applyGrouping():void
+        {
+           var gc:GroupingCollection = new GroupingCollection();
+	   gc.source = application.mydatagrid.dataProvider;
+	   //gc.groupLabelField = "Group";
+	   var group:Grouping = new Grouping();
+	   group.fields = [new GroupingField("col1"), new GroupingField("col2")];
+	   gc.grouping = group;	   
+	  // application.mydatagrid.groupLabelField = "Group";
+	   application.mydatagrid.dataProvider = gc;
+        }
+        private function applyTreeView():void
+        {
+            var fs2:Object = 
+	   	       
+	   			   {fileName:"mxmxmxmxmxmxmxmxmxmxmxmxmxmxmxmxmxmxmxmxmxmxmxmx", Summary:"true", children: [
+	   
+	   			   {fileName: "utils", children: [
+	   
+	   			   {fileName: "StringUtil.as", Summary:"true", size:"5563  bytes", lastModified:"October 6, 2006", type:"File", attributes:"Read Only"},
+	   
+	   			   {fileName: "ArrayUtil.as", size:"2509  bytes", lastModified:"June 12, 2006", type:"File", attributes:"Read Only"}]},
+	   
+	   			   {fileName:"accessibility", size:"1724 bytes", lastModified:"October 6, 2006", Summary:"false", children: [
+	   
+	   			   {fileName:"DataGridAccImpl.as DataGridAccImpl.asDataGridAccImpl.asDataGridAccImpl.asDataGridAccImpl.asDataGridAccImpl.asDataGridAccImpl.asDataGridAccImpl.asDataGridAccImpl.asDataGridAccImpl.asDataGridAccImpl.as", size:"17045  bytes", lastModified:"November 2, 2006", type:"File", attributes:"Read Only"},
+	   
+	   			   {fileName:"AccImpl.as", Summary:"true", size:"7263 bytes", lastModified:"June 1, 2006", type:"File", attributes:"Read Only"}]},
+	   
+	   			   {fileName: "controls", children: [
+	   
+	   			   {fileName: "DataGrid.as", size:"169825  bytes", lastModified:"December 6, 2006", type:"File", attributes:"Read Only"},
+	   
+	   			   {fileName: "dataGridClasses", children: [
+	   
+	   		           {fileName: "DataGridItemRenderer.as", size:"18587  bytes", lastModified:"November 20, 2006", type:"File", attributes:"Read Only"},
+	   
+	   		           {fileName: "DataGridBase.as", size:"36419  bytes", lastModified:"December 6, 2006", type:"File", attributes:"Read Only"}]}]}
+	   
+	   
+	   
+		       ]};
+		       var hc:HierarchicalData = new HierarchicalData(fs2)
+		       application.mydatagrid.columns[0].dataField = "fileName"
+		       application.mydatagrid.columns[1].dataField = "size"
+		       application.mydatagrid.columns[2].dataField = "lastModified"
+		       //Force dataField change
+		       application.mydatagrid.dataProvider.refresh();
+		       application.mydatagrid.dataProvider= hc;
+        }
+        //Note to self
+        //resizable columns and sortableColumns are getter setter checks, revisit.
+       
+	]]>
+	</mx:Script>
+	
+	<testCases>
+	<!--
+	        
+			<TestCase testID="datagrid_own_properties_sortableColumns" keywords="[dsdsf]">
+                             <setup>
+			      <SetProperty target="mydatagrid" propertyName="enabled" value="false" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                              <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+                              
+                               <RunCode code="addItems()"/>
+                             </setup>
+                             <body>
+                                  
+                                  
+                                  <SetProperty target="mydatagrid" propertyName="sortableColumns" value="true" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                                  <DispatchMouseEvent target="mydatagrid" type="mouseOver" localX="72" localY="14"/>
+                                  <DispatchMouseEvent target="mydatagrid" type="mouseDown" localX="72" localY="14"/>
+                                  <DispatchMouseEvent target="mydatagrid" type="mouseUp" localX="72" localY="14"/>
+                                  <AssertMethodValue target="mydatagrid" method="value=getItem()" value="two"/>
+                                 <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+                                  <RunCode code="addItems()"/>
+                                  <SetProperty target="mydatagrid" propertyName="sortableColumns" value="false" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                                  <DispatchMouseEvent target="mydatagrid" type="mouseOver" localX="72" localY="14"/>
+			          <DispatchMouseEvent target="mydatagrid" type="mouseDown" localX="72" localY="14"/>
+                                  <DispatchMouseEvent target="mydatagrid" type="mouseUp" localX="72" localY="14"/>
+                                  <AssertMethodValue target="mydatagrid" method="value=getItem()" value="two"/>
+				   <SetProperty target="mydatagrid" propertyName="enabled" value="false" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                             </body>
+	                </TestCase>
+	-->                
+	            
+	                  
+	                  <TestCase testID="datagrid_own_properties_mincolumnwidth" keywords="[AdvancedDataGrid, sortableColumns, mouseOver,enabled, editable]">
+			      <setup>
+				
+				 <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+			     </setup>
+			     <body>
+				  <SetProperty target="mydatagrid" propertyName="minColumnWidth" value="30" waitTarget="mydatagrid" waitEvent="updateComplete" />
+				  <RunCode code="changeColWidth()"/>
+				  <AssertPropertyValue target="ti" propertyName="text" value="pass"/>
+			     </body>
+			  </TestCase> 
+	                   <TestCase testID="datagrid_own_properties_resizableColumns" keywords="[AdvancedDataGrid, sortableColumns, mouseOver,enabled, editable]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <SetProperty target="mydatagrid" propertyName="resizableColumns" value="false" />
+			     </setup>
+			     <body>
+				  <AssertPropertyValue target="mydatagrid" propertyName="resizableColumns" value="false"/>
+
+			     </body>
+                           </TestCase>
+			   <TestCase testID="datagrid_own_properties_sortableColumns" keywords="[AdvancedDataGrid, sortableColumns, mouseOver,enabled, editable]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <SetProperty target="mydatagrid" propertyName="sortableColumns" value="false" />
+			     </setup>
+			     <body>
+				  <AssertPropertyValue target="mydatagrid" propertyName="sortableColumns" value="false"/>
+
+			     </body>
+	                   </TestCase>
+			   <TestCase testID="datagrid_own_properties_horizontalScrollPosition" keywords="[AdvancedDataGrid, sortableColumns, mouseOver,enabled, editable]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <SetProperty target="mydatagrid" propertyName="horizontalScrollPolicy" value="on" />
+			     </setup>
+			     <body>
+				  <RunCode code="setHSpos()"/>
+				  <AssertPropertyValue target="ti" propertyName="text" value="pass"/>
+
+			     </body>
+			  </TestCase>
+			 <!--
+			   <TestCase testID="datagrid_own_properties_columns" keywords="[columns]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <RunCode code="addCols()"/>
+			     </setup>
+			     <body>
+			          <SetProperty target="mydatagrid" propertyName="selectedIndex" value="1" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                                  <Pause timeout="5000"/>
+                                  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_columns.png" timeout="5000"/>
+			     </body>
+			  </TestCase>
+			  -->
+			  <TestCase testID="datagrid_own_properties_editeditemrenderer" keywords="[editeditemrenderer]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <SetProperty target="mydatagrid" propertyName="editable" value="true"/>
+				  <RunCode code="setEditedItemPosition()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				
+			     </setup>
+			     <body>
+			          <RunCode code="geteditorInstance()"/>
+				  <AssertPropertyValue propertyName="text" target="ti" value="pass"/>
+				  <DispatchMouseClickEvent target="mydatagrid" localX="244" localY="14"/>
+			     </body>
+			  </TestCase>
+  
+			  <TestCase testID="datagrid_own_properties_itemEditorInstance" keywords="[itemeditorinstance]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <SetProperty target="mydatagrid" propertyName="editable" value="true"/>
+				  <RunCode code="setEditedItemPosition()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+
+			     </setup>
+			     <body>
+				  <RunCode code="getitemeditorinstance()"/>
+				  <AssertPropertyValue propertyName="text" target="ti" value="pass"/>
+				  <DispatchMouseClickEvent target="mydatagrid" localX="244" localY="14"/>
+			     </body>
+			  </TestCase>
+			
+	                  
+			  
+			  <TestCase testID="datagrid_own_properties_draggablecolumns_true" keywords="[draggablecolumns]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <SetProperty target="mydatagrid" propertyName="draggableColumns" value="true"/>
+				  
+
+			     </setup>
+			     <body>
+			    
+			          <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_draggablecolumns_state1.png" timeout="5000"/>
+			          <DispatchMouseEvent target="mydatagrid" type="mouseDown" localX="244" localY="14"/>
+			          
+			          <DispatchMouseEvent target="mydatagrid" type="mouseMove" buttonDown="true" localX="150" localY="14"/>
+			         
+				  <DispatchMouseEvent target="mydatagrid" type="mouseMove" buttonDown="true" localX="112" localY="14"/>
+				 
+				  <DispatchMouseEvent target="mydatagrid" type="mouseMove" buttonDown="true" localX="87" localY="14"/>
+				  
+				  <DispatchMouseEvent target="mydatagrid" type="mouseUp" buttonDown="true" localX="87" localY="14"/>
+				  <Pause timeout="5000"/>
+				  
+				  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_draggablecolumns_state2.png" timeout="5000"/>
+				  
+			     </body>
+			  </TestCase>
+			 
+			  <TestCase testID="datagrid_own_properties_draggablecolumns_false" keywords="[draggablecolumns_false]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <SetProperty target="mydatagrid" propertyName="draggableColumns" value="false"/>
+
+
+			     </setup>
+			     <body>
+			        
+				  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_draggablecolumns_false_state1.png"/>
+				  <DispatchMouseEvent target="mydatagrid" type="mouseDown" localX="244" localY="14"/>
+
+				  <DispatchMouseEvent target="mydatagrid" type="mouseMove" buttonDown="true" localX="150" localY="14"/>
+
+				  <DispatchMouseEvent target="mydatagrid" type="mouseMove" buttonDown="true" localX="112" localY="14"/>
+
+				  <DispatchMouseEvent target="mydatagrid" type="mouseMove" buttonDown="true" localX="87" localY="14"/>
+
+				  <DispatchMouseEvent target="mydatagrid" type="mouseUp" buttonDown="true" localX="87" localY="14"/>
+				  <Pause timeout="100"/>
+				  <Pause timeout="5000"/>
+				  <CompareBitmap timeout="5000" target="mydatagrid" url="../Properties/Baselines/datagrid_draggablecolumns_false_state2.png"/>
+
+			     </body>
+			  </TestCase>
+			  <TestCase testID="datagrid_own_properties_applygrouping" keywords="[applygrouping]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <RunCode code="applyGrouping()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+
+
+			     </setup>
+			     <body>
+				  <Pause timeout="5000"/>
+				  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_groupedview.png" timeout="5000"/>
+				  
+
+			     </body>
+			  </TestCase>
+			  <TestCase testID="datagrid_own_properties_treeview" keywords="[TDG view]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <RunCode code="applyTreeView()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+
+
+			     </setup>
+			     <body>
+                                  <Pause timeout="5000"/>
+				 <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_treeview.png" timeout="5000"/>
+
+			     </body>
+			  </TestCase>
+			  
+			  <TestCase testID="datagrid_own_properties_selectionMode_flat_single" keywords="[selectionMode flat single cell]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				
+                                  <SetProperty target="mydatagrid" propertyName="selectionMode" value="singleCell"/>
+
+			     </setup>
+			     <body>
+                                  <DispatchMouseClickEvent target="mydatagrid" localX="244" localY="35"/>
+                                  <Pause timeout="5000"/>
+				 <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_singlecellselection.png" timeout="5000"/>
+
+			     </body>
+			  </TestCase>
+			 
+			<TestCase testID="datagrid_own_properties_selectionMode_flat_multiple" keywords="[selectionMode flat multiple cell]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+
+				    <SetProperty target="mydatagrid" propertyName="selectionMode" value="multipleCells"/>
+
+			     </setup>
+			     <body>
+				    <DispatchMouseClickEvent target="mydatagrid" localX="244" localY="35"/>
+				    <DispatchKeyEvent keys="['DOWN','SPACE']"/>
+				    <Pause timeout="5000"/>
+				 <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_multicellselection.png" timeout="5000"/>
+
+			     </body>
+			  </TestCase>
+			 
+			 <TestCase testID="datagrid_own_properties_selectionMode_tree_singlecell" keywords="[selectionMode tree single cell]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <RunCode code="applyTreeView()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <RunCode code="application.mydatagrid.expandAll()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+
+				    <SetProperty target="mydatagrid" propertyName="selectionMode" value="singleCell"/>
+
+			     </setup>
+			     <body>
+				    <DispatchMouseClickEvent target="mydatagrid" localX="100" localY="35"/>
+				   
+				    <Pause timeout="5000"/>
+				 <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_tree_singlecellselection.png" timeout="5000"/>
+
+			     </body>
+			  </TestCase>			    
+                         <TestCase testID="datagrid_own_properties_selectionMode_tree_multicells" keywords="[selectionMode tree single cell]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <RunCode code="applyTreeView()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <RunCode code="application.mydatagrid.expandAll()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+
+				    <SetProperty target="mydatagrid" propertyName="selectionMode" value="multipleCells"/>
+
+			     </setup>
+			     <body>
+				    <DispatchMouseClickEvent target="mydatagrid" localX="100" localY="35"/>
+                                    <DispatchKeyEvent keys="['DOWN','SPACE']"/>
+				    <Pause timeout="5000"/>
+				    <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_tree_multicellselection.png" timeout="5000"/>
+
+			     </body>
+			  </TestCase>
+			   
+	                 <TestCase testID="datagrid_own_properties_selectionMode_tree_displayitemsexpanded" keywords="[displayitemsexpanded]">
+			      <setup>
+
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        
+				  <RunCode code="startApp()"/>
+				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <RunCode code="applyTreeView()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+			
+
+				    <SetProperty target="mydatagrid" propertyName="displayItemsExpanded" value="true"/>
+
+			     </setup>
+			     <body>
+				    
+				    <Pause timeout="5000"/>
+				    <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_tree_displayitemsexpanded.png" timeout="5000"/>
+
+			     </body>
+			  </TestCase>
+			    <!--  
+			-->
+			  <!--
+			  <TestCase testID="datagrid_own_properties_editedItemPosition" keywords="[AdvancedDataGrid, sortableColumns, mouseOver,enabled, editable]">
+			  			      <setup>
+			  
+			  				 <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid"/>				        <RunCode code="startApp()"/>
+			  				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+			  			     </setup>
+			  			     <body>
+			  				  <SetProperty target="mydatagrid" propertyName="editable" value="true" />
+			  				  <RunCode code="setEditedItemPosition()"/>
+			  				  <Pause timeout="100"/>
+			  				  <WaitForEffectsToEnd />
+			  				  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_editeditempos.png"/>
+			  				<DispatchMouseClickEvent target="mydatagrid" localX="244" localY="14"/>
+			  				  
+			  			     </body>
+			  </TestCase> 
+			  
+			  	                <TestCase testID="datagrid_own_properties_editable" keywords="[AdvancedDataGrid, sortableColumns, mouseOver,enabled, editable]">
+			  			      <setup>
+			  				   <SetProperty target="mydatagrid" propertyName="enabled" value="false" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+			  				 <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+			  				  <RunCode code="addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+			  			     </setup>
+			  			     <body>
+			  			          <SetProperty target="mydatagrid" propertyName="editable" value="true" />
+			  			          <DispatchMouseEvent target="mydatagrid" type="mouseOver" localX="26" localY="36"/>
+			  			          <DispatchMouseEvent target="mydatagrid" type="mouseDown" localX="26" localY="36"/>
+			  			          <DispatchMouseEvent target="mydatagrid" type="mouseUp" localX="26" localY="36" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+			  			          <RunCode code="showSelectedItem()"/>
+			  			          <AssertPropertyValue target="ti" propertyName="text" value="0"/>
+			  			          
+			  			     </body>
+			  			  </TestCase> 
+			  			  
+			  			  <TestCase testID="datagrid_own_properties_horizontalScrollPosition" keywords="[AdvancedDataGrid, sortableColumns, mouseOver,enabled, horizontalScrollPosition]">
+			  			      <setup>
+			  				   <SetProperty target="mydatagrid" propertyName="enabled" value="false" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+			  				 <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+			  				  <RunCode code="addItems()"/>
+			  				  <RunCode code="setWidth()"/>
+			  				  
+			  			     </setup>
+			  			     <body>
+			  			         <SetProperty target="mydatagrid" propertyName="editable" value="false" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+			  			          <DispatchMouseEvent target="mydatagrid" type="mouseOver" localX="72" localY="14"/>
+			  				  <DispatchMouseEvent target="mydatagrid" type="mouseDown" localX="72" localY="14"/>
+			                                    <DispatchMouseEvent target="mydatagrid" type="mouseUp" localX="72" localY="14"/>
+			  			          <SetProperty target="mydatagrid" propertyName="horizontalScrollPolicy" value="on"/>
+			  			          <SetProperty target="mydatagrid" propertyName="horizontalScrollPosition" value="2"/>
+			  			          <SetProperty target="mydatagrid" propertyName="editable" value="true"/>
+			  			          
+			  			          <DispatchMouseEvent target="mydatagrid" type="mouseOver" localX="26" localY="36"/>
+			  				  <DispatchMouseEvent target="mydatagrid" type="mouseDown" localX="26" localY="36"/>
+			  			          <DispatchMouseEvent target="mydatagrid" type="mouseUp" localX="26" localY="36" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+			  			           <RunCode code="showSelectedItem()"/>
+			  			          <AssertPropertyValue target="ti" propertyName="text" value="2"/>
+			  			          <RunCode code="resetWidth()"/>
+			  				   <SetProperty target="mydatagrid" propertyName="enabled" value="false" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+			  			         
+			  			     </body>
+	                  </TestCase>
+			  -->
+			 
+			  
+		
+	</testCases>                
+	     
+</UnitTester>

Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties_scrollcontrolbase.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties_scrollcontrolbase.mxml?rev=1417139&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties_scrollcontrolbase.mxml (added)
+++ incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties_scrollcontrolbase.mxml Tue Dec  4 19:58:21 2012
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="utf-8"?>
+<UnitTester testDir="components/AdvancedDataGrid/Properties/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="AdvancedDataGridMain.mxml">
+
+	<!-- this set of lines form a template that must be in each unit test -->
+	<mx:Script>
+	<![CDATA[
+	public static function init(o:DisplayObject):void
+	{
+	}					
+	]]>
+	</mx:Script>
+	<mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+	</mx:Metadata>	
+	<!-- end of set of lines that must be in each unit test -->
+
+	<mx:Script>
+	<![CDATA[
+	import mx.controls.DateChooser;
+	import mx.controls.AdvancedDataGrid;
+	import mx.containers.Canvas;
+	import mx.styles.StyleManager;
+	import mx.managers.SystemManager;
+	public var mydatagrid:AdvancedDataGrid
+	public var mybox:Canvas;
+	public function genericCleanUp():void
+	{
+	 mydatagrid= stringToObject ("mydatagrid") as AdvancedDataGrid;
+	 mybox = stringToObject ("box") as Canvas;
+	 mybox = new Canvas();
+		mydatagrid = new AdvancedDataGrid();
+		
+		application.startIt();
+		
+	}
+	public function addItems():void
+	{
+	   for(var i:int=0;i<15;i++)
+	   {
+	      var obj:Object={col1:'one'+i,col2:i,col3:'three'+i}
+	      application.mydatagrid.dataProvider.addItem(obj);
+	   }
+	   
+	}
+        public function addBigItems():void
+        {
+           application.mydatagrid.height=250;
+            application.mydatagrid.dataProvider.removeAll()
+            var str1:String=" "
+            var str2:String="two two "
+            var str3:String=" "
+            var dummytext:String ="The Quick Brown Fox Jumped over the lazy dog"
+            for(var i:int=0;i<25;i++)
+            {
+                for(var j:int=0;j<5;j++)
+                {
+                   str1+=dummytext;
+                   str3+=dummytext;
+                }
+                var obj:Object = {col1:str1,col2:str2+i,col3:str3}
+                application.mydatagrid.dataProvider.addItem(obj);
+            }
+          
+        }
+          public function startApp():void
+          {
+		      application.startIt();
+     	   }
+     	   
+     	   public function vscroll():void
+     	   {
+     	      application.mydatagrid.verticalScrollPosition++;
+     	   }
+     	   
+     	   //Notes to self
+     	   //showScrollTip is just getter setter, revisit.
+     	   //LiveScrolling test now is only getter setter - Requires attn
+
+	]]>
+	</mx:Script>
+	
+	<testCases>
+
+		      <TestCase testID="propert_vscrollposition">
+			      <setup>
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()"/>	
+				  
+			     </setup>
+			     <body>
+				  <SetProperty propertyName="verticalScrollPosition" value="2" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <RunCode code="vscroll()"/>
+				  <AssertPropertyValue target="mydatagrid" propertyName="verticalScrollPosition" value="1"/>
+				  <Pause timeout="5000"/>
+				  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_verticalscrollposition.png" timeout="5000"/>
+			     </body>
+	              </TestCase>
+	             
+	              <TestCase testID="propert_vscrollpolicy_off">
+			      <setup>
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()"/>	
+
+			     </setup>
+			     <body>
+				  <SetProperty propertyName="verticalScrollPolicy" value="off" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                                  <Pause timeout="5000"/>
+				  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_verticalscrollpolicy.png" timeout="5000"/>
+			     </body>
+	              </TestCase>
+	              
+	              <TestCase testID="propert_vscrollpolicy_on">
+			      <setup>
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()"/>	
+
+			     </setup>
+			     <body>
+				  <SetProperty propertyName="verticalScrollPolicy" value="on" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                                  <Pause timeout="5000"/>
+				  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_verticalscrollpolicy_on.png" timeout="5000"/>
+			     </body>
+	              </TestCase>
+	               <TestCase testID="propert_vscrollpolicy_auto">
+			      <setup>
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()"/>	
+
+			     </setup>
+			     <body>
+				  <SetProperty propertyName="verticalScrollPolicy" value="auto" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                                   <Pause timeout="5000"/>
+				  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_verticalscrollpolicy_auto.png" timeout="5000"/>
+			     </body>
+	              </TestCase>
+	              
+	              <TestCase testID="propert_showscrolltips_true">
+			      <setup>
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()"/>	
+
+			     </setup>
+			     <body>
+				  <SetProperty propertyName="showScrollTips" value="true" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+                                  <AssertPropertyValue target="mydatagrid" propertyName="showScrollTips" value="true"/>
+			
+			     </body>
+	              </TestCase>
+	              <TestCase testID="propert_showscrolltips_false">
+			      <setup>
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()"/>	
+
+			     </setup>
+			     <body>
+				  <SetProperty propertyName="showScrollTips" value="false" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+			          <AssertPropertyValue target="mydatagrid" propertyName="showScrollTips" value="false"/>
+
+			     </body>
+	              </TestCase>
+	              
+	              
+	              <TestCase testID="propert_livescrolling_true">
+			      <setup>
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()"/>	
+
+			     </setup>
+			     <body>
+				  <SetProperty propertyName="liveScrolling" value="true" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <AssertPropertyValue target="mydatagrid" propertyName="liveScrolling" value="true"/>
+ 
+			     </body>
+	              </TestCase>
+	              <TestCase testID="propert_livescrolling_false">
+			      <setup>
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()"/>	
+
+			     </setup>
+			     <body>
+				  <SetProperty propertyName="liveScrolling" value="false" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <AssertPropertyValue target="mydatagrid" propertyName="liveScrolling" value="false"/>
+
+			     </body>
+	              </TestCase>
+	              <!--
+	               <TestCase testID="propert_hscrollpolicy_auto">
+			      <setup>
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()"/>	
+
+			     </setup>
+			     <body>
+				  <SetProperty propertyName="horizontalScrollPolicy" value="auto" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <Pause timeout="5000"/>
+				  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_horizontalscrollpolicy_auto.png" timeout="5000"/>
+			     </body>
+	              </TestCase>-->
+	              <TestCase testID="propert_hscrollpolicy_on">
+			      <setup>
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()"/>	
+
+			     </setup>
+			     <body>
+				  <SetProperty propertyName="horizontalScrollPolicy" value="on" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <Pause timeout="5000"/>
+				  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_horizontalscrollpolicy_on.png" timeout="5000"/>
+			     </body>
+	              </TestCase>
+	              <TestCase testID="propert_hscrollpolicy_off">
+			      <setup>
+				  <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>				        <RunCode code="startApp()"/>
+				  <RunCode code="addItems()"/>	
+
+			     </setup>
+			     <body>
+				  <SetProperty propertyName="horizontalScrollPolicy" value="off" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+				  <Pause timeout="5000"/>
+				  <CompareBitmap target="mydatagrid" url="../Properties/Baselines/datagrid_horizontalscrollpolicy_off.png" timeout="5000"/>
+			     </body>
+	              </TestCase>
+	              
+	 </testCases> 
+	     
+</UnitTester>

Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties_scrollcontrolbase.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Properties/advanceddatagrid_properties_scrollcontrolbase.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message