You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pe...@apache.org on 2018/03/02 20:16:59 UTC
[royale-asjs] 01/01: Created mxroyale tests for Mustella. Limited
tests to just a Button.
This is an automated email from the ASF dual-hosted git repository.
pent pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 593e3b43392630b6fe283f8f49e2ffa945816d46
Author: Peter Ent <pe...@apache.org>
AuthorDate: Fri Mar 2 15:16:37 2018 -0500
Created mxroyale tests for Mustella. Limited tests to just a Button.
---
mustella/tests/basicTests/BasicTests.mxml | 24 +++++----
mustella/tests/basicTests/BasicTestsApp-config.xml | 5 +-
.../mxroyale/scripts/ButtonTestScript.mxml | 61 ++++++++++++++++++++++
.../basicTests/mxroyale/views/ButtonTests.mxml | 33 ++++++++++++
4 files changed, 111 insertions(+), 12 deletions(-)
diff --git a/mustella/tests/basicTests/BasicTests.mxml b/mustella/tests/basicTests/BasicTests.mxml
index b7b8013..2334569 100644
--- a/mustella/tests/basicTests/BasicTests.mxml
+++ b/mustella/tests/basicTests/BasicTests.mxml
@@ -25,6 +25,7 @@
xmlns:graphicsviews="graphics.views.*"
xmlns:fxgviews="fxg.views.*"
xmlns:dmvviews="dmv.views.*"
+ xmlns:mxroyale="mxroyale.views.*"
height="800" width="1000"
>
@@ -33,30 +34,31 @@
<!-- STEP 1: Add a state for your test here -->
<js:states>
- <js:State name="basicTest" />
+ <js:State name="mxroyaleTest" />
+ <!--<js:State name="basicTest" />
<js:State name="haloButtonTest" />
<js:State name="haloCheckBoxTest" />
<js:State name="haloRadioButtonTest" />
<js:State name="haloTextInputTest" />
<js:State name="haloTextAreaTest" />
- <js:State name="haloComboBoxTest" />
+ <js:State name="haloComboBoxTest" /> -->
<!--<js:State name="haloColorPickerTest" />-->
- <js:State name="haloNumericStepperTest" />
+ <!--<js:State name="haloNumericStepperTest" />-->
<!--<js:State name="haloDateFieldTest" />-->
<!--<js:State name="haloMenuTest" />-->
<!--<js:State name="haloMenuBarTest" />-->
<!--<js:State name="haloFocusManagerTest" />-->
- <js:State name="haloListAndDataGridTest" />
+ <!--<js:State name="haloListAndDataGridTest" />-->
<!--<js:State name="haloTreeTest" />-->
- <js:State name="haloImageTest" />
+ <!--<js:State name="haloImageTest" />-->
<!--<js:State name="haloSWFLoaderTest" />-->
- <js:State name="haloTextTest" />
+ <!--<js:State name="haloTextTest" />-->
<!--<js:State name="haloFTETextTest" />-->
<!--<js:State name="haloProgressBarTest" />-->
- <js:State name="haloSliderTest" />
+ <!--<js:State name="haloSliderTest" />-->
<!--<js:State name="haloTabNavigatorTest" />-->
<!--<js:State name="haloAccordionTest" />-->
- <js:State name="haloAlertTest" />
+ <!--<js:State name="haloAlertTest" />-->
<!--<js:State name="haloRPCDataBindingTest" />-->
<!--<js:State name="haloCollectionTest" />-->
<!--<js:State name="dmvADGTest" />-->
@@ -106,8 +108,10 @@
</js:states>
<!-- STEP 2: Add an mxml component with the widgets for your test here -->
- <haloviews:ButtonTests id="haloButtonTests" includeIn="haloButtonTest" />
- <haloviews:CheckBoxTests id="haloCheckBoxTests" includeIn="haloCheckBoxTest" />
+
+ <!-- <haloviews:ButtonTests id="haloButtonTests" includeIn="haloButtonTest" /> -->
+ <mxroyale:ButtonTests id="mxroyaleButtonTests" includeIn="mxroyaleTest" />
+ <!--<haloviews:CheckBoxTests id="haloCheckBoxTests" includeIn="haloCheckBoxTest" /> -->
<!-- temporary
<haloviews:RadioButtonTests id="haloRadioButtonTests" includeIn="haloRadioButtonTest" />
<haloviews:TextInputTests id="haloTextInputTests" includeIn="haloTextInputTest" />
diff --git a/mustella/tests/basicTests/BasicTestsApp-config.xml b/mustella/tests/basicTests/BasicTestsApp-config.xml
index 7af2884..8be0c87 100644
--- a/mustella/tests/basicTests/BasicTestsApp-config.xml
+++ b/mustella/tests/basicTests/BasicTestsApp-config.xml
@@ -24,8 +24,9 @@
<includes>
<!--
-->
- <symbol>halo.scripts.ButtonTestScript</symbol>
- <symbol>halo.scripts.CheckBoxTestScript</symbol>
+ <symbol>mxroyale.scripts.ButtonTestScript</symbol>
+ <!--<symbol>halo.scripts.ButtonTestScript</symbol>
+ <symbol>halo.scripts.CheckBoxTestScript</symbol>-->
<!-- temporarily
<symbol>halo.scripts.RadioButtonTestScript</symbol>
<symbol>halo.scripts.TextInputTestScript</symbol>
diff --git a/mustella/tests/basicTests/mxroyale/scripts/ButtonTestScript.mxml b/mustella/tests/basicTests/mxroyale/scripts/ButtonTestScript.mxml
new file mode 100644
index 0000000..a429428
--- /dev/null
+++ b/mustella/tests/basicTests/mxroyale/scripts/ButtonTestScript.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:Object):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="SetupButtonTest">
+ <body>
+ <SetProperty target="" propertyName="currentState" value="mxroyaleTest"
+ waitEvent="enterFrame" />
+ <AssertPropertyValue target="mxroyaleButtonTests.testButton" propertyName="text" value="test button" />
+ <AssertPropertyValue target="mxroyaleButtonTests.testLabel" propertyName="text" value="test" />
+ </body>
+ </TestCase>
+ <TestCase testID="ButtonTest1">
+ <body>
+ <DispatchMouseEvent target="mxroyaleButtonTests.testButton" type="mouseOver" localX="10" localY="10" />
+ <DispatchMouseClickEvent target="mxroyaleButtonTests.testButton" localX="10" localY="10" />
+ <AssertPropertyValue target="mxroyaleButtonTests.testLabel" propertyName="text" value="This is a test" />
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
diff --git a/mustella/tests/basicTests/mxroyale/views/ButtonTests.mxml b/mustella/tests/basicTests/mxroyale/views/ButtonTests.mxml
new file mode 100644
index 0000000..a29dba1
--- /dev/null
+++ b/mustella/tests/basicTests/mxroyale/views/ButtonTests.mxml
@@ -0,0 +1,33 @@
+<?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.
+
+-->
+<my:VBox
+ xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:js="library://ns.apache.org/royale/basic"
+ xmlns:my="shim.*" >
+
+<fx:Script>
+<![CDATA[
+]]>
+</fx:Script>
+
+ <js:TextButton id="testButton" text="test button" click="testLabel.text='This is a test'" />
+ <js:Label id="testLabel" text="test" />
+
+</my:VBox>
--
To stop receiving notification emails like this one, please contact
pent@apache.org.