| <?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/methods/" 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="ListRETBasic.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[ |
| import comps.*; |
| import spark.layouts.*; |
| import mx.collections.ArrayCollection; |
| ]]> |
| </fx:Script> |
| <testCases> |
| |
| <TestCase testID="CustomList_method_ac_setItemAt_RET" keywords="[List, method,arrayCollection,binding, setItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" waitTarget="list1"/> |
| <ResetComponent target="list2" className="comps.ItemRendRETLabelComp" waitEvent="updateComplete" waitTarget="list2" /> |
| <ResetComponent target="list3" className="comps.ItemRendRETComp" waitEvent="updateComplete" waitTarget="list3" /> |
| <ResetComponent target="list4" className="comps.HListComp" waitEvent="updateComplete" waitTarget="list4" /> |
| <ResetComponent target="list5" className="comps.VListComp" waitEvent="updateComplete" waitTarget="list5" /> |
| <ResetComponent target="list6" className="comps.TListComp" waitEvent="updateComplete" waitTarget="list6" /> |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete"/> |
| <SetProperty target="list1" propertyName="selectedIndex" value="2" waitEvent="valueCommit" waitTarget="list1"/> |
| <RunCode code="application.list1.dataProvider.setItemAt(application.objRET,2);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <SetProperty target="list1" propertyName="height" value="70" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="240" waitEvent="updateComplete" waitTarget="list1"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_method_ac_addItemAt_RET" keywords="[List, method,arrayCollection,binding, addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete"/> |
| <RunCode code="application.list1.dataProvider.addItem(application.objRET);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <Pause timeout="200"/> |
| <SetProperty target="list1" propertyName="selectedIndex" value="10" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="percentHeight" value="30" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="percentWidth" value="30" waitEvent="updateComplete" /> |
| <Pause timeout="400"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_method_ac_addItem_RET" keywords="[List, method,arrayCollection,binding, addItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete"/> |
| <SetProperty target="list1" propertyName="selectedIndex" value="9" waitEvent="valueCommit" waitTarget="list1"/> |
| <RunCode code="application.list1.dataProvider.addItem(application.objRET);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <Pause timeout="200"/> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndex" value="9" /> |
| <SetProperty target="list1" propertyName="percentHeight" value="30" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="percentWidth" value="30" waitEvent="updateComplete" /> |
| <Pause timeout="400"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_method_ac_removeItem_RET" keywords="[List, method,arrayCollection,binding, removeItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="selectedIndex" value="1" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="percentHeight" value="30" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="percentWidth" value="30" waitEvent="updateComplete" /> |
| <RunCode code="application.list1.dataProvider.removeItemAt(1);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndex" value="-1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_method_ac_removeItem_last" keywords="[List, method,arrayCollection,binding, removeItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete"/> |
| <SetProperty target="list1" propertyName="selectedIndex" value="9" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="percentHeight" value="30" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="percentWidth" value="30" waitEvent="updateComplete" /> |
| |
| <RunCode code="application.list1.dataProvider.removeItemAt(9);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndex" value="-1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_method_ac_removeAll_RET" keywords="[List, method,arrayCollection,binding, removeAll]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete"/> |
| <SetProperty target="list1" propertyName="selectedIndex" value="9" waitEvent="valueCommit" waitTarget="list1"/> |
| |
| <RunCode code="application.list1.dataProvider.removeAll();" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| |
| <SetProperty target="list1" propertyName="percentHeight" value="30" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="percentWidth" value="30" waitEvent="updateComplete" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndex" value="-1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_ms_method_arrayCollection_setItemAt_RET" keywords="[List, method,arrayCollection,binding, setItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| |
| </setup> |
| <body> |
| |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[2]" waitEvent="valueCommit" waitTarget="list1"/> |
| <RunCode code="application.list1.dataProvider.setItemAt(application.objRET,2);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <Pause timeout="100"/> |
| <SetProperty target="list1" propertyName="percentHeight" value="50" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="percentWidth" value="50" waitEvent="updateComplete" /> |
| <Pause timeout="100"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CustomList_ms_method_arrayCollection_addItemAt_RET" keywords="[List, method,arrayCollection,binding, addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete"/> |
| <RunCode code="application.list1.dataProvider.addItem(application.objRET);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <Pause timeout="100"/> |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[10,0]" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="percentHeight" value="50" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="percentWidth" value="50" waitEvent="updateComplete" /> |
| <Pause timeout="100"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CustomList_ms_method_arrayCollection_addItem_RET" keywords="[List, method,arrayCollection,binding, addItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete"/> |
| |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[9,0]" waitEvent="valueCommit" waitTarget="list1"/> |
| |
| <RunCode code="application.list1.dataProvider.addItem(application.objRET);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <Pause timeout="100"/> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndices" value="[9,0]" /> |
| <SetProperty target="list1" propertyName="percentHeight" value="50" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="percentWidth" value="50" waitEvent="updateComplete" /> |
| <Pause timeout="100"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CustomList_ms_method_arrayCollection_removeItem_RET" keywords="[List, method,arrayCollection,binding, removeItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| |
| </setup> |
| <body> |
| |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[0,1]" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="percentHeight" value="50" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="percentWidth" value="50" waitEvent="updateComplete" /> |
| |
| <RunCode code="application.list1.dataProvider.removeItemAt(1);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndices" value="[0]" /> |
| |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CustomList_ms_method_arrayCollection_removeItem_last" keywords="[List, method,arrayCollection,binding, removeItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete"/> |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[0,9]" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="percentHeight" value="50" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="percentWidth" value="50" waitEvent="updateComplete" /> |
| |
| <RunCode code="application.list1.dataProvider.removeItemAt(9);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndices" value="[0]" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CustomList_ms_method_ac_removeAll_RET" keywords="[List, method,arrayCollection,binding, removeAll]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| |
| </setup> |
| <body> |
| |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[2]" waitEvent="valueCommit" waitTarget="list1"/> |
| |
| <RunCode code="application.list1.dataProvider.removeAll();" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <SetProperty target="list1" propertyName="percentHeight" value="50" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="percentWidth" value="50" waitEvent="updateComplete" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndex" value="-1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_method_setItemAt_RET" keywords="[List, method,arrayCollection,binding, setItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="selectedIndex" value="2" waitEvent="valueCommit" waitTarget="list1"/> |
| <RunCode code="application.list1.dataProvider.setItemAt(application.objRET,2);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <Pause timeout="100"/> |
| <SetProperty target="list1" propertyName="height" value="100" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="100" waitEvent="updateComplete" /> |
| <Pause timeout="100"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_method_addItemAt_RET" keywords="[List, method,arrayCollection,binding, addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| </setup> |
| <body> |
| |
| <RunCode code="application.list1.dataProvider.addItem(application.objRET);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <Pause timeout="100"/> |
| <SetProperty target="list1" propertyName="selectedIndex" value="0" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="100" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="100" waitEvent="updateComplete" /> |
| <Pause timeout="100"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_method_addItem_RET" keywords="[List, method,arrayCollection,binding, addItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| </setup> |
| <body> |
| |
| |
| <SetProperty target="list1" propertyName="selectedIndex" value="1" waitEvent="valueCommit" waitTarget="list1"/> |
| |
| <RunCode code="application.list1.dataProvider.addItem(application.objRET);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <Pause timeout="100"/> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndex" value="1" /> |
| <SetProperty target="list1" propertyName="height" value="100" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="100" waitEvent="updateComplete" /> |
| <Pause timeout="100"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_method_removeItem_RET" keywords="[List, method,arrayCollection,binding, removeItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| </setup> |
| <body> |
| |
| <SetProperty target="list1" propertyName="selectedIndex" value="1" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="100" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="100" waitEvent="updateComplete" /> |
| |
| <RunCode code="application.list1.dataProvider.removeItemAt(1);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndex" value="-1" /> |
| |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_method_removeItem_icons_last" keywords="[List, method,arrayCollection,binding, removeItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| </setup> |
| <body> |
| |
| <SetProperty target="list1" propertyName="selectedIndex" value="1" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="100" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="100" waitEvent="updateComplete" /> |
| |
| <RunCode code="application.list1.dataProvider.removeItemAt(1);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndex" value="-1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_method_removeAll_RET" keywords="[List, method,arrayCollection,binding, removeAll]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| </setup> |
| <body> |
| |
| <SetProperty target="list1" propertyName="selectedIndex" value="1" waitEvent="valueCommit" waitTarget="list1"/> |
| |
| <RunCode code="application.list1.dataProvider.removeAll();" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <SetProperty target="list1" propertyName="height" value="100" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="100" waitEvent="updateComplete" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndex" value="-1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="CustomList_ms_method_arrayCollection_setItemAt2_RET" keywords="[List, method,arrayCollection,binding, setItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[2]" waitEvent="valueCommit" waitTarget="list1"/> |
| <RunCode code="application.list1.dataProvider.setItemAt(application.objRET,2);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <Pause timeout="100"/> |
| <SetProperty target="list1" propertyName="height" value="120" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="120" waitEvent="updateComplete" /> |
| <Pause timeout="100"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CustomList_ms_method_arrayCollection_addItemEnd_RET" keywords="[List, method,arrayCollection,binding, addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| |
| </setup> |
| <body> |
| |
| <RunCode code="application.list1.dataProvider.addItem(application.objRET);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <Pause timeout="100"/> |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[0,0]" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="120" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="120" waitEvent="updateComplete" /> |
| <Pause timeout="100"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CustomList_ms_method_arrayCol_addItem_RET" keywords="[List, method,arrayCollection,binding, addItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| |
| </setup> |
| <body> |
| |
| |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[1,0]" waitEvent="valueCommit" waitTarget="list1"/> |
| |
| <RunCode code="application.list1.dataProvider.addItem(application.objRET);" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <Pause timeout="100"/> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndices" value="[1,0]" /> |
| <SetProperty target="list1" propertyName="height" value="120" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="120" waitEvent="updateComplete" /> |
| <Pause timeout="100"/> |
| <CompareBitmap numColorVariances="7" ignoreMaxColorVariance="true" url="../methods/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CustomList_ms_method_arrayCol_removeItem_RET" keywords="[List, method,arrayCollection,binding, removeItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| |
| </setup> |
| <body> |
| |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[0,1]" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="120" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="120" waitEvent="updateComplete" /> |
| |
| <RunCode code="application.list1.dataProvider.removeItemAt(1);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndices" value="[0]" /> |
| |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CustomList_ms_method_arrayCollection_removeItem_icons_last" keywords="[List, method,arrayCollection,binding, removeItem]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| |
| </setup> |
| <body> |
| |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[0,1]" waitEvent="valueCommit" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="120" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="120" waitEvent="updateComplete" /> |
| |
| <RunCode code="application.list1.dataProvider.removeItemAt(1);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndices" value="[0]" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="CustomList_ms_method_arrayCollection_removeAll_RET" keywords="[List, method,arrayCollection,binding, removeAll]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="comps.ItemRendRETComp1" waitEvent="updateComplete" /> |
| |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="requireSelection" value="true" /> |
| |
| </setup> |
| <body> |
| |
| <SetProperty target="list1" propertyName="selectedIndices" valueExpression="value=new <int>[2]" waitEvent="valueCommit" waitTarget="list1"/> |
| |
| <RunCode code="application.list1.dataProvider.removeAll();" waitEvent="collectionChange" waitTarget="list1.dataProvider" /> |
| <SetProperty target="list1" propertyName="height" value="120" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="width" value="120" waitEvent="updateComplete" /> |
| <AssertPropertyValue target = "list1" propertyName="selectedIndex" value="-1" /> |
| </body> |
| </TestCase> |
| </testCases> |
| |
| |
| </UnitTester> |