| <?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/TileList/Bugs/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="TileList_Bug_Icon.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.controls.TileList; |
| import mx.styles.StyleManager; |
| import mx.managers.SystemManager; |
| |
| ]]> |
| </mx:Script> |
| <testCases> |
| |
| <TestCase testID="TileList_Shift_drag_drop" description="TileList Shift and Ctrl mutiple selection." keywords="[mouse, allowMultipleSelection, Shift, Control, KeyBoard, TileList, dragdrop]"> |
| <setup> |
| <DispatchKeyEvent key="TAB" waitEvent="focusIn" waitTarget="tl"/> |
| <DispatchKeyEvent key="END"/> |
| </setup> |
| <body> |
| <DispatchKeyEvent keys="[LEFT,LEFT,LEFT,LEFT,LEFT,LEFT,LEFT,LEFT]" shiftKey="true"/> |
| <WaitForEffectsToEnd/> |
| <DispatchMouseEvent target="stage" type="mouseOver" buttonDown="false" stageX="381" stageY="410" /> |
| <DispatchMouseEvent target="stage" type="mouseDown" buttonDown="true" stageX="381" stageY="410" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="381" stageY="410" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="481" stageY="210" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="500" stageY="100" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="515" stageY="80" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="525" stageY="56" /> |
| <DispatchKeyEvent key="TAB"/> |
| <DispatchMouseEvent target="stage" type="mouseUp" stageX="525" stageY="56" waitTarget="tl1" waitEvent="dragDrop" /> |
| <AssertPropertyValue target="tl1.dataProvider" propertyName="length" value="63" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="TileList_Shift_drag_drop_same_TL" description="TileList Shift and Ctrl mutiple selection." keywords="[mouse, allowMultipleSelection, Shift, Control, KeyBoard, TileList, dragdrop]"> |
| <setup> |
| <DispatchKeyEvent key="TAB" waitEvent="focusIn" waitTarget="tl"/> |
| <DispatchKeyEvent key="HOME"/> |
| </setup> |
| <body> |
| <DispatchKeyEvent keys="[RIGHT,RIGHT,RIGHT,RIGHT,RIGHT,RIGHT,RIGHT,RIGHT]" shiftKey="true"/> |
| <WaitForEffectsToEnd/> |
| <DispatchMouseEvent target="stage" type="mouseOver" buttonDown="false" stageX="381" stageY="56" /> |
| <DispatchMouseEvent target="stage" type="mouseDown" buttonDown="true" stageX="381" stageY="56" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="381" stageY="56" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="381" stageY="100" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="381" stageY="200" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="381" stageY="350" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="381" stageY="410" /> |
| <DispatchMouseEvent target="stage" type="mouseUp" stageX="381" stageY="410" waitTarget="tl" waitEvent="dragDrop" /> |
| <DispatchKeyEvent key="END"/> |
| <AssertPropertyValue target="tl.dataProvider" propertyName="length" value="45" /> |
| <AssertPropertyValue target="tl" propertyName="selectedIndex" value="44" /> |
| <AssertPropertyValue target="tl.selectedItem" propertyName="label" value="9" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="TileList_Shift_drag_drop_removed_Items" description="TileList Shift and Ctrl mutiple selection." keywords="[mouse, allowMultipleSelection, Shift, Control, KeyBoard, TileList, dragdrop]"> |
| <setup> |
| <DispatchKeyEvent key="HOME"/> |
| <DispatchKeyEvent keys="[RIGHT,RIGHT,RIGHT,RIGHT]" shiftKey="true"/> |
| <WaitForEffectsToEnd/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="stage" type="mouseOver" buttonDown="false" stageX="231" stageY="56" /> |
| <DispatchMouseEvent target="stage" type="mouseDown" buttonDown="true" stageX="231" stageY="56" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="231" stageY="56" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="241" stageY="60" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="300" stageY="60" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="525" stageY="60" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="525" stageY="56" /> |
| <DispatchMouseEvent target="stage" type="mouseUp" stageX="525" stageY="56" waitTarget="tl1" waitEvent="dragDrop" /> |
| <WaitForEffectsToEnd /> |
| <DispatchKeyEvent key="END"/> |
| <AssertPropertyValue target="tl.dataProvider" propertyName="length" value="40" /> |
| <AssertPropertyValue target="tl" propertyName="selectedIndex" value="39" /> |
| <AssertPropertyValue target="tl.selectedItem" propertyName="label" value="9" /> |
| </body> |
| </TestCase> |
| </testCases> |
| </UnitTester> |