blob: 38888f3dcab40b7109ee8b41f1ca9db343e481ec [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="components/RadioButton/Styles/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="RadioButton_Basic2.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 -->
<testCases>
<TestCase testID="RadioButton_Styles_Mirroring_RTL" keywords="[RadioButton, Styles, Mirroring]" description="Test layoutDirection rtl with RadioButton">
<setup>
<ResetComponent target="rb" className="mx.controls::RadioButton" waitEvent="updateComplete" waitTarget="rb"/>
<SetProperty target="rb" propertyName="label" value="Hello World!!!" waitEvent="updateComplete" waitTarget="rb"/>
</setup>
<body>
<CompareBitmap target="rb" url="../Styles/baselines/$testID_1.png"/>
<SetStyle target="rb" styleName="layoutDirection" value="rtl" waitEvent="updateComplete"/>
<CompareBitmap target="rb" url="../Styles/baselines/$testID_2.png"/>
</body>
</TestCase>
<TestCase testID="RadioButton_Styles_Mirroring_RTL_selection" keywords="[RadioButton, Styles, Mirroring]" description="Test selecting the button with layoutDirection rtl with RadioButton">
<setup>
<ResetComponent target="rb" className="mx.controls::RadioButton" waitEvent="updateComplete" waitTarget="rb"/>
<SetProperty target="rb" propertyName="label" value="Hello World!!!" waitEvent="updateComplete" waitTarget="rb"/>
</setup>
<body>
<SetStyle target="rb" styleName="layoutDirection" value="rtl" waitEvent="updateComplete"/>
<DispatchMouseClickEvent target="rb" localX="6" localY="8" waitEvent="click"/>
<AssertPropertyValue target="rb" propertyName="selected" value="true"/>
<CompareBitmap target="rb" url="../Styles/baselines/$testID.png"/>
</body>
</TestCase>
<TestCase testID="RadioButton_Styles_Mirroring_RTL_focusRing" keywords="[RadioButton, Styles, Mirroring]" description="Test focusRing with layoutDirection rtl with RadioButton">
<setup>
<ResetComponent target="rb" className="mx.controls::RadioButton" waitEvent="updateComplete" waitTarget="rb"/>
<SetProperty target="rb" propertyName="label" value="Hello World!!!" waitEvent="updateComplete" waitTarget="rb"/>
</setup>
<body>
<SetStyle target="rb" styleName="layoutDirection" value="rtl" waitEvent="updateComplete"/>
<DispatchKeyEvent keys="[TAB, TAB, TAB, TAB, TAB]" waitEvent="focusIn" waitTarget="rb"/>
<CompareBitmap target="rb" url="../Styles/baselines/$testID.png"/>
</body>
</TestCase>
<TestCase testID="RadioButton_Styles_Mirroring_RTL_focusRing2" keywords="[RadioButton, Styles, Mirroring]" description="Test focusRing with layoutDirection rtl with RadioButton">
<setup>
<ResetComponent target="rb" className="mx.controls::RadioButton" waitEvent="updateComplete" waitTarget="rb"/>
<SetStyle target="tn" styleName="layoutDirection" value="rtl" waitEvent="updateComplete"/>
</setup>
<body>
<DispatchKeyEvent keys="[TAB, TAB, TAB]" waitEvent="focusIn" waitTarget="tn.rb1"/>
<CompareBitmap target="tn" url="../Styles/baselines/$testID.png"/>
<SetStyle target="tn" styleName="layoutDirection" value="ltr" waitEvent="updateComplete"/>
</body>
</TestCase>
<TestCase testID="RadioButton_Styles_Mirroring_RTL_parentContainer" keywords="[RadioButton, Styles, Mirroring]" description="Test setting layoutDirection rtl on parentContainer with RadioButton">
<setup>
<ResetComponent target="rb" className="mx.controls::RadioButton" waitEvent="updateComplete" waitTarget="rb"/>
<SetStyle target="tn" styleName="layoutDirection" value="rtl" waitEvent="updateComplete"/>
</setup>
<body>
<CompareBitmap target="tn" url="../Styles/baselines/$testID.png"/>
<SetStyle target="tn" styleName="layoutDirection" value="ltr" waitEvent="updateComplete"/>
</body>
</TestCase>
</testCases>
</UnitTester>