blob: d6a9e3feb308a92afaf238b49417f617c4429da3 [file] [log] [blame]
<?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/TextInput/Properties/" xmlns="*"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
testSWF="Flex4_TextInput_bindable.mxml">
<!-- this set of lines form a template that must be in each unit test -->
<fx:Script>
<![CDATA[
public static function init(o:DisplayObject):void {
}
]]>
</fx:Script>
<fx:Metadata>
<![CDATA[
[Mixin]
]]>
</fx:Metadata>
<!-- end of set of lines that must be in each unit test -->
<fx:Script>
<![CDATA[
]]>
</fx:Script>
<testCases>
<!-- ******************** ******************** ******************** -->
<!-- ******************** TEXTINPUT PROPERTIES ******************** -->
<!-- ******************** ******************** ******************** -->
<!-- ******************** selectionActivePosition ******************** -->
<!-- NOT SUPPORTED -->
<!--
<TestCase testID="Gumbo_TextInput_selectionActivePosition_property_bindable" description="Checks the selectionActivePosition property on a TextInput control is bindable" keywords="[TextInput, selectionActivePosition, property]">
<setup>
<ResetComponent target="textInput" className="spark.components.TextInput" waitEvent="updateComplete" waitTarget="textInput" />
<SetProperty target="textInput" propertyName="text" value="The quick brown fox" waitEvent="updateComplete" waitTarget="textInput"/>
</setup>
<body>
<SetProperty target="textInput" propertyName="selectionActivePosition" value="5" waitEvent="updateComplete" waitTarget="textInput"/>
<AssertPropertyValue target="textInput2" propertyName="selectionActivePosition" value="5" />
</body>
</TestCase>
-->
<!-- ******************** selectionAnchorPosition ******************** -->
<!-- NOT SUPPORTED -->
<!--
<TestCase testID="Gumbo_TextInput_selectionAnchorPosition_property_bindable" description="Checks the selectionAnchorPosition property on a TextInput control is bindable" keywords="[TextInput, selectionAnchorPosition, property]">
<setup>
<ResetComponent target="textInput" className="spark.components.TextInput" waitEvent="updateComplete" waitTarget="textInput" />
<SetProperty target="textInput" propertyName="text" value="The quick brown fox" waitEvent="updateComplete" waitTarget="textInput"/>
</setup>
<body>
<SetProperty target="textInput" propertyName="selectionAnchorPosition" value="10" waitEvent="selectionChange" waitTarget="textInput"/>
<AssertPropertyValue target="textInput2" propertyName="selectionAnchorPosition" value="10" />
</body>
</TestCase>
-->
<!-- ******************** text ******************** -->
<TestCase testID="Gumbo_TextInput_text_property_bindable" description="Checks the text property on a TextInput control is bindable" keywords="[TextInput, text, property]">
<setup>
<ResetComponent target="textInput" className="spark.components.TextInput" waitEvent="updateComplete" waitTarget="textInput" />
</setup>
<body>
<SetProperty target="textInput" propertyName="text" value="jello world" waitEvent="updateComplete" waitTarget="textInput"/>
<AssertPropertyValue target="textInput2" propertyName="text" value="jello world" />
</body>
</TestCase>
<!-- ******************** prompt ******************** -->
<TestCase testID="TextInput_prompt_property_bindable" description="Checks the prompt property on a TextInput control is bindable" keywords="[TextInput, prompt, property, bindable]">
<setup>
<ResetComponent target="textInput3" className="spark.components.TextInput" waitEvent="updateComplete" waitTarget="textInput3" />
<ResetComponent target="textInput" className="spark.components.TextInput" waitEvent="updateComplete" waitTarget="textInput" />
</setup>
<body>
<SetProperty target="textInput3" propertyName="text" value="jello world" waitEvent="updateComplete" waitTarget="textInput3"/>
<AssertPropertyValue target="textInput2" propertyName="prompt" value="jello world" />
<CompareBitmap url="../Properties/baselines/$testID.png" target="textInput2" />
</body>
</TestCase>
<!-- ******************** ******************** ******************** -->
<!-- ******************** INHERITED PROPERTIES ******************** -->
<!-- ******************** ******************** ******************** -->
<!-- ******************** height ******************** -->
<TestCase testID="Gumbo_TextInput_height_property_bindable" description="Checks the height property on a TextInput control is bindable" keywords="[TextInput, height, property]">
<setup>
<ResetComponent target="textInput" className="spark.components.TextInput" waitEvent="updateComplete" waitTarget="textInput" />
</setup>
<body>
<SetProperty target="textInput" propertyName="height" value="40" waitEvent="updateComplete" waitTarget="textInput"/>
<AssertPropertyValue target="textInput2" propertyName="height" value="40" />
</body>
</TestCase>
<!-- ******************** width ******************** -->
<TestCase testID="Gumbo_TextInput_width_property_bindable" description="Checks the width property on a TextInput control is bindable" keywords="[TextInput, width, property]">
<setup>
<ResetComponent target="textInput" className="spark.components.TextInput" waitEvent="updateComplete" waitTarget="textInput" />
</setup>
<body>
<SetProperty target="textInput" propertyName="width" value="40" waitEvent="resize" waitTarget="textInput"/>
<AssertPropertyValue target="textInput2" propertyName="width" value="40" />
</body>
</TestCase>
</testCases>
</UnitTester>