more changes to get FlexJS basic tests to pass two simple tests. Needs newer mustella.swc from SDK
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/abbfdf9e Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/abbfdf9e Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/abbfdf9e Branch: refs/heads/develop Commit: abbfdf9e4b507bc273e59762d2dabfd5661f0b47 Parents: 89002bb Author: Alex Harui <[email protected]> Authored: Mon Mar 3 15:49:18 2014 -0800 Committer: Alex Harui <[email protected]> Committed: Tue Mar 11 21:36:07 2014 -0700 ---------------------------------------------------------------------- build.xml | 4 +- .../tests/basicTests/BasicTestsApp-config.xml | 17 +++++++- mustella/tests/basicTests/FlexJSContext.as | 43 ++++++++++++++++++++ .../halo/scripts/ButtonTestScript.mxml | 4 +- .../halo/scripts/CheckBoxTestScript.mxml | 4 +- 5 files changed, 65 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abbfdf9e/build.xml ---------------------------------------------------------------------- diff --git a/build.xml b/build.xml index 182ff95..1a1956a 100644 --- a/build.xml +++ b/build.xml @@ -1151,8 +1151,8 @@ Tests: The current checkintests that must be run before every checkin --> - <target name="checkintests" description="Run these tests before every checkin" /> - <!--<target name="checkintests" depends="basictests-mustella" description="Run these tests before every checkin" />--> + <!--<target name="checkintests" description="Run these tests before every checkin" />--> + <target name="checkintests" depends="basictests-mustella" description="Run these tests before every checkin" /> <!--<target name="checkintests" depends="dependencychecker-framework,basictests-mustella,checkintests-mobile" description="Run these tests before every checkin"/--> <!-- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abbfdf9e/mustella/tests/basicTests/BasicTestsApp-config.xml ---------------------------------------------------------------------- diff --git a/mustella/tests/basicTests/BasicTestsApp-config.xml b/mustella/tests/basicTests/BasicTestsApp-config.xml index e87fca1..2ab123a 100644 --- a/mustella/tests/basicTests/BasicTestsApp-config.xml +++ b/mustella/tests/basicTests/BasicTestsApp-config.xml @@ -26,25 +26,37 @@ --> <symbol>halo.scripts.ButtonTestScript</symbol> <symbol>halo.scripts.CheckBoxTestScript</symbol> + <!-- temporarily <symbol>halo.scripts.RadioButtonTestScript</symbol> <symbol>halo.scripts.TextInputTestScript</symbol> <symbol>halo.scripts.TextAreaTestScript</symbol> <symbol>halo.scripts.ComboBoxTestScript</symbol> + --> <!--<symbol>halo.scripts.ColorPickerTestScript</symbol>--> + <!-- temporarily <symbol>halo.scripts.NumericStepperTestScript</symbol> + --> <!--<symbol>halo.scripts.DateFieldTestScript</symbol>--> <!--<symbol>halo.scripts.MenuTestScript</symbol>--> <!--<symbol>halo.scripts.MenuBarTestScript</symbol>--> <!--<symbol>halo.scripts.FocusManagerTestScript</symbol>--> + <!-- temporarily <symbol>halo.scripts.ListAndDataGridTestScript</symbol> + --> <!--<symbol>halo.scripts.TreeTestScript</symbol>--> + <!-- temporarily <symbol>halo.scripts.ImageTestScript</symbol> + --> <!--<symbol>halo.scripts.SWFLoaderTestScript</symbol>--> + <!-- temporarily <symbol>halo.scripts.TextTestScript</symbol> + --> <!--<symbol>halo.scripts.FTETextTestScript</symbol>--> <!--<symbol>halo.scripts.ProgressBarTestScript</symbol>--> + <!-- temporarily <symbol>halo.scripts.SliderTestScript</symbol> <symbol>halo.scripts.AlertTestScript</symbol> + --> <!--<symbol>halo.scripts.TabNavigatorTestScript</symbol>--> <!--<symbol>halo.scripts.AccordionTestScript</symbol>--> <!--<symbol>halo.scripts.RPCDataBindingTestScript</symbol>--> @@ -79,7 +91,9 @@ <!--<symbol>spark.scripts.FXG2RuntimeTestScript</symbol>--> <!--<symbol>dmv.scripts.ADGTestScript</symbol>--> <!--<symbol>dmv.scripts.ODGTestScript</symbol>--> - <symbol>dmv.scripts.ChartsTestScript</symbol> + <!-- temporarily + <symbol>dmv.scripts.ChartsTestScript</symbol> + --> <!--<symbol>spark.scripts.AnimateConstraintsTestScript</symbol>--> <!--<symbol>spark.scripts.ImageTestScript</symbol>--> <!--<symbol>spark.scripts.DateTimeFormatterTestScript</symbol>--> @@ -98,5 +112,6 @@ <symbol>ExitWhenDone</symbol> <symbol>SetShowRTE</symbol> <symbol>SendFormattedResultsToLog</symbol> + <symbol>FlexJSContext</symbol> </includes> </flex-config> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abbfdf9e/mustella/tests/basicTests/FlexJSContext.as ---------------------------------------------------------------------- diff --git a/mustella/tests/basicTests/FlexJSContext.as b/mustella/tests/basicTests/FlexJSContext.as new file mode 100644 index 0000000..4f03402 --- /dev/null +++ b/mustella/tests/basicTests/FlexJSContext.as @@ -0,0 +1,43 @@ +//////////////////////////////////////////////////////////////////////////////// +// +// 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. +// +//////////////////////////////////////////////////////////////////////////////// +package +{ + +[Mixin] +public class FlexJSContext +{ + public function FlexJSContext() + { + super(); + } + + public static function init(o:Object):void + { + UnitTester.contextFunction = contextFunction; + } + + public static function contextFunction():Object + { + return UnitTester._root["initialView"]; + } +} + + +} + http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abbfdf9e/mustella/tests/basicTests/halo/scripts/ButtonTestScript.mxml ---------------------------------------------------------------------- diff --git a/mustella/tests/basicTests/halo/scripts/ButtonTestScript.mxml b/mustella/tests/basicTests/halo/scripts/ButtonTestScript.mxml index 50792b9..096e528 100644 --- a/mustella/tests/basicTests/halo/scripts/ButtonTestScript.mxml +++ b/mustella/tests/basicTests/halo/scripts/ButtonTestScript.mxml @@ -45,8 +45,8 @@ <TestCase testID="SetupButtonTest"> <body> <SetProperty target="" propertyName="currentState" value="haloButtonTest" - waitEvent="updateComplete" /> - <AssertPropertyValue target="haloButtonTests.testButton" propertyName="label" value="test button" /> + waitEvent="enterFrame" /> + <AssertPropertyValue target="haloButtonTests.testButton" propertyName="text" value="test button" /> <AssertPropertyValue target="haloButtonTests.testLabel" propertyName="text" value="test" /> </body> </TestCase> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/abbfdf9e/mustella/tests/basicTests/halo/scripts/CheckBoxTestScript.mxml ---------------------------------------------------------------------- diff --git a/mustella/tests/basicTests/halo/scripts/CheckBoxTestScript.mxml b/mustella/tests/basicTests/halo/scripts/CheckBoxTestScript.mxml index b0fa0d0..a7ad95d 100644 --- a/mustella/tests/basicTests/halo/scripts/CheckBoxTestScript.mxml +++ b/mustella/tests/basicTests/halo/scripts/CheckBoxTestScript.mxml @@ -45,8 +45,8 @@ <TestCase testID="SetupCheckBoxTest"> <body> <SetProperty target="" propertyName="currentState" value="haloCheckBoxTest" - waitEvent="updateComplete" /> - <AssertPropertyValue target="haloCheckBoxTests.testCheckBox" propertyName="label" value="test CheckBox" /> + waitEvent="enterFrame" /> + <AssertPropertyValue target="haloCheckBoxTests.testCheckBox" propertyName="text" value="test CheckBox" /> </body> </TestCase> <TestCase testID="CheckBoxTest1">
