| <?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 testDir="gumbo/components/CheckBox/properties/" |
| xmlns:m="http://ns.adobe.com/mxml/2009" |
| xmlns="*" |
| testSWF="Flex4_CheckBox_states.mxml"> |
| |
| <!-- this set of lines form a template that must be in each unit test --> |
| <m:Script> |
| <![CDATA[ |
| public static function init(o:DisplayObject):void |
| { |
| |
| } |
| ]]> |
| </m:Script> |
| |
| <m:Metadata> |
| <![CDATA[ |
| [Mixin] |
| ]]> |
| </m:Metadata> |
| <!-- end of set of lines that must be in each unit test --> |
| |
| <m:Script> |
| <![CDATA[ |
| import mx.core.FlexGlobals; |
| use namespace mx_internal; |
| ]]> |
| </m:Script> |
| |
| <testCases> |
| |
| <TestCase testID="CheckBox_states1" keywords="[FxCheckBox, CheckBox, States]" description="Check the button's label in defaultState."> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doManualReset()" waitEvent="manualResetComplete"/> |
| </setup> |
| <body> |
| <CompareBitmap url="../properties/baselines/$testID_1.png" target="stage"/> |
| <SetProperty target="" propertyName="currentState" value="state02" waitTarget="" waitEvent="currentStateChange"/> |
| <CompareBitmap url="../properties/baselines/$testID_2.png" target="stage"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CheckBox_states2" keywords="[FxCheckBox, CheckBox, States]" description="Check the button's label in defaultState."> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doManualReset()" waitEvent="manualResetComplete"/> |
| </setup> |
| <body> |
| <CompareBitmap url="../properties/baselines/$testID_1.png" target="stage" numColorVariances="6" ignoreMaxColorVariance="true"/> |
| <SetProperty target="stateCB1" propertyName="selected" value="true" waitEvent="updateComplete" waitTarget="stateCB1"/> |
| <SetProperty target="stateCB2" propertyName="selected" value="true" waitEvent="updateComplete" waitTarget="stateCB2"/> |
| <SetProperty target="stateCB5" propertyName="selected" value="true" waitEvent="updateComplete" waitTarget="stateCB5"/> |
| |
| <CompareBitmap url="../properties/baselines/$testID_2.png" target="stage" numColorVariances="6" ignoreMaxColorVariance="true"/> |
| <SetProperty target="" propertyName="currentState" value="state02" waitTarget="" waitEvent="currentStateChange" /> |
| |
| <CompareBitmap url="../properties/baselines/$testID_3.png" target="stage" numColorVariances="6" ignoreMaxColorVariance="true"/> |
| |
| <SetProperty target="stateCB3" propertyName="selected" value="true" waitEvent="updateComplete" waitTarget="stateCB3"/> |
| <SetProperty target="stateCB4" propertyName="selected" value="true" waitEvent="updateComplete" waitTarget="stateCB4"/> |
| <SetProperty target="stateCB4" propertyName="label" value="New label" waitEvent="updateComplete" waitTarget="stateCB4"/> |
| <SetProperty target="stateCB5" propertyName="selected" value="false" waitEvent="updateComplete" waitTarget="stateCB5"/> |
| |
| <CompareBitmap url="../properties/baselines/$testID_4.png" target="stage" numColorVariances="6" ignoreMaxColorVariance="true"/> |
| <SetProperty target="" propertyName="currentState" value="defaultState" waitTarget="" waitEvent="currentStateChange"/> |
| |
| <CompareBitmap url="../properties/baselines/$testID_5.png" target="stage" numColorVariances="6" ignoreMaxColorVariance="true"/> |
| <SetProperty target="stateCB5" propertyName="selected" value="true" waitEvent="updateComplete" waitTarget="stateCB5"/> |
| <SetProperty target="" propertyName="currentState" value="state02" waitTarget="" waitEvent="currentStateChange"/> |
| |
| <CompareBitmap url="../properties/baselines/$testID_6.png" target="stage" numColorVariances="6" ignoreMaxColorVariance="true"/> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| |
| </UnitTester> |