| <?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. |
| |
| --> |
| <!-- |
| Controls.mxml - the following testCases test the given effect against the UI related |
| objects in the mx.controls namespace. |
| --> |
| <UnitTester |
| testDir="spark/effects/Animate/Controls/" |
| testSWF="../SWFs/Animate_Main.mxml" |
| xmlns:mx="http://www.adobe.com/2006/mxml" |
| xmlns="*"> |
| |
| <!-- this set of lines form a template that must be in each unit test --> |
| <mx:Script> |
| <![CDATA[ |
| import Containers.TrixPanel2; |
| import Controls.*; |
| |
| 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 --> |
| |
| <testCases> |
| |
| <TestCase testID="Animate_Controls_Button" keywords="[Animate, control, Button]" description="Try to Animate a Button."> |
| <setup> |
| <RunCode code="application.uiComponent = new TrixButton()" /> |
| <ResetComponent target="testPanel" className="Containers.TrixPanel2" waitEvent="updateComplete" waitTarget="testPanel" /> |
| <RunCode code="application.testPanel.addChild(application.uiComponent)" waitEvent="updateComplete" waitTarget="testPanel" /> |
| </setup> |
| <body> |
| <RunCode code="application.ApplyEffect();" waitTarget="testEffect" waitEvent="effectEnd" /> |
| <AssertPropertyValue target="uiComponent" propertyName="x" value="74.9"/> |
| <AssertPropertyValue target="uiComponent" propertyName="y" value="89.85"/> |
| <AssertPropertyValue target="uiComponent" propertyName="alpha" value="0.398438"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Animate_Rect" keywords="[Animate, Rect]" description="Try to Animate a Rect."> |
| <body> |
| <RunCode code="application.ApplyEffectToTarget(application.rect);" waitTarget="testEffect" waitEvent="effectEnd" /> |
| <AssertPropertyValue target="rect" propertyName="x" value="100"/> |
| <AssertPropertyValue target="rect" propertyName="y" value="120"/> |
| <AssertPropertyValue target="rect" propertyName="alpha" value=".2"/> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| </UnitTester> |