| <?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 xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns:mx="http://www.adobe.com/2006/mxml" |
| xmlns="*" |
| testDir="components/List/Properties/" |
| testSWF="SparkList_Basic.mxml"> |
| |
| <mx:Metadata><![CDATA[ |
| [Mixin] |
| ]]></mx:Metadata> |
| |
| <mx:Script><![CDATA[ |
| |
| import mx.collections.ArrayCollection; |
| |
| public static function init(o:DisplayObject):void {} |
| |
| [Bindable] |
| private var dp_:ArrayCollection = new ArrayCollection( |
| [ '1', '2', '3', '4', '5', '6' ]); |
| |
| [Bindable] |
| private var si_:Vector.<int> = new <int>[4, 5]; |
| |
| ]]></mx:Script> |
| |
| <testCases> |
| <TestCase testID="Spark_list_properties_bugs_FLEX-34657" |
| keywords="[Spark, List, selectedIndices, bugs, FLEX-34657]"> |
| <setup> |
| <SetProperty target="sprkList" propertyName="allowMultipleSelection" |
| value= "true" /> |
| <SetProperty target="sprkList" propertyName="dataProvider" |
| value= "{dp_}" /> |
| </setup> |
| <body> |
| <DispatchKeyEvent keys="[TAB]" waitTarget="sprkList" waitEvent="focusIn" /> |
| <DispatchKeyEvent keys="[END]" waitTarget="sprkList" waitEvent="updateComplete" /> |
| |
| <DispatchMouseClickEvent target="sprkList" localX="5" localY="5" waitEvent="change" waitTarget="sprkList" /> <!-- 1 --> |
| <WaitForEffectsToEnd/> |
| <AssertPropertyValue target="sprkList" propertyName="selectedIndices" valueExpression="value=[0]" /> |
| |
| <DispatchMouseClickEvent target="sprkList" localX="5" localY="30" ctrlKey="true" waitEvent="change" waitTarget="sprkList" /> <!-- 2 --> |
| <WaitForEffectsToEnd/> |
| <AssertPropertyValue target="sprkList" propertyName="selectedIndices" valueExpression="value=[1,0]" /> |
| |
| <DispatchMouseClickEvent target="sprkList" localX="5" localY="55" ctrlKey="true" waitEvent="change" waitTarget="sprkList" /> <!-- 3 --> |
| <WaitForEffectsToEnd/> |
| <!-- AssertPropertyValue target="sprkList" propertyName="selectedIndices" valueExpression="value=[2,0,1]" / --> |
| <AssertPropertyValue target="sprkList" propertyName="selectedIndices" valueExpression="value=[2,1,0]" /> |
| |
| <DispatchMouseClickEvent target="sprkList" localX="5" localY="80" ctrlKey="true" waitEvent="change" waitTarget="sprkList" /> <!-- 4 --> |
| <WaitForEffectsToEnd/> |
| <!-- AssertPropertyValue target="sprkList" propertyName="selectedIndices" valueExpression="value=[3,1,0,2]" / --> |
| <AssertPropertyValue target="sprkList" propertyName="selectedIndices" valueExpression="value=[3,2,1,0]" /> |
| |
| <DispatchMouseClickEvent target="sprkList" localX="5" localY="105" ctrlKey="true" waitEvent="change" waitTarget="sprkList" /> <!-- 5 --> |
| <WaitForEffectsToEnd/> |
| <!-- AssertPropertyValue target="sprkList" propertyName="selectedIndices" valueExpression="value=[4,2,0,1,3]" / --> |
| <AssertPropertyValue target="sprkList" propertyName="selectedIndices" valueExpression="value=[4,3,2,1,0]" /> |
| |
| <DispatchMouseClickEvent target="sprkList" localX="5" localY="135" ctrlKey="true" waitEvent="change" waitTarget="sprkList" /> <!-- 6 --> |
| <WaitForEffectsToEnd/> |
| <!-- AssertPropertyValue target="sprkList" propertyName="selectedIndices" valueExpression="value=[5,3,1,0,2,4]" /--> |
| <AssertPropertyValue target="sprkList" propertyName="selectedIndices" valueExpression="value=[5,4,3,2,1,0]" /> |
| </body> |
| </TestCase> |
| </testCases> |
| |
| </UnitTester> |