You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cf...@apache.org on 2012/12/04 20:58:29 UTC
svn commit: r1417139 [4/4] - in
/incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid:
./ Assets/ Properties/ Properties/Assets/ Properties/Baselines/ SWFs/
SWFs/Assets/ Styles/ Styles/Baselines/
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/Baselines/datagrid_verticalgridlinestrue.png
------------------------------------------------------------------------------
svn:mime-type = image/png
Added: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles.mxml?rev=1417139&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles.mxml (added)
+++ incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles.mxml Tue Dec 4 19:58:21 2012
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="utf-8"?>
+<UnitTester testDir="components/AdvancedDataGrid/Styles/" 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 setAIcolors():void
+ {
+ application.mydatagrid.setStyle("alternatingItemColors",[0xFFCC00,0x00FF00]);
+ }
+ public function setHeadercolors():void
+ {
+ application.mydatagrid.setStyle("headerColors",[0xFFCC00,0xFFCC00]);
+ }
+ public function setBg():void
+ {
+ application.mydatagrid.setStyle("backgroundColor",0xFF0000);
+ }
+ public function startApp():void
+ {
+ application.startIt();
+ }
+ ]]>
+ </mx:Script>
+
+ <testCases>
+ <TestCase testID="style_headerColors" keywords="[AdvancedDataGrid, headerColors]">
+ <setup>
+
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+
+
+
+ </setup>
+ <body>
+ <RunCode code="setHeadercolors()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_headercolors.png" timeout="5000" />
+
+ </body>
+ </TestCase>
+ <TestCase testID="style_verticalGridLines" keywords="[AdvancedDataGrid, verticalGridLines]">
+ <setup>
+
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+
+ <!-- no specific test is written for dataprovider since all the tests fail if the Runcode addItems() fail-->
+
+
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="verticalGridLines" value="true"/>
+ <SetStyle target="mydatagrid" styleName="verticalGridLines" value="false" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_verticalgridlinestrue.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="style_verticalGridLinesColor_string" keywords="[AdvancedDataGrid, verticalGridLineColor]">
+ <setup>
+
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+
+ <!-- no specific test is written for dataprovider since all the tests fail if the Runcode addItems() fail-->
+
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="verticalGridLines" value="true" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="verticalGridLineColor" value="red" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <!-- <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_verticalgridlinecolor.png" />-->
+ <AssertPixelValue target="mydatagrid" x="201" y="147" value="0xFF0000" />
+ </body>
+ </TestCase>
+ <TestCase testID="style_verticalGridLinesColor_0x" keywords="[AdvancedDataGrid, verticalGridLineColor, verticalGridLines]">
+ <setup>
+
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+
+ <!-- no specific test is written for dataprovider since all the tests fail if the Runcode addItems() fail-->
+
+
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="verticalGridLines" value="true" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="verticalGridLineColor" value="0xFFCCDD" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <!-- <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_verticalgridlinecolor.png" />-->
+ <AssertPixelValue target="mydatagrid" x="201" y="147" value="0xFFCCDD" />
+ </body>
+ </TestCase>
+ <TestCase testID="style_verticalGridLinesColor_pound" keywords="[AdvancedDataGrid, verticalGridLineColor, verticalGridLines]">
+ <setup>
+
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+
+ <!-- no specific test is written for dataprovider since all the tests fail if the Runcode addItems() fail-->
+
+
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="verticalGridLines" value="true" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="verticalGridLineColor" value="#FF0000" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <!-- <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_verticalgridlinecolor.png" />-->
+ <AssertPixelValue target="mydatagrid" x="201" y="147" value="0xFF0000" />
+ </body>
+ </TestCase>
+ <TestCase testID="style_rollOverColor" keywords="[AdvancedDataGrid, mouseOver, rollOverColor]">
+ <setup>
+
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+
+ <!-- no specific test is written for dataprovider since all the tests fail if the Runcode addItems() fail-->
+
+
+ </setup>
+ <body>
+ <!-- not working for me, help needed-->
+ <SetStyle target="mydatagrid" styleName="rollOverColor" value="0xFF0000" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <DispatchMouseEvent target="mydatagrid" type="mouseOver" localX="72" localY="14"/>
+ <DispatchMouseEvent target="mydatagrid" type="mouseMove" localX="72" localY="14"/>
+
+ </body>
+ </TestCase>
+ <!-- <TestCase testID="style_selectionColor_0x" keywords="[AdvancedDataGrid, mouseOver, mouseDown, selectionColor]">
+ <setup>
+
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+
+
+
+
+ </setup>
+ <body>
+
+ <SetStyle target="mydatagrid" styleName="selectionColor" value="0xFF0000" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <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"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_style_selectionColor_0x.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="style_selectionColor_#" keywords="[AdvancedDataGrid, mouseOver, mouseDown, selectionColor]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+ </setup>
+ <body>
+
+ <SetStyle target="mydatagrid" styleName="selectionColor" value="#FF0000" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <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" />
+ <SetProperty target="mydatagrid" propertyName="selectedIndex" value="2" waitTarget="mydatagrid"
+ waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="style_selectionColor.png" timeout="5000"/>
+
+ </body>
+ </TestCase>-->
+
+ </testCases>
+
+</UnitTester>
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles.mxml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_listbase.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_listbase.mxml?rev=1417139&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_listbase.mxml (added)
+++ incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_listbase.mxml Tue Dec 4 19:58:21 2012
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="utf-8"?>
+<UnitTester testDir="components/AdvancedDataGrid/Styles/" 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 testgrid: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 setAIcolors():void
+ {
+ application.mydatagrid.setStyle("alternatingItemColors",[0xFFCC00,0x00FF00]);
+ }
+ public function setBg():void
+ {
+ application.mydatagrid.setStyle("backgroundColor",0xFF0000);
+ }
+ public function setFF():void
+ {
+
+ application.mydatagrid.setStyle("fontFamily","Arial");
+ }
+ public function startApp():void
+ {
+ application.startIt();
+ }
+ //Notes to self
+ //SelectionDuration is getter setter check, revisit.
+ ]]>
+ </mx:Script>
+
+ <testCases>
+
+ <TestCase testID="style_alternatingitemcolors" keywords="[AdvancedDataGrid, alternatingitemcolors]">
+ <body>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+
+ <SetStyle target="mydatagrid" styleName="alternatingItemColors" value="['#FFCC00','#CC0000']" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_alternatingitemcolors.png" timeout="5000"/>
+ </body>
+ </TestCase>
+ <TestCase testID="style_paddingBottom" keywords="[AdvancedDataGrid, paddingbottom]">
+ <body>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+ <SetStyle target="mydatagrid" styleName="paddingBottom" value="12" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_paddingbottom.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="style_paddingtop" keywords="[AdvancedDataGrid, paddingTop]">
+ <body>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+ <SetStyle target="mydatagrid" styleName="paddingTop" value="12" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_paddingTop.png" timeout="5000"/>
+ </body>
+ </TestCase>
+ <TestCase testID="style_paddingleft" keywords="[AdvancedDataGrid, paddingLeft]">
+ <body>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+ <SetStyle target="mydatagrid" styleName="paddingLeft" value="12" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_paddingLeft.png" timeout="5000" />
+ </body>
+ </TestCase>
+ <TestCase testID="style_paddingright" keywords="[AdvancedDataGrid, paddingRight]">
+ <body>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+ <SetStyle target="mydatagrid" styleName="paddingRight" value="12" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_paddingRight.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <!-- <TestCase testID="style_selectionbgdisabled" keywords="[AdvancedDataGrid, selectionBackgroundDisabled]">
+ <body>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+ <SetProperty propertyName="enabled" value="false" target="mydatagrid"/>
+ <Pause timeout="10"/>
+ <SetProperty propertyName="selectedIndex" value="1" target="mydatagrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="selectionBackgroundDisabledColor" value="#FFCC00" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_selectionbgdisabled.png" />
+ </body>
+ </TestCase>-->
+
+ <TestCase testID="style_userollover" keywords="[AdvancedDataGrid, useRollOver]">
+ <body>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+ <SetStyle target="mydatagrid" styleName="useRollOver" value="false" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <DispatchMouseEvent type="mouseOver" target="mydatagrid" localX="250" localY="90"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_userollover.png" timeout="5000"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_verticalalign_top" keywords="[AdvancedDataGrid, verticalAlign_top]">
+ <body>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+ <SetStyle target="mydatagrid" styleName="verticalAlign" value="top" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_verticalalign_top.png" timeout="5000"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_verticalalign_bottom" keywords="[AdvancedDataGrid, verticalAlign_bottom]">
+ <body>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+ <SetStyle target="mydatagrid" styleName="verticalAlign" value="bottom" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_verticalalign_bottom.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_verticalalign_bottom" keywords="[AdvancedDataGrid, selectionDuration]">
+ <body>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()"/>
+ <SetStyle target="mydatagrid" styleName="selectionDuration" value="100" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <AssertStyleValue styleName="selectionDuration" value="100" target="mydatagrid"/>
+ </body>
+ </TestCase>
+ </testCases>
+
+</UnitTester>
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_listbase.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_listbase.mxml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_scrollcontrolbase.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_scrollcontrolbase.mxml?rev=1417139&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_scrollcontrolbase.mxml (added)
+++ incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_scrollcontrolbase.mxml Tue Dec 4 19:58:21 2012
@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="utf-8"?>
+<UnitTester testDir="components/AdvancedDataGrid/Styles/" 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 testgrid:AdvancedDataGrid
+ public var mybox:Canvas;
+
+ 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 setAIcolors():void
+ {
+ application.mydatagrid.setStyle("alternatingItemColors",[0xFFCC00,0x00FF00]);
+ }
+ public function setBg():void
+ {
+ application.mydatagrid.setStyle("backgroundColor",0xFF0000);
+ }
+ public function setFF():void
+ {
+ application.mydatagrid.setStyle("fontFamily","MyArial");
+ }
+ public function startApp():void
+ {
+ application.startIt();
+ }
+ ]]>
+ </mx:Script>
+
+ <testCases>
+
+ <TestCase testID="style_borderThickness" keywords="[AdvancedDataGrid, borderColor, borderThickness]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="borderThickness" value="5"/>
+ <SetStyle target="mydatagrid" styleName="borderColor" value="0xFF0000" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <AssertPixelValue target="mydatagrid" x="2" y="2" value="0xFFFFFF" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_borderColor_string" keywords="[AdvancedDataGrid, borderColor, borderThickness]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="borderThickness" value="5"/>
+ <SetStyle target="mydatagrid" styleName="borderColor" value="green" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <AssertPixelValue target="mydatagrid" x="2" y="2" value="0xFFFFFF" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_borderColor_0x" keywords="[AdvancedDataGrid, borderColor, borderThickness]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="borderColor" value="0x0FFCC00" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <AssertPixelValue target="mydatagrid" x="2" y="2" value="0xFFFFFF" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_borderColor_pound" keywords="[AdvancedDataGrid, borderColor, borderThickness]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="borderThickness" value="5"/>
+ <SetStyle target="mydatagrid" styleName="borderColor" value="#008000" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <AssertPixelValue target="mydatagrid" x="2" y="2" value="0xFFFFFF" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_borderSides_all" keywords="[AdvancedDataGrid, borderSides]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="borderSides" value="top bottom left right" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_bordersides_all.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_borderSides_lr" keywords="[AdvancedDataGrid, borderSides]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="borderSides" value="left right" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_bordersides_lr.png" timeout="5000"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_borderStyle_inset" keywords="[AdvancedDataGrid, borderStyle, inset]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="borderStyle" value="inset" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_borderstyle_inset.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_borderStyle_outset" keywords="[AdvancedDataGrid, borderStyle, outset]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="borderStyle" value="outset" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_borderstyle_outset.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_color_string" keywords="[AdvancedDataGrid, borderStyle, solid]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp(); addItems()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="color" value="#008000" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <AssertPixelValue target="mydatagrid" x="2" y="2" value="0xFFFFFF" />
+ </body>
+ </TestCase>
+
+ <!-- Seems like a problem, visually they are all fine, but asserts are failing-->
+ <TestCase testID="style_color_0x" keywords="[AdvancedDataGrid, color]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="color" value="0xFFCC00" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_color_pound" keywords="[AdvancedDataGrid, color]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="color" value="#FF0000" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_fontFamily_mxml" keywords="[AdvancedDataGrid, fontFamily]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="fontFamily" value="Verdana" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="fontFamily" value="MyArial" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_fontfamily_arial.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_fontFamily_AS" keywords="[AdvancedDataGrid, fontFamily]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="fontFamily" value="Verdana" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="setFF()"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="fontFamily" value="MyArial" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_fontfamily_arial.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_fontWeight" keywords="[AdvancedDataGrid, fontWeight]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="fontWeight" value="bold" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_fontweight_bold.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_fontStyle" keywords="[AdvancedDataGrid, fontStyle]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="fontStyle" value="italic" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_fontstyle_italic.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_fontSize" keywords="[AdvancedDataGrid, fontStyle]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="fontSize" value="16" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_fontsize_16.png" timeout="5000"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_dropShadowEnabled" keywords="[AdvancedDataGrid, dropShadowEnabled]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="dropShadowEnabled" value="true" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="shadowDirection" value="left" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="shadowDistance" value="6" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_dropShadowEnabled_true.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_shadowDirection" keywords="[AdvancedDataGrid, dropShadowDirection]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="shadowDirection" value="right" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_shadowdirection_right.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_shadowDistance" keywords="[AdvancedDataGrid, dropShadowDistance]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="shadowDirection" value="left" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <SetStyle target="mydatagrid" styleName="shadowDistance" value="8" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_shadowdistance_8.png" timeout="5000" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="style_textDecoration" keywords="[AdvancedDataGrid, textDecoration]">
+ <setup>
+ <ResetComponent target="mydatagrid" className="mx.controls.AdvancedDataGrid" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <RunCode code="startApp()" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ </setup>
+ <body>
+ <SetStyle target="mydatagrid" styleName="textDecoration" value="underline" waitTarget="mydatagrid" waitEvent="updateComplete"/>
+ <WaitForEffectsToEnd />
+ <CompareBitmap target="mydatagrid" url="../Styles/Baselines/datagrid_textdecoration_underline.png" timeout="5000"/>
+ </body>
+ </TestCase>
+
+ </testCases>
+
+</UnitTester>
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_scrollcontrolbase.mxml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/components/AdvancedDataGrid/Styles/advanceddatagrid_styles_scrollcontrolbase.mxml
------------------------------------------------------------------------------
svn:mime-type = text/plain