| <?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/Label/Integration/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="Label_basic4.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.FlexGlobals; |
| import spark.components.Label; |
| import spark.components.RichText; |
| private var newStr:String="After the 2008 meltdown, Wall Street's quants were cast as the financial engineers of profit-driven innovation run amok. But the real failure, according to experts, was in the quants' mathematical models of risk that suggested the arcane stuff"; |
| |
| ]]> |
| </mx:Script> |
| |
| <testCases> |
| |
| <!-- |
| ==================================================================================== |
| Integration tests |
| update label value,verify all changes are correct |
| |
| ==================================================================================== |
| --> |
| |
| <TestCase testID="change_label_in_mxApp_test1" keywords="[Label,integration]" description="change label inside mxApplication,verify its UI" > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.resetTextValue()"/> |
| <Pause timeout="40"/> |
| </setup> |
| <body> |
| <SetProperty target="myLabel0" propertyName="text" value="this is a New label in mx application" waitTarget="myLabel0" waitEvent="updateComplete"/> |
| <AssertPropertyValue target="myLabel0" propertyName="text" value="this is a New label in mx application" /> |
| <CompareBitmap numColorVariances="10" maxColorVariance="10" url="../integration/baselines/$testID.png" target="myLabel0"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="change_label_in_HBox_test1" keywords="[Label,integration]" description="change label inside mxHBox,verify its UI" > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.resetTextValue()"/> |
| <Pause timeout="40"/> |
| </setup> |
| <body> |
| <SetProperty target="myLabel1" propertyName="text" value="this is a New label in HBox" waitTarget="myLabel1" waitEvent="updateComplete"/> |
| <AssertPropertyValue target="myLabel1" propertyName="text" value="this is a New label in HBox" /> |
| <CompareBitmap numColorVariances="10" maxColorVariance="10" url="../integration/baselines/$testID.png" target="myHBox"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="change_label_in_Panel_test1" keywords="[Label,integration]" description="change label inside mxPanel,verify its UI" > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.resetTextValue()"/> |
| <Pause timeout="40"/> |
| </setup> |
| <body> |
| <SetProperty target="myLabel2" propertyName="text" valueExpression="value=newStr" waitTarget="myLabel2" waitEvent="updateComplete"/> |
| <AssertPropertyValue target="myLabel2" propertyName="text" valueExpression="value=newStr" /> |
| <CompareBitmap numColorVariances="10" maxColorVariance="10" url="../integration/baselines/$testID.png" target="myPanel"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="change_label_in_Form_test1" keywords="[Label,integration]" description="change label inside mxForm,verify its UI" > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.resetTextValue()"/> |
| <Pause timeout="40"/> |
| </setup> |
| <body> |
| <SetProperty target="myLabel3" propertyName="text" value="New label in Form" waitTarget="myLabel3" waitEvent="updateComplete"/> |
| <AssertPropertyValue target="myLabel3" propertyName="text" value="New label in Form" /> |
| <CompareBitmap numColorVariances="10" maxColorVariance="10" url="../integration/baselines/$testID.png" target="myForm"/> |
| </body> |
| </TestCase> |
| |
| |
| <TestCase testID="change_label_in_ControlBar_test1" keywords="[Label,integration]" description="change label inside mxControlBar,verify its UI" > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.resetTextValue()"/> |
| <Pause timeout="40"/> |
| </setup> |
| <body> |
| <SetProperty target="myLabel5" propertyName="text" value="New inside of controlBar" waitTarget="myLabel5" waitEvent="updateComplete"/> |
| <AssertPropertyValue target="myLabel5" propertyName="text" value="New inside of controlBar" /> |
| <CompareBitmap numColorVariances="10" maxColorVariance="10" url="../integration/baselines/$testID.png" target="myControlBar"/> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| </UnitTester> |