blob: e8b0d6e0cb13ad547e81cdde519cf28c5f6d9558 [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/List/events/"
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="*"
xmlns:comps="comps.*" testSWF="ListEvents_Main.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 -->
<testCases>
<TestCase testID="List_ItemRollOver" keywords="[List, itemRollOver]" description="Rolling over an item in a list to check for itemRollOver event">
<setup>
<ResetComponent target="myListEventsComp" className="comps.ListEventsComp" waitEvent="updateComplete" />
</setup>
<body>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="rollOver" waitEvent="rollOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="mouseOver" waitEvent="mouseOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseMove" waitEvent="mouseMove"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseOut" waitEvent="mouseOut"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="rollOver" waitEvent="itemRollOver"/>
</body>
</TestCase>
<TestCase testID="List_ItemRollOut" keywords="[List, itemRollOut]" description="Rolling out of an item in a list to check for itemRollOut event">
<setup>
<ResetComponent target="myListEventsComp" className="comps.ListEventsComp" waitEvent="updateComplete" />
</setup>
<body>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="rollOver" waitEvent="rollOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="mouseOver" waitEvent="mouseOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseMove" waitEvent="mouseMove"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseOut" waitEvent="mouseOut"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="rollOut" waitEvent="itemRollOut"/>
</body>
</TestCase>
<TestCase testID="List_ItemRollOver_ItemRollOut" keywords="[List, itemRollOver, itemRollOut]" description="Rolling over from one item to another and then rolling out. Check for both itemRollOver and itemRollOut events">
<setup>
<ResetComponent target="myListEventsComp" className="comps.ListEventsComp" waitEvent="updateComplete" />
</setup>
<body>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="rollOver" waitEvent="rollOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="mouseOver" waitEvent="mouseOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseMove" waitEvent="mouseMove"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseOut" waitEvent="mouseOut"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="rollOver" waitEvent="itemRollOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseOver" waitEvent="mouseOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="70" type="mouseMove" waitEvent="mouseMove"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="70" type="mouseOut" waitEvent="mouseOut"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="70" type="rollOut" waitEvent="itemRollOut"/>
</body>
</TestCase>
<TestCase testID="List_SelectItem_MouseClick_ItemRollOver" keywords="[List, itemRollOver, select item]" description="Selecting an item in the list and then rolling over">
<setup>
<ResetComponent target="myListEventsComp" className="comps.ListEventsComp" waitEvent="updateComplete" />
</setup>
<body>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="rollOver" waitEvent="rollOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="mouseOver" waitEvent="mouseOver"/>
<DispatchMouseClickEvent target="myListEventsComp" localX="12" localY="10" waitEvent="click"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseMove" waitEvent="mouseMove"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseOut" waitEvent="mouseOut"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="rollOver" waitEvent="itemRollOver"/>
</body>
</TestCase>
<TestCase testID="List_SelectItem_Programmatic_ItemRollOver" keywords="[List, itemRollOver, select item]" description="Selecting an item in the list and then rolling over">
<setup>
<ResetComponent target="myListEventsComp" className="comps.ListEventsComp" waitEvent="updateComplete" />
<SetProperty propertyName="selectedIndex" value="0" target="myListEventsComp" waitEvent="updateComplete" />
</setup>
<body>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="rollOver" waitEvent="rollOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="mouseOver" waitEvent="mouseOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseMove" waitEvent="mouseMove"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseOut" waitEvent="mouseOut"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="rollOver" waitEvent="itemRollOver"/>
</body>
</TestCase>
<TestCase testID="List_SelectItem_ItemRollOut" keywords="[List, itemRollOut, select item]" description="Selecting an item in the list and then rolling out">
<setup>
<ResetComponent target="myListEventsComp" className="comps.ListEventsComp" waitEvent="updateComplete" />
</setup>
<body>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="rollOver" waitEvent="rollOver"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="10" type="mouseOver" waitEvent="mouseOver"/>
<DispatchMouseClickEvent target="myListEventsComp" localX="12" localY="10" waitEvent="click"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseMove" waitEvent="mouseMove"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="mouseOut" waitEvent="mouseOut"/>
<DispatchMouseEvent target="myListEventsComp" localX="12" localY="40" type="rollOut" waitEvent="itemRollOut"/>
</body>
</TestCase>
</testCases>
</UnitTester>