You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/03/02 07:14:26 UTC
[03/12] changes required to get basictests to compile and not RTE
when launched. Now to get it to actually run some tests
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/DesignLayerTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/DesignLayerTestScript.mxml b/mustella/tests/basicTests/spark/scripts/DesignLayerTestScript.mxml
new file mode 100644
index 0000000..6432e9c
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/DesignLayerTestScript.mxml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.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[
+ ]]>
+ </mx:Script>
+
+ <testCases>
+<!--
+-->
+ <TestCase testID="SetupDesignLayerTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="designLayerTest"
+ waitEvent="updateComplete" />
+ </body>
+ </TestCase>
+ <TestCase testID="DesignLayerTest1">
+ <body>
+ <AssertMethodValue method="use namespace mx_internal; value=application.designLayerTests.testDLButton.$visible" value="false" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/DropDownListTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/DropDownListTestScript.mxml b/mustella/tests/basicTests/spark/scripts/DropDownListTestScript.mxml
new file mode 100644
index 0000000..c122761
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/DropDownListTestScript.mxml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.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[
+ ]]>
+ </mx:Script>
+
+ <testCases>
+<!--
+-->
+ <TestCase testID="SetupSparkDropDownListTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkDropDownListTest"
+ waitEvent="updateComplete" />
+ <AssertPropertyValue target="sparkDropDownListTests.testCombo" propertyName="selectedItem" value="Apples" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkDropDownListTest1">
+ <body>
+ <DispatchMouseEvent target="sparkDropDownListTests.testCombo" type="rollOver" waitEvent="rollOver" localX="60" localY="10" />
+ <DispatchMouseEvent target="sparkDropDownListTests.testCombo" type="mouseDown" waitEvent="mouseDown" localX="60" localY="10" />
+ <AssertEvent target="sparkDropDownListTests.testCombo" eventName="open" eventClass="spark.events::DropDownEvent" />
+ <DispatchMouseEvent target="sparkDropDownListTests.testCombo" type="mouseUp" waitEvent="mouseUp" localX="60" localY="10" />
+ <AssertPropertyValue target="sparkDropDownListTests.testCombo.dropDown" propertyName="visible" value="true" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkDropDownListTest2">
+ <body>
+ <DispatchMouseEvent target="sparkDropDownListTests.testCombo.dropDown" type="mouseOver" localX="10" localY="30" />
+ <DispatchMouseClickEvent target="sparkDropDownListTests.testCombo.dropDown" localX="10" localY="30" />
+ <AssertEvent target="sparkDropDownListTests.testCombo" eventName="close" eventClass="spark.events::DropDownEvent" />
+ <AssertPropertyValue target="sparkDropDownListTests.testCombo" propertyName="selectedItem" value="Beer" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/EasingTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/EasingTestScript.mxml b/mustella/tests/basicTests/spark/scripts/EasingTestScript.mxml
new file mode 100644
index 0000000..02a0b5e
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/EasingTestScript.mxml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns="*"
+ testSWF="main.mxml">
+
+ <!-- this set of lines form a template that must be in each unit test -->
+ <mx:Script>
+ <![CDATA[
+ import spark.effects.easing.*;
+ 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[
+ private function play(target:Object):void
+ {
+ target.play();
+ }
+
+ ]]>
+ </mx:Script>
+
+
+ <testCases>
+
+ <TestCase testID="SetupSparkEasingTest" keywords="[easing]" description="Spark.Effects.Easing checkin test 1.">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkEasingTest"
+ waitEvent="updateComplete" />
+ <AssertPropertyValue target="sparkEasingTests.bl" propertyName="y" value="100"/>
+ <AssertPropertyValue target="sparkEasingTests.rl" propertyName="y" value="100"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="Easing_CheckinTest_1" keywords="[easing]" description="Spark.Effects.Easing checkin test 2.">
+ <body>
+ <RunCode code="application.sparkEasingTests.bd.play()" waitTarget="sparkEasingTests.bd" waitEvent="effectEnd" timeout="500"/>
+ <AssertPropertyValue target="sparkEasingTests.bl" propertyName="y" value="575"/>
+ <AssertPropertyValue target="sparkEasingTests.rl" propertyName="y" value="575"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="Easing_CheckinTest_7" keywords="[easing]" description="Spark.Effects.Easing checkin test 3.">
+ <body>
+ <RunCode code="application.sparkEasingTests.bd.playheadTime = 250"/>
+ <AssertPropertyValue target="sparkEasingTests.bl" propertyName="y" value="575"/>
+ <AssertPropertyValue target="sparkEasingTests.rl" propertyName="y" value="575"/>
+ <RunCode code="application.sparkEasingTests.bd.end()" waitTarget="sparkEasingTests.bd" waitEvent="effectEnd" timeout="500"/>
+ </body>
+ </TestCase>
+ </testCases>
+
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/FXG2RuntimeTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/FXG2RuntimeTestScript.mxml b/mustella/tests/basicTests/spark/scripts/FXG2RuntimeTestScript.mxml
new file mode 100644
index 0000000..57cc700
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/FXG2RuntimeTestScript.mxml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.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[
+ ]]>
+ </mx:Script>
+
+ <testCases>
+ <TestCase testID="SetupFXG2RuntimeTests">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="fxg2RuntimeTest"
+ waitEvent="updateComplete" />
+ <AssertPropertyValue target="fxg2RuntimeTests.graphic1" propertyName="width" value="200" />
+ </body>
+ </TestCase>
+ <TestCase testID="FXG2RuntimeTests_luminosityMaskDefault">
+ <body>
+ <SetProperty target="fxg2RuntimeTests.graphic1" propertyName="maskType" value="luminosity" />
+ <AssertPropertyValue target="fxg2RuntimeTests.graphic1" propertyName="maskType" value="luminosity" />
+ <AssertPropertyValue target="fxg2RuntimeTests.graphic1" propertyName="luminosityClip" value="false" />
+ <AssertPropertyValue target="fxg2RuntimeTests.graphic1" propertyName="luminosityInvert" value="false" />
+ </body>
+ </TestCase>
+ <TestCase testID="FXG2RuntimeTests_luminosityMaskRuntimeChange">
+ <body>
+ <SetProperty target="fxg2RuntimeTests.graphic1" propertyName="luminosityClip" value="true" />
+ <AssertPropertyValue target="fxg2RuntimeTests.graphic1" propertyName="luminosityClip" value="true" />
+ </body>
+ </TestCase>
+ <TestCase testID="FXG2RuntimeTests_BlendModeChangeNormal">
+ <body>
+ <SetProperty target="fxg2RuntimeTests.bitmapGroup" propertyName="blendMode" value="normal" />
+ <AssertPropertyValue target="fxg2RuntimeTests.bitmapGroup" propertyName="blendMode" value="normal" />
+ </body>
+ </TestCase>
+ <TestCase testID="FXG2RuntimeTests_BlendModeChangeColorDodge">
+ <body>
+ <SetProperty target="fxg2RuntimeTests.bitmapGroup" propertyName="blendMode" value="colordodge" />
+ <AssertPropertyValue target="fxg2RuntimeTests.bitmapGroup" propertyName="blendMode" value="colordodge" />
+ </body>
+ </TestCase>
+ <TestCase testID="FXG2RuntimeTests_BlendModeChangeDarken">
+ <body>
+ <SetProperty target="fxg2RuntimeTests.bitmapGroup" propertyName="blendMode" value="darken" />
+ <AssertPropertyValue target="fxg2RuntimeTests.bitmapGroup" propertyName="blendMode" value="darken" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/FormTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/FormTestScript.mxml b/mustella/tests/basicTests/spark/scripts/FormTestScript.mxml
new file mode 100644
index 0000000..7d7a3ee
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/FormTestScript.mxml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.mxml">
+
+ <!-- this set of lines form a template that must be in each unit test -->
+ <mx:Script>
+ <![CDATA[
+ import mx.core.FlexGlobals;
+
+ 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[
+ ]]>
+ </mx:Script>
+
+ <testCases>
+ <!--
+ -->
+ <TestCase testID="SetupSparkFormTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkFormTest"
+ waitEvent="updateComplete" />
+ <AssertPropertyValue target="sparkFormTests.formItem1" propertyName="label" value="Address" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkFormTest1">
+ <body>
+ <SetProperty target="sparkFormTests.formItem1" propertyName="label" value="Mailing Address"
+ waitEvent="updateComplete" waitTarget="sparkFormTests.formItem1.skin" />
+ <AssertPropertyValue target="sparkFormTests.formItem1" propertyName="label" value="Mailing Address"/>
+ <AssertPropertyValue target="sparkFormTests.formItem2.skin.labelCol" propertyName="width"
+ valueExpression="value=FlexGlobals.topLevelApplication.sparkFormTests.formItem1.labelDisplay.width+5" />
+ <AssertPropertyValue target="sparkFormTests.formItem2.contentGroup" propertyName="y" value="10" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/ImageTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/ImageTestScript.mxml b/mustella/tests/basicTests/spark/scripts/ImageTestScript.mxml
new file mode 100644
index 0000000..c5bfaad
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/ImageTestScript.mxml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.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[
+ ]]>
+ </mx:Script>
+
+ <testCases>
+ <TestCase testID="SetupImageTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="imageTest"
+ waitEvent="updateComplete" />
+ </body>
+ </TestCase>
+ <TestCase testID="TestPreliminary">
+ <body>
+ <AssertPropertyValue target="imageTests.image2" propertyName="width" value="50" />
+ <AssertPropertyValue target="imageTests.image2" propertyName="height" value="50" />
+ </body>
+ </TestCase>
+ <TestCase testID="LoadImages">
+ <body>
+ <SetProperty target="imageTests.image1" propertyName="source" value="basicImage.jpg" waitEvent="complete"/>
+ <AssertPropertyValue target="imageTests.image1" propertyName="height" value="44" />
+ <SetProperty target="imageTests.image2" propertyName="source" value="basicImage.jpg" waitEvent="complete"/>
+ <AssertPropertyValue target="imageTests.image2" propertyName="height" value="44" />
+ <SetProperty target="imageTests.image2" propertyName="source" value="{null}" waitEvent="updateComplete"/>
+ <AssertPropertyValue target="imageTests.image2" propertyName="height" value="50" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/LayoutDirectionTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/LayoutDirectionTestScript.mxml b/mustella/tests/basicTests/spark/scripts/LayoutDirectionTestScript.mxml
new file mode 100644
index 0000000..30b44e8
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/LayoutDirectionTestScript.mxml
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.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.core.mx_internal;
+ use namespace mx_internal;
+ ]]>
+ </mx:Script>
+
+ <testCases>
+<!--
+-->
+ <TestCase testID="SetupSparkLayoutDirectionTestRTL">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkLayoutDirectionTest"
+ waitEvent="updateComplete" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.testGroup" propertyName="width" value="300" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_image" propertyName="width" value="143" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestRTL_testGroup">
+ <body>
+ <AssertStyleValue target="sparkLayoutDirectionTests.testGroup"
+ styleName="layoutDirection" value="rtl" />
+ <AssertStyleValue target="sparkLayoutDirectionTests.testGroup"
+ styleName="direction" value="rtl" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.testGroup.computedMatrix"
+ propertyName="a" value="-1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.testGroup.computedMatrix"
+ propertyName="tx" value="300" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestRTL_mx_datechooser">
+ <body>
+ <AssertStyleValue target="sparkLayoutDirectionTests.mx_datechooser"
+ styleName="layoutDirection" value="rtl" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.mx_datechooser.computedMatrix"
+ propertyName="a" value="1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.mx_datechooser.computedMatrix"
+ propertyName="tx" value="0" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestRTL_spark_textinput">
+ <body>
+ <AssertStyleValue target="sparkLayoutDirectionTests.spark_textinput"
+ styleName="layoutDirection" value="rtl" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_textinput.computedMatrix"
+ propertyName="a" value="1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_textinput.computedMatrix"
+ propertyName="tx" value="0" />
+ <AssertStyleValue target="sparkLayoutDirectionTests.spark_textinput.textDisplay"
+ styleName="layoutDirection" value="ltr" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_textinput.textDisplay.computedMatrix"
+ propertyName="a" value="-1" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestRTL_spark_button">
+ <body>
+ <AssertStyleValue target="sparkLayoutDirectionTests.spark_button"
+ styleName="layoutDirection" value="rtl" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_button.computedMatrix"
+ propertyName="a" value="1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_button.computedMatrix"
+ propertyName="tx" value="0" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestRTL_spark_checkbox">
+ <body>
+ <AssertStyleValue target="sparkLayoutDirectionTests.spark_checkbox"
+ styleName="layoutDirection" value="rtl" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_checkbox.computedMatrix"
+ propertyName="a" value="1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_checkbox.computedMatrix"
+ propertyName="tx" value="0" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestRTL_spark_image">
+ <body>
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_image"
+ propertyName="layoutDirection" value="ltr" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_image.displayObject.transform.matrix"
+ propertyName="a" value="-1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_image.displayObject.transform.matrix"
+ propertyName="tx" value="143" />
+ </body>
+ </TestCase>
+ <TestCase testID="SetupSparkLayoutDirectionTestLTR">
+ <body>
+ <SetStyle target="sparkLayoutDirectionTests.testGroup" styleName="direction" value="ltr"/>
+ <SetStyle target="sparkLayoutDirectionTests.testGroup" styleName="layoutDirection" value="ltr"
+ waitEvent="updateComplete" waitTarget="sparkLayoutDirectionTests.testGroup"/>
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestLTR_testGroup">
+ <body>
+ <AssertStyleValue target="sparkLayoutDirectionTests.testGroup"
+ styleName="layoutDirection" value="ltr" />
+ <AssertStyleValue target="sparkLayoutDirectionTests.testGroup"
+ styleName="direction" value="ltr" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.testGroup.computedMatrix"
+ propertyName="a" value="1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.testGroup.computedMatrix"
+ propertyName="tx" value="0" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestLTR_mx_datechooser">
+ <body>
+ <AssertStyleValue target="sparkLayoutDirectionTests.mx_datechooser"
+ styleName="layoutDirection" value="ltr" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.mx_datechooser.computedMatrix"
+ propertyName="a" value="1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.mx_datechooser.computedMatrix"
+ propertyName="tx" value="0" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestLTR_spark_textinput">
+ <body>
+ <AssertStyleValue target="sparkLayoutDirectionTests.spark_textinput"
+ styleName="layoutDirection" value="ltr" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_textinput.computedMatrix"
+ propertyName="a" value="1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_textinput.computedMatrix"
+ propertyName="tx" value="0" />
+ <AssertStyleValue target="sparkLayoutDirectionTests.spark_textinput.textDisplay"
+ styleName="layoutDirection" value="ltr" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_textinput.textDisplay.computedMatrix"
+ propertyName="a" value="1" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestLTR_spark_button">
+ <body>
+ <AssertStyleValue target="sparkLayoutDirectionTests.spark_button"
+ styleName="layoutDirection" value="ltr" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_button.computedMatrix"
+ propertyName="a" value="1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_button.computedMatrix"
+ propertyName="tx" value="0" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestLTR_spark_checkbox">
+ <body>
+ <AssertStyleValue target="sparkLayoutDirectionTests.spark_checkbox"
+ styleName="layoutDirection" value="ltr" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_checkbox.computedMatrix"
+ propertyName="a" value="1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_checkbox.computedMatrix"
+ propertyName="tx" value="0" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkLayoutDirectionTestLTR_spark_image">
+ <body>
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_image"
+ propertyName="layoutDirection" value="ltr" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_image.displayObject.transform.matrix"
+ propertyName="a" value="1" />
+ <AssertPropertyValue target="sparkLayoutDirectionTests.spark_image.displayObject.transform.matrix"
+ propertyName="tx" value="0" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/LayoutTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/LayoutTestScript.mxml b/mustella/tests/basicTests/spark/scripts/LayoutTestScript.mxml
new file mode 100644
index 0000000..1e3583c
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/LayoutTestScript.mxml
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="layout.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.core.ILayoutElement;
+ public var layoutElement:ILayoutElement;
+ ]]>
+ </mx:Script>
+
+ <testCases>
+ <TestCase testID="SetupLayoutTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkLayoutTest"
+ waitEvent="updateComplete" />
+ <AssertPropertyValue target="sparkLayoutTests.b1" propertyName="label" value="Hello" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="preferredSize_from_measured">
+ <setup>
+ <ResetComponent target="sparkLayoutTests.b1" className="mx.controls.Button" waitEvent="updateComplete" waitTarget="sparkLayoutTests.b1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredWidth" value="100"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredHeight" value="110"/>
+ <RunCode code="layoutElement = application.sparkLayoutTests.b1" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsWidth()" value="100" />
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsHeight()" value="110" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="preferredSize_from_measured_and_explicitMin">
+ <setup>
+ <ResetComponent target="sparkLayoutTests.b1" className="mx.controls.Button" waitEvent="updateComplete" waitTarget="sparkLayoutTests.b1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredWidth" value="100"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredHeight" value="110"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitMinWidth" value="120"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitMinHeight" value="130" waitEvent="updateComplete"/>
+ <RunCode code="layoutElement = application.sparkLayoutTests.b1" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsWidth()" value="120" />
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsHeight()" value="130" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="preferredSize_from_measured_and_explicitMin_and_explicitMax">
+ <setup>
+ <ResetComponent target="sparkLayoutTests.b1" className="mx.controls.Button" waitEvent="updateComplete" waitTarget="sparkLayoutTests.b1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredWidth" value="100"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredHeight" value="110"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitMinWidth" value="120"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitMinHeight" value="130"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitMaxWidth" value="115"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitMaxHeight" value="125" waitEvent="updateComplete"/>
+ <RunCode code="layoutElement = application.sparkLayoutTests.b1" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsWidth()" value="115" />
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsHeight()" value="125" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="preferredSize_from_measured_rotation_90">
+ <setup>
+ <ResetComponent target="sparkLayoutTests.b1" className="mx.controls.Button" waitEvent="updateComplete" waitTarget="sparkLayoutTests.b1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredWidth" value="50"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredHeight" value="100"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="rotation" value="90"/>
+ <RunCode code="layoutElement = application.sparkLayoutTests.b1" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsWidth()" value="100" />
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsHeight()" value="50" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="preferredSize_from_measured_rotation_180">
+ <setup>
+ <ResetComponent target="sparkLayoutTests.b1" className="mx.controls.Button" waitEvent="updateComplete" waitTarget="sparkLayoutTests.b1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredWidth" value="50"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredHeight" value="100"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="rotation" value="180"/>
+ <RunCode code="layoutElement = application.sparkLayoutTests.b1" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsWidth()" value="50" />
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsHeight()" value="100" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="preferredSize_from_measured_rotation_negative90">
+ <setup>
+ <ResetComponent target="sparkLayoutTests.b1" className="mx.controls.Button" waitEvent="updateComplete" waitTarget="sparkLayoutTests.b1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredWidth" value="50"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredHeight" value="100"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="rotation" value="-90"/>
+ <RunCode code="layoutElement = application.sparkLayoutTests.b1" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsWidth()" value="100" />
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsHeight()" value="50" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="preferredSize_from_explicit_size">
+ <setup>
+ <ResetComponent target="sparkLayoutTests.b1" className="mx.controls.Button" waitEvent="updateComplete" waitTarget="sparkLayoutTests.b1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredWidth" value="50"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredHeight" value="100"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredMinWidth" value="20"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredMinHeight" value="20"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitMinWidth" value="30"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitMinHeight" value="30"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitMaxWidth" value="1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitMaxHeight" value="1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitWidth" value="4"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="explicitHeight" value="5"/>
+ <RunCode code="layoutElement = application.sparkLayoutTests.b1" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsWidth()" value="4" />
+ <AssertMethodValue method="value=layoutElement.getPreferredBoundsHeight()" value="5" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="setLayoutBoundsSize_NaN_width_NaN_height">
+ <setup>
+ <ResetComponent target="sparkLayoutTests.b1" className="mx.controls.Button" waitEvent="updateComplete" waitTarget="sparkLayoutTests.b1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredWidth" value="50"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredHeight" value="100"/>
+ <RunCode code="layoutElement = application.sparkLayoutTests.b1" />
+ <RunCode code="layoutElement.setLayoutBoundsSize(NaN, NaN);" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=layoutElement.getLayoutBoundsWidth()" value="50" />
+ <AssertMethodValue method="value=layoutElement.getLayoutBoundsHeight()" value="100" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="setLayoutBoundsSize_40_width_NaN_height">
+ <setup>
+ <ResetComponent target="sparkLayoutTests.b1" className="mx.controls.Button" waitEvent="updateComplete" waitTarget="sparkLayoutTests.b1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredWidth" value="50"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredHeight" value="100"/>
+ <RunCode code="layoutElement = application.sparkLayoutTests.b1" />
+ <RunCode code="layoutElement.setLayoutBoundsSize(40, NaN);" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=layoutElement.getLayoutBoundsWidth()" value="40" />
+ <AssertMethodValue method="value=layoutElement.getLayoutBoundsHeight()" value="100" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="setLayoutBoundsSize_NaN_width_90_height">
+ <setup>
+ <ResetComponent target="sparkLayoutTests.b1" className="mx.controls.Button" waitEvent="updateComplete" waitTarget="sparkLayoutTests.b1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredWidth" value="50"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredHeight" value="100"/>
+ <RunCode code="layoutElement = application.sparkLayoutTests.b1" />
+ <RunCode code="layoutElement.setLayoutBoundsSize(NaN, 90);" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=layoutElement.getLayoutBoundsWidth()" value="50" />
+ <AssertMethodValue method="value=layoutElement.getLayoutBoundsHeight()" value="90" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="setLayoutBoundsSize_30_width_80_height">
+ <setup>
+ <ResetComponent target="sparkLayoutTests.b1" className="mx.controls.Button" waitEvent="updateComplete" waitTarget="sparkLayoutTests.b1"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredWidth" value="50"/>
+ <SetProperty target="sparkLayoutTests.b1" propertyName="measuredHeight" value="100"/>
+ <RunCode code="layoutElement = application.sparkLayoutTests.b1" />
+ <RunCode code="layoutElement.setLayoutBoundsSize(30, 80);" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=layoutElement.getLayoutBoundsWidth()" value="30" />
+ <AssertMethodValue method="value=layoutElement.getLayoutBoundsHeight()" value="80" />
+ </body>
+ </TestCase>
+
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/ListDragDropTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/ListDragDropTestScript.mxml b/mustella/tests/basicTests/spark/scripts/ListDragDropTestScript.mxml
new file mode 100644
index 0000000..1c2c23f
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/ListDragDropTestScript.mxml
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns="*"
+ testSWF="main.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 spark.layouts.*;
+ import mx.managers.DragManager;
+ import mx.core.mx_internal;
+ use namespace mx_internal;
+ ]]>
+ </mx:Script>
+
+ <testCases>
+ <TestCase testID="SetupListDragDropTest" keywords="[DragDrop, List]" description="Spark ListDND checkin test 1.">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkListDragDropTest" waitEvent="updateComplete" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="1_SparkListDND1_copy" keywords="[DragDrop, List]" description="drag copy">
+ <body>
+ <ResetComponent target="sparkListDragDropTests.dragFrom" className="spark.components.List" waitEvent="updateComplete" />
+ <ResetComponent target="sparkListDragDropTests.l2" className="spark.components.List" waitEvent="updateComplete" />
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dataProvider"
+ valueExpression="value=application.sparkListDragDropTests.createPlayersAC()"
+ waitEvent="updateComplete"
+ waitTarget="sparkListDragDropTests.dragFrom.dataGroup"/>
+
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dataProvider"
+ valueExpression="value=application.sparkListDragDropTests.createPlayersAC()"
+ waitEvent="updateComplete"
+ waitTarget="sparkListDragDropTests.l2.dataGroup"/>
+
+ <AssertPropertyValue target="sparkListDragDropTests.dragFrom.dataGroup" propertyName="numElements" value="7" />
+ <AssertPropertyValue target="sparkListDragDropTests.l2.dataGroup" propertyName="numElements" value="7" />
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="labelField" value="lastName"
+ waitEvent="updateComplete" waitTarget="sparkListDragDropTests.dragFrom"/>
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="labelField" value="firstName"
+ waitEvent="updateComplete" waitTarget="sparkListDragDropTests.l2"/>
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="selectedIndex" value="1" />
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dragEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dragEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dropEnabled" value="true" />
+
+ <DispatchMouseEvent type="mouseOver" buttonDown="false" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="10" localY="70" />
+ <DispatchMouseEvent type="mouseDown" buttonDown="true" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="10" localY="70" />
+ <DispatchMouseEvent type="mouseMove" buttonDown="true" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="50" localY="72" />
+
+ <DispatchMouseEvent type="mouseMove" buttonDown="true" target="sparkListDragDropTests.l2"
+ localX="15" localY="10" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="updateComplete"/>
+ <DispatchMouseEvent target="sparkListDragDropTests.l2" type="mouseMove" buttonDown="true"
+ localX="50" localY="30" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent target="sparkListDragDropTests.l2" type="mouseUp"
+ localX="50" localY="30" waitTarget="sparkListDragDropTests.dragFrom" waitEvent="dragComplete" />
+
+ <AssertPropertyValue target="sparkListDragDropTests.dragFrom.dataGroup" propertyName="numElements" value="7" />
+ <AssertPropertyValue target="sparkListDragDropTests.l2.dataGroup" propertyName="numElements" value="8" />
+ <AssertMethodValue method="value=application.sparkListDragDropTests.l2.dataProvider.getItemAt(1).firstName" value="Ron" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="2_SparkListDND_move" keywords="[DragDrop, List]" description="drag move">
+ <body>
+ <ResetComponent target="sparkListDragDropTests.dragFrom" className="spark.components.List" waitEvent="updateComplete" />
+ <ResetComponent target="sparkListDragDropTests.l2" className="spark.components.List" waitEvent="updateComplete" />
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dataProvider"
+ valueExpression="value=application.sparkListDragDropTests.createPlayersAC()"
+ waitEvent="updateComplete"
+ waitTarget="sparkListDragDropTests.dragFrom.dataGroup"/>
+
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dataProvider"
+ valueExpression="value=application.sparkListDragDropTests.createPlayersAC()"
+ waitEvent="updateComplete"
+ waitTarget="sparkListDragDropTests.l2.dataGroup"/>
+
+ <AssertPropertyValue target="sparkListDragDropTests.dragFrom.dataGroup" propertyName="numElements" value="7" />
+ <AssertPropertyValue target="sparkListDragDropTests.l2.dataGroup" propertyName="numElements" value="7" />
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="labelField" value="lastName"
+ waitEvent="updateComplete" waitTarget="sparkListDragDropTests.dragFrom"/>
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="labelField" value="firstName"
+ waitEvent="updateComplete" waitTarget="sparkListDragDropTests.l2"/>
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="selectedIndex" value="1" />
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dragEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dragMoveEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dragEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dropEnabled" value="true" />
+
+ <DispatchMouseEvent type="mouseOver" buttonDown="false" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="10" localY="70" />
+ <DispatchMouseEvent type="mouseDown" buttonDown="true" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="10" localY="70" />
+ <DispatchMouseEvent type="mouseMove" buttonDown="true" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="50" localY="72" />
+
+ <DispatchMouseEvent type="mouseMove" buttonDown="true" target="sparkListDragDropTests.l2"
+ localX="15" localY="10" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="updateComplete"/>
+ <DispatchMouseEvent target="sparkListDragDropTests.l2" type="mouseMove" buttonDown="true"
+ localX="50" localY="30" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent target="sparkListDragDropTests.l2" type="mouseUp"
+ localX="50" localY="30" waitTarget="sparkListDragDropTests.dragFrom" waitEvent="dragComplete" />
+
+ <AssertPropertyValue target="sparkListDragDropTests.dragFrom.dataGroup" propertyName="numElements" value="6" />
+ <AssertPropertyValue target="sparkListDragDropTests.l2.dataGroup" propertyName="numElements" value="8" />
+ <AssertMethodValue method="value=application.sparkListDragDropTests.l2.dataProvider.getItemAt(1).firstName" value="Ron" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="3_SparkListDND_move" keywords="[DragDrop, List]" description="drag move">
+ <body>
+ <ResetComponent target="sparkListDragDropTests.dragFrom" className="spark.components.List" waitEvent="updateComplete" />
+ <ResetComponent target="sparkListDragDropTests.l2" className="spark.components.List" waitEvent="updateComplete" />
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dataProvider"
+ valueExpression="value=application.sparkListDragDropTests.createPlayersAC()"
+ waitEvent="updateComplete"
+ waitTarget="sparkListDragDropTests.dragFrom.dataGroup"/>
+
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dataProvider"
+ valueExpression="value=application.sparkListDragDropTests.createPlayersAC()"
+ waitEvent="updateComplete"
+ waitTarget="sparkListDragDropTests.l2.dataGroup"/>
+
+ <AssertPropertyValue target="sparkListDragDropTests.dragFrom.dataGroup" propertyName="numElements" value="7" />
+ <AssertPropertyValue target="sparkListDragDropTests.l2.dataGroup" propertyName="numElements" value="7" />
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="labelField" value="lastName"
+ waitEvent="updateComplete" waitTarget="sparkListDragDropTests.dragFrom"/>
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="labelField" value="firstName"
+ waitEvent="updateComplete" waitTarget="sparkListDragDropTests.l2"/>
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="selectedIndex" value="1" />
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dragEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dragMoveEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="allowMultipleSelection" value="true" />
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dragEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dropEnabled" value="true" />
+
+ <DispatchMouseEvent type="mouseOver" buttonDown="false" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="10" localY="70" />
+ <DispatchMouseEvent type="mouseDown" buttonDown="true" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="10" localY="70" />
+ <DispatchMouseEvent type="mouseMove" buttonDown="true" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="50" localY="72" />
+
+ <DispatchMouseEvent type="mouseMove" buttonDown="true" target="sparkListDragDropTests.l2"
+ localX="15" localY="10" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="updateComplete"/>
+ <DispatchMouseEvent target="sparkListDragDropTests.l2" type="mouseMove" buttonDown="true"
+ localX="50" localY="30" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent target="sparkListDragDropTests.l2" type="mouseUp"
+ localX="50" localY="30" waitTarget="sparkListDragDropTests.dragFrom" waitEvent="dragComplete" />
+
+ <AssertPropertyValue target="sparkListDragDropTests.dragFrom.dataGroup" propertyName="numElements" value="6" />
+ <AssertPropertyValue target="sparkListDragDropTests.l2.dataGroup" propertyName="numElements" value="8" />
+ <AssertMethodValue method="value=application.sparkListDragDropTests.l2.dataProvider.getItemAt(1).firstName" value="Ron" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="4_SparkListDND_reorder" keywords="[DragDrop, List]" description="drag move">
+ <body>
+ <ResetComponent target="sparkListDragDropTests.dragFrom" className="spark.components.List" waitEvent="updateComplete" />
+ <ResetComponent target="sparkListDragDropTests.l2" className="spark.components.List" waitEvent="updateComplete" />
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dataProvider"
+ valueExpression="value=application.sparkListDragDropTests.createPlayersAC()"
+ waitEvent="updateComplete"
+ waitTarget="sparkListDragDropTests.dragFrom.dataGroup"/>
+
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dataProvider"
+ valueExpression="value=application.sparkListDragDropTests.createPlayersAC()"
+ waitEvent="updateComplete"
+ waitTarget="sparkListDragDropTests.l2.dataGroup"/>
+
+ <AssertPropertyValue target="sparkListDragDropTests.dragFrom.dataGroup" propertyName="numElements" value="7" />
+ <AssertPropertyValue target="sparkListDragDropTests.l2.dataGroup" propertyName="numElements" value="7" />
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="labelField" value="lastName"
+ waitEvent="updateComplete" waitTarget="sparkListDragDropTests.dragFrom"/>
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="labelField" value="firstName"
+ waitEvent="updateComplete" waitTarget="sparkListDragDropTests.l2"/>
+
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="selectedIndex" value="1" waitEvent="updateComplete" />
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dragEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dragMoveEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="dropEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.dragFrom" propertyName="allowMultipleSelection" value="true"/>
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dragEnabled" value="true" />
+ <SetProperty target="sparkListDragDropTests.l2" propertyName="dropEnabled" value="true" />
+
+ <DispatchMouseEvent type="mouseOver" buttonDown="false" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="10" localY="70" />
+ <DispatchMouseEvent type="mouseDown" buttonDown="true" ctrlKey="true" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="10" localY="70" />
+
+ <DispatchMouseEvent type="mouseDown" buttonDown="true" ctrlKey="true" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="10" localY="90" />
+ <DispatchMouseEvent type="mouseMove" buttonDown="true" target="sparkListDragDropTests.dragFrom.dataGroup"
+ localX="50" localY="72" />
+
+ <DispatchMouseEvent type="mouseMove" buttonDown="true" target="sparkListDragDropTests.l2"
+ localX="15" localY="10" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="updateComplete"/>
+ <DispatchMouseEvent type="mouseMove" buttonDown="true" target="sparkListDragDropTests.l2"
+ localX="50" localY="30" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+
+ <DispatchMouseEvent type="mouseMove" buttonDown="true" target="sparkListDragDropTests.dragFrom"
+ localX="50" localY="70" waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/>
+ <DispatchMouseEvent type="mouseUp" target="sparkListDragDropTests.dragFrom"
+ localX="50" localY="70" waitTarget="sparkListDragDropTests.dragFrom" waitEvent="dragComplete" />
+
+ <AssertPropertyValue target="sparkListDragDropTests.dragFrom.dataGroup" propertyName="numElements" value="7" />
+ <AssertPropertyValue target="sparkListDragDropTests.l2.dataGroup" propertyName="numElements" value="7" />
+
+ <AssertMethodValue method="value=application.sparkListDragDropTests.dragFrom.dataProvider.getItemAt(0).lastName" value="Brown" />
+ <AssertMethodValue method="value=application.sparkListDragDropTests.dragFrom.dataProvider.getItemAt(1).lastName" value="Brady" />
+ <AssertMethodValue method="value=application.sparkListDragDropTests.dragFrom.dataProvider.getItemAt(2).lastName" value="Left" />
+ <AssertMethodValue method="value=application.sparkListDragDropTests.dragFrom.dataProvider.getItemAt(3).lastName" value="Gore" />
+ <AssertMethodValue method="value=application.sparkListDragDropTests.dragFrom.dataProvider.getItemAt(4).lastName" value="OName" />
+ <AssertMethodValue method="value=application.sparkListDragDropTests.dragFrom.dataProvider.getItemAt(5).lastName" value="VName" />
+ <AssertMethodValue method="value=application.sparkListDragDropTests.dragFrom.dataProvider.getItemAt(6).lastName" value="Boone" />
+
+ </body>
+ </TestCase>
+
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/NumberFormatterTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/NumberFormatterTestScript.mxml b/mustella/tests/basicTests/spark/scripts/NumberFormatterTestScript.mxml
new file mode 100644
index 0000000..d91aed5
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/NumberFormatterTestScript.mxml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.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 flash.globalization.NumberFormatter;
+ import flash.globalization.NationalDigitsType;
+ import flash.globalization.NumberParseResult;
+ public var flashNF:flash.globalization.NumberFormatter;
+
+
+ public var nfParseResult:NumberParseResult;
+ public var flashParseResult:NumberParseResult;
+ public var nfParseNumberResult:Number;
+ public var flashParseNumberResult:Number;
+ ]]>
+ </mx:Script>
+
+ <testCases>
+ <TestCase testID="SetupNumberFormatterTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkNumberFormatterTest"
+ waitEvent="updateComplete" />
+ </body>
+ </TestCase>
+ <TestCase testID="NumberFormatter_test" description="" keywords="[NumberFormatter, actualLocaleIDName]">
+ <setup>
+ <RunCode code="flashNF=new flash.globalization.NumberFormatter('xx')" />
+ <RunCode code="nfParseResult=application.sparkNumberFormatterTests.nfFormatter.parse('-1234')" />
+ <RunCode code="flashParseResult=flashNF.parse('-1234')" />
+ <RunCode code="nfParseNumberResult=application.sparkNumberFormatterTests.nfFormatter.parseNumber('1234')" />
+ <RunCode code="flashParseNumberResult=flashNF.parseNumber('1234')" />
+ </setup>
+ <body>
+ <AssertPropertyValue target="sparkNumberFormatterTests.nfFormatter" propertyName="actualLocaleIDName" valueExpression="value=flashNF.actualLocaleIDName" />
+ <AssertMethodValue method="value=nfParseResult.value" valueExpression="value=flashParseResult.value" />
+ <AssertMethodValue method="value=nfParseResult.startIndex" valueExpression="value=flashParseResult.startIndex" />
+ <AssertMethodValue method="value=nfParseResult.endIndex" valueExpression="value=flashParseResult.endIndex" />
+ <AssertMethodValue method="value=nfParseNumberResult" valueExpression="value=flashParseNumberResult" />
+
+ </body>
+ </TestCase>
+ <TestCase testID="NumberFormatter_test1" description="" keywords="[NumberFormatter, actualLocaleIDName]">
+ <setup>
+ <RunCode code="flashNF=new flash.globalization.NumberFormatter(application.sparkNumberFormatterTests.getLocale.text)" />
+ </setup>
+ <body>
+ <AssertPropertyValue propertyName="actualLocaleIDName" valueExpression="value=flashNF.actualLocaleIDName" target="sparkNumberFormatterTests.nfFormatterNoLocaleInline"/>
+ </body>
+ </TestCase>
+ <!--Set/Get Inline decimalSeparator as positive value and format numbers-->
+ <TestCase testID="NF_decimalSeparator_test" description="" keywords="[NumberFormatter, decimalSeparator]">
+ <setup>
+ <RunCode code="flashNF=new flash.globalization.NumberFormatter('en-US')"/>
+ <RunCode code="flashNF.decimalSeparator='@'"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="sparkNumberFormatterTests.nfFormatterDecimalSeparator" propertyName="decimalSeparator" valueExpression="value=flashNF.decimalSeparator"/>
+ <AssertMethodValue method="value=application.sparkNumberFormatterTests.nfFormatterDecimalSeparator.format(-1234567.89012)" valueExpression="value=flashNF.formatNumber(-1234567.89012)" />
+ <AssertPropertyValue target="sparkNumberFormatterTests.nfFormatterDecimalSeparator" propertyName="lastOperationStatus" valueExpression="value=flashNF.lastOperationStatus"/>
+ </body>
+ </TestCase>
+ <!--Binding property by lable text-->
+ <TestCase testID="NF_digitsType_test" description="" keywords="[NumberFormatter, digitsType]">
+ <setup>
+ <RunCode code="flashNF=new flash.globalization.NumberFormatter('en-US')" />
+ <RunCode code="flashNF.digitsType=NationalDigitsType.CHAM" />
+ </setup>
+ <body>
+ <AssertPropertyValue target="sparkNumberFormatterTests.nfLabel" propertyName="text" valueExpression="value=flashNF.digitsType" />
+ </body>
+ </TestCase>
+ <!-- Test function of fractionalDigits property -->
+ <TestCase testID="NF_fractionalDigits_test" description="" keywords="[NumberFormatter, fractionalDigits]">
+ <setup>
+ <RunCode code="flashNF=new flash.globalization.NumberFormatter('en-US')" />
+ <RunCode code="flashNF.trailingZeros=true" />
+ <RunCode code="flashNF.fractionalDigits=1" />
+ <RunCode code="flashNF.useGrouping=true" />
+ <RunCode code="flashNF.groupingSeparator=','"/>
+ <RunCode code="flashNF.groupingPattern='*'" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=application.sparkNumberFormatterTests.nfFormatterFractionalDigits.format(1234.352)" valueExpression="value=flashNF.formatNumber(1234.352)" />
+ </body>
+ </TestCase>
+ <TestCase testID="NF_errorText_test" description="" keywords="[NumberFormatter, errorText]">
+ <body>
+ <AssertMethodValue method="value=application.sparkNumberFormatterTests.nfFormatterNoLocaleInline.format('abc')" value="#####"/>
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/NumberValidatorTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/NumberValidatorTestScript.mxml b/mustella/tests/basicTests/spark/scripts/NumberValidatorTestScript.mxml
new file mode 100644
index 0000000..e1cb486
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/NumberValidatorTestScript.mxml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.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 flash.globalization.NumberFormatter;
+ import flash.globalization.NumberParseResult;
+ import flash.globalization.LastOperationStatus;
+ import spark.validators.NumberValidator;
+ import mx.events.ValidationResultEvent;
+ public var flashNF:flash.globalization.NumberFormatter;
+
+
+ public var nfParseResult:Number;
+ public var flashParseResult:Number;
+
+
+ private function doCheck(objFlash:flash.globalization.NumberFormatter,objVal:spark.validators.NumberValidator):Boolean
+ {
+ var los:String = objFlash.lastOperationStatus;
+ var event:ValidationResultEvent = objVal.validate();
+ var currentControlIsValid:Boolean = (event.type == ValidationResultEvent.VALID);
+ var res:Boolean;
+ if(los==flash.globalization.LastOperationStatus.NO_ERROR)
+ {
+ if(currentControlIsValid==true) // valide format
+ res=true;
+ else
+ res=false;
+ }
+ else if(los==flash.globalization.LastOperationStatus.PARSE_ERROR)
+ {
+ if(currentControlIsValid==false) // invalide format
+ res=true;
+ else
+ res=false;
+ }
+ return res;
+ }
+ ]]>
+ </mx:Script>
+
+ <testCases>
+ <TestCase testID="SetupNumberValidatorTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkNumberValidatorTest"
+ waitEvent="updateComplete" />
+ </body>
+ </TestCase>
+ <TestCase testID="validate_Number_test1">
+ <setup>
+ <RunCode code="flashNF=new flash.globalization.NumberFormatter('en')" />
+ <RunCode code="flashParseResult=flashNF.parseNumber('123')" />
+ <ResetComponent target="sparkNumberValidatorTests.tb1" className="spark.components.TextInput" waitEvent="updateComplete" />
+ <SetProperty target="sparkNumberValidatorTests.tb1" propertyName="text" value="123" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=doCheck(flashNF,application.sparkNumberValidatorTests.nv)" value="true" />
+ </body>
+ </TestCase>
+ <TestCase testID="validate_Number_test2">
+ <setup>
+ <RunCode code="flashNF=new flash.globalization.NumberFormatter('en')" />
+ <RunCode code="flashParseResult=flashNF.parseNumber('$123x')" />
+ <ResetComponent target="sparkNumberValidatorTests.tb1" className="spark.components.TextInput" waitEvent="updateComplete" />
+ <SetProperty target="sparkNumberValidatorTests.tb1" propertyName="text" value="$123x" />
+ </setup>
+ <body>
+ <AssertMethodValue method="value=doCheck(flashNF,application.sparkNumberValidatorTests.nv)" value="true" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/NumericStepperTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/NumericStepperTestScript.mxml b/mustella/tests/basicTests/spark/scripts/NumericStepperTestScript.mxml
new file mode 100644
index 0000000..f7ff90f
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/NumericStepperTestScript.mxml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.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[
+ ]]>
+ </mx:Script>
+
+ <testCases>
+<!--
+-->
+ <TestCase testID="SetupSparkNumericStepperTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkNumericStepperTest"
+ waitEvent="updateComplete" />
+ <AssertPropertyValue target="sparkNumericStepperTests.testNumStep" propertyName="value" value="0" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkNumericStepperTest1">
+ <body>
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.incrementButton" type="rollOver" waitEvent="rollOver" localX="2" localY="2" />
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.incrementButton" type="mouseDown" waitEvent="mouseDown" localX="2" localY="2" />
+ <AssertEvent target="sparkNumericStepperTests.testNumStep" eventName="change" eventClass="flash.events::Event" />
+ <AssertPropertyValue target="sparkNumericStepperTests.testNumStep" propertyName="value" value="1" />
+ </body>
+ <cleanup>
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.incrementButton" type="mouseUp" waitEvent="mouseUp" localX="2" localY="2" />
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.incrementButton" type="rollOut" localX="2" localY="2" />
+ </cleanup>
+ </TestCase>
+ <TestCase testID="SparkNumericStepperTest2">
+ <body>
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.incrementButton" type="rollOver" waitEvent="rollOver" localX="2" localY="2" />
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.incrementButton" type="mouseDown" waitEvent="mouseDown" localX="2" localY="2" />
+ <AssertEvent target="sparkNumericStepperTests.testNumStep" eventName="change" eventClass="flash.events::Event" />
+ <AssertPropertyValue target="sparkNumericStepperTests.testNumStep" propertyName="value" value="2" />
+ </body>
+ <cleanup>
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.incrementButton" type="mouseUp" waitEvent="mouseUp" localX="2" localY="2" />
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.incrementButton" type="rollOut" localX="2" localY="2" />
+ </cleanup>
+ </TestCase>
+ <TestCase testID="SparkNumericStepperTest3">
+ <body>
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.decrementButton" type="rollOver" waitEvent="rollOver" localX="2" localY="2" />
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.decrementButton" type="mouseDown" waitEvent="mouseDown" localX="2" localY="2" />
+ <AssertEvent target="sparkNumericStepperTests.testNumStep" eventName="change" eventClass="flash.events::Event" />
+ <AssertPropertyValue target="sparkNumericStepperTests.testNumStep" propertyName="value" value="1" />
+ </body>
+ <cleanup>
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.decrementButton" type="mouseUp" waitEvent="mouseUp" localX="2" localY="2" />
+ <DispatchMouseEvent target="sparkNumericStepperTests.testNumStep.decrementButton" type="rollOut" localX="2" localY="2" />
+ </cleanup>
+ </TestCase>
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/PanelControlBarTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/PanelControlBarTestScript.mxml b/mustella/tests/basicTests/spark/scripts/PanelControlBarTestScript.mxml
new file mode 100644
index 0000000..53d6730
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/PanelControlBarTestScript.mxml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.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[
+ ]]>
+ </mx:Script>
+
+ <testCases>
+<!--
+-->
+ <TestCase testID="SetupSparkPanelControlBarTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkPanelControlBarTest"
+ waitEvent="updateComplete" />
+ <AssertPropertyValue target="sparkPanelControlBarTests.contentButton" propertyName="label" value="Content Button" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkPanelControlBarTest1">
+ <body>
+ <DispatchMouseEvent target="sparkPanelControlBarTests.contentButton" type="mouseOver" localX="10" localY="10" />
+ <DispatchMouseClickEvent target="sparkPanelControlBarTests.contentButton" localX="10" localY="10" />
+ <AssertPropertyValue target="sparkPanelControlBarTests.contentTextInput" propertyName="text" value="content clicked" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkPanelControlBarTest2">
+ <body>
+ <DispatchMouseEvent target="sparkPanelControlBarTests.controlButton" type="mouseOver" localX="10" localY="10" />
+ <DispatchMouseClickEvent target="sparkPanelControlBarTests.controlButton" localX="10" localY="10" />
+ <AssertPropertyValue target="sparkPanelControlBarTests.controlTextInput" propertyName="text" value="control clicked" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/RadioButtonTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/RadioButtonTestScript.mxml b/mustella/tests/basicTests/spark/scripts/RadioButtonTestScript.mxml
new file mode 100644
index 0000000..9b9de98
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/RadioButtonTestScript.mxml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.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[
+ ]]>
+ </mx:Script>
+
+ <testCases>
+<!--
+-->
+ <TestCase testID="SetupSparkRadioButtonTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkRadioButtonTest"
+ waitEvent="updateComplete" />
+ <AssertPropertyValue target="sparkRadioButtonTests.testRadio1" propertyName="label" value="test Radio1" />
+ <AssertPropertyValue target="sparkRadioButtonTests.testRadio2" propertyName="label" value="test Radio2" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkRadioButtonTest1">
+ <body>
+ <DispatchMouseEvent target="sparkRadioButtonTests.testRadio1" type="mouseOver" localX="10" localY="10" />
+ <DispatchMouseClickEvent target="sparkRadioButtonTests.testRadio1" localX="10" localY="10" />
+ <AssertPropertyValue target="sparkRadioButtonTests.testRadio1" propertyName="selected" value="true" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkRadioButtonTest2">
+ <body>
+ <DispatchMouseEvent target="sparkRadioButtonTests.testRadio2" type="mouseOver" localX="10" localY="10" />
+ <DispatchMouseClickEvent target="sparkRadioButtonTests.testRadio2" localX="10" localY="10" />
+ <AssertPropertyValue target="sparkRadioButtonTests.testRadio1" propertyName="selected" value="false" />
+ <AssertPropertyValue target="sparkRadioButtonTests.testRadio2" propertyName="selected" value="true" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1c4ff6c5/mustella/tests/basicTests/spark/scripts/ScrollBarTestScript.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/basicTests/spark/scripts/ScrollBarTestScript.mxml b/mustella/tests/basicTests/spark/scripts/ScrollBarTestScript.mxml
new file mode 100644
index 0000000..c50ac28
--- /dev/null
+++ b/mustella/tests/basicTests/spark/scripts/ScrollBarTestScript.mxml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<UnitTester xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="main.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[
+ ]]>
+ </mx:Script>
+
+ <testCases>
+<!--
+-->
+ <TestCase testID="SetupSparkScrollBarTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="sparkScrollBarTest"
+ waitEvent="updateComplete" />
+ <AssertPropertyValue target="sparkScrollBarTests.testVScrollBar" propertyName="value" value="0" />
+ </body>
+ </TestCase>
+ <TestCase testID="SparkVScrollBarTest1">
+ <body>
+ <DispatchMouseEvent target="sparkScrollBarTests.testVScrollBar" type="mouseDown" localX="3" localY="60" waitEvent="changeStart" />
+ <DispatchMouseEvent target="sparkScrollBarTests.testVScrollBar" type="mouseUp" localX="3" localY="60" waitEvent="changeEnd" />
+ <DispatchMouseEvent target="sparkScrollBarTests.testVScrollBar" type="mouseDown" localX="3" localY="60" waitEvent="change" />
+ <AssertPropertyValue target="sparkScrollBarTests.testVScrollBar" propertyName="value" value="40" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>