blob: ab3b4232e1923a29cf0a93939e1e1631ff60ce22 [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="containers/form/integration/" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:m="http://ns.adobe.com/mxml/2009" xmlns="*" testSWF="Form_Mirroring.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>
<TestCase testID="Form_Integration_mirroring_defaults" keywords="[Form,Mirroring]" description="check default values on form elements">
<setup>
<ResetComponent target="mirrorRoot" className="comps.MirroringGroup" waitEvent="updateComplete" />
</setup>
<body>
<AssertStyleValue target="mirrorRoot.targetForm" styleName="direction" value="ltr" />
<AssertStyleValue target="mirrorRoot.targetForm" styleName="layoutDirection" value="ltr" />
<AssertStyleValue target="mirrorRoot.formHeading" styleName="direction" value="ltr" />
<AssertStyleValue target="mirrorRoot.formHeading" styleName="layoutDirection" value="ltr" />
<AssertStyleValue target="mirrorRoot.nameFormItem" styleName="direction" value="ltr" />
<AssertStyleValue target="mirrorRoot.nameFormItem" styleName="layoutDirection" value="ltr" />
</body>
</TestCase>
<TestCase testID="Form_Integration_mirroring_visual" keywords="[Form,Mirroring]" description="visually check things mirror properly">
<setup>
<ResetComponent target="mirrorRoot" className="comps.MirroringGroup" waitEvent="updateComplete" />
</setup>
<body>
<SetStyle target="mirrorRoot" styleName="direction" value="rtl" waitEvent="updateComplete" />
<SetStyle target="mirrorRoot" styleName="layoutDirection" value="rtl" waitEvent="updateComplete" />
<AssertStyleValue target="mirrorRoot" styleName="layoutDirection" value="rtl" />
<AssertStyleValue target="mirrorRoot" styleName="direction" value="rtl" />
<CompareBitmap url="../integration/baselines/$testID.png" target="mirrorRoot" numColorVariances="10" maxColorVariance="10" />
</body>
</TestCase>
<TestCase testID="Form_Integration_mirroring_errorToolTip" keywords="[Form,Mirroring]" description="check the error tooltip">
<setup>
<ResetComponent target="mirrorRoot" className="comps.MirroringGroup" waitEvent="updateComplete" />
</setup>
<body>
<SetStyle target="mirrorRoot" styleName="direction" value="rtl" waitEvent="updateComplete" />
<SetStyle target="mirrorRoot" styleName="layoutDirection" value="rtl" waitEvent="updateComplete" />
<AssertStyleValue target="mirrorRoot" styleName="direction" value="rtl" />
<AssertStyleValue target="mirrorRoot" styleName="layoutDirection" value="rtl" />
<DispatchMouseClickEvent target="mirrorRoot.inputRadio" localX="5" localY="5" waitEvent="updateComplete" />
<DispatchMouseClickEvent target="mirrorRoot" localX="0" localY="0" />
<DispatchMouseEvent type="mouseMove" target="mirrorRoot.inputRadio" localX="2" localY="2" />
<DispatchMouseEvent type="mouseOver" target="mirrorRoot.inputRadio" localX="2" localY="2" />
<DispatchMouseEvent type="rollOver" target="mirrorRoot.inputRadio" localX="2" localY="2" waitEvent="toolTipShown" />
<CompareBitmap url="../integration/baselines/$testID.png" target="mirrorRoot" numColorVariances="10" maxColorVariance="10" />
</body>
</TestCase>
</testCases>
</UnitTester>