| <?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/properties/" 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="*" testSWF="ListBasic.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 mx.collections.*; |
| import spark.layouts.*; |
| |
| ]]> |
| </fx:Script> |
| <testCases> |
| <TestCase testID="List_keyboardNavigation1" keywords="[List, method,arrayCollection,binding, dataProvider.addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <ResetComponent target="list2" className="spark.components.List" waitEvent="updateComplete" /> |
| |
| </setup> |
| <body> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.sortAC();" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <RunCode code="application.ac.addItemAt(application.newPlayer, 0);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchKeyEvent keys="[TAB]" waitTarget="list1" waitEvent="focusIn" /> |
| <DispatchKeyEvent keys="[DOWN]" waitTarget="list1" waitEvent="updateComplete"/> |
| <DispatchKeyEvent keys="[DOWN]" waitTarget="list1" waitEvent="updateComplete"/> |
| <DispatchKeyEvent keys="[DOWN]" waitTarget="list1" waitEvent="updateComplete"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="List_keyboardNavigation2" keywords="[List, method,arrayCollection,binding, dataProvider.addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <ResetComponent target="list2" className="spark.components.List" waitEvent="updateComplete" /> |
| |
| </setup> |
| <body> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.sortAC();" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <DispatchKeyEvent keys="[TAB]" waitTarget="list1" waitEvent="focusIn" /> |
| <DispatchKeyEvent keys="[END]" waitTarget="list1" waitEvent="updateComplete"/> |
| <DispatchKeyEvent keys="[UP]" waitTarget="list1" waitEvent="updateComplete"/> |
| <DispatchKeyEvent keys="[UP]" waitTarget="list1" waitEvent="updateComplete"/> |
| <RunCode code="application.ac.addItemAt(application.newPlayer, 0);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="List_keyboardNavigation3" keywords="[List, method,arrayCollection,binding, dataProvider.addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <ResetComponent target="list2" className="spark.components.List" waitEvent="updateComplete" /> |
| |
| </setup> |
| <body> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.sortAC();" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <DispatchKeyEvent keys="[TAB]" waitTarget="list1" waitEvent="focusIn" /> |
| <DispatchKeyEvent keys="[END]" waitTarget="list1" waitEvent="updateComplete"/> |
| <DispatchKeyEvent keys="[UP]" waitTarget="list1" waitEvent="updateComplete"/> |
| <RunCode code="application.ac.addItemAt(application.newPlayer, 3);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchKeyEvent keys="[UP]" waitTarget="list1" waitEvent="updateComplete"/> |
| |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="List_keyboardNavigation4" keywords="[List, method,arrayCollection,binding, dataProvider.addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <ResetComponent target="list2" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| </setup> |
| <body> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.sortAC();" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| |
| <DispatchKeyEvent keys="[TAB]" waitTarget="list1" waitEvent="focusIn" /> |
| <DispatchKeyEvent keys="[DOWN]" waitTarget="list1" waitEvent="updateComplete"/> |
| <RunCode code="application.ac.addItemAt(application.newPlayer, 0);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchKeyEvent keys="[DOWN]" shiftKey="true" waitTarget="list1" waitEvent="updateComplete"/> |
| <DispatchKeyEvent keys="[DOWN]" shiftKey="true" waitTarget="list1" waitEvent="updateComplete"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="List_keyboardNavigation5" keywords="[List, method,arrayCollection,binding, dataProvider.addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <ResetComponent target="list2" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| </setup> |
| <body> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.sortAC();" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <DispatchKeyEvent keys="[TAB]" waitTarget="list1" waitEvent="focusIn" /> |
| <DispatchKeyEvent keys="[END]" shiftKey="true" waitTarget="list1" waitEvent="updateComplete"/> |
| <DispatchKeyEvent keys="[UP]" shiftKey="true" waitTarget="list1" waitEvent="updateComplete"/> |
| <DispatchKeyEvent keys="[UP]" shiftKey="true" waitTarget="list1" waitEvent="updateComplete"/> |
| <RunCode code="application.ac.addItemAt(application.newPlayer, 0);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="List_keyboardNavigation6" keywords="[List, method,arrayCollection,binding, dataProvider.addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <ResetComponent target="list2" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| </setup> |
| <body> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.sortAC();" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <DispatchKeyEvent keys="[TAB]" waitTarget="list1" waitEvent="focusIn" /> |
| <DispatchKeyEvent keys="[END]" shiftKey="true" waitTarget="list1" waitEvent="updateComplete"/> |
| <RunCode code="application.ac.addItemAt(application.newPlayer, 3);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchKeyEvent keys="[UP]" shiftKey="true" waitTarget="list1" waitEvent="updateComplete"/> |
| <DispatchKeyEvent keys="[UP]" waitTarget="list1" waitEvent="updateComplete"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="List_keyboardNavigation7" keywords="[List, method,arrayCollection,binding, dataProvider.addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <ResetComponent target="list2" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| </setup> |
| <body> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.sortAC();" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| |
| <DispatchKeyEvent keys="[TAB]" waitTarget="list1" waitEvent="focusIn" /> |
| <DispatchKeyEvent keys="[DOWN]" waitTarget="list1" waitEvent="updateComplete"/> |
| <RunCode code="application.ac.addItemAt(application.newPlayer, 0);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchKeyEvent keys="[DOWN]" ctrlKey="true" /> |
| <SetProperty target="list1" propertyName="width" value="100" /> |
| <DispatchKeyEvent keys="[DOWN]" ctrlKey="true" /> |
| <SetProperty target="list1" propertyName="height" value="115" /> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="List_keyboardNavigation8" keywords="[List, method,arrayCollection,binding, dataProvider.addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <ResetComponent target="list2" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| </setup> |
| <body> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.sortAC();" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <DispatchKeyEvent keys="[TAB]" waitTarget="list1" waitEvent="focusIn" /> |
| <DispatchKeyEvent keys="[END]" shiftKey="true" waitTarget="list1" waitEvent="updateComplete"/> |
| <DispatchKeyEvent keys="[UP]" shiftKey="true" ctrlKey="true" /> |
| <DispatchKeyEvent keys="[UP]" shiftKey="true" waitTarget="list1" waitEvent="updateComplete"/> |
| <RunCode code="application.ac.addItemAt(application.newPlayer, 0);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="List_keyboardNavigation9" keywords="[List, method,arrayCollection,binding, dataProvider.addItemAt]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <ResetComponent target="list2" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| </setup> |
| <body> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.sortAC();" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <DispatchKeyEvent keys="[TAB]" waitTarget="list1" waitEvent="focusIn" /> |
| <DispatchKeyEvent keys="[END]" shiftKey="true" ctrlKey="true" waitEvent="caretChange" waitTarget="list1"/> |
| <RunCode code="application.ac.addItemAt(application.newPlayer, 3);" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchKeyEvent keys="[UP]" shiftKey="true" ctrlKey="true" waitEvent="caretChange" waitTarget="list1"/> |
| <DispatchKeyEvent keys="[DOWN]" waitTarget="list1" waitEvent="updateComplete"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="List_keyboardNavigation_sdk-23283" keywords="[List]" description="sdk-23283"> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <ResetComponent target="list2" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="height" value="200" /> |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=new ArrayList(application.abcArr);" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <DispatchMouseClickEvent target="list1" localX="20" localY="10" waitEvent="updateComplete" /> |
| <DispatchKeyEvent keys="[END]" waitTarget="list1" waitEvent="updateComplete"/> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC();" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <DispatchKeyEvent keys="[DOWN]" waitTarget="list1" waitEvent="updateComplete"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" numColorVariances="5" ignoreMaxColorVariance="true"/> |
| </body> |
| </TestCase> |
| <TestCase testID="List_keyboardNavigation1_sdk-23283" keywords="[List]" description="sdk-23283"> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <ResetComponent target="list2" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="allowMultipleSelection" value="true" /> |
| <SetProperty target="list1" propertyName="height" value="200" /> |
| </setup> |
| <body> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC();" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <DispatchKeyEvent keys="[TAB]" waitTarget="list1" waitEvent="focusIn" /> |
| <DispatchKeyEvent keys="[END]" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=new ArrayList(application.abcArr);" waitEvent="updateComplete" waitTarget="list1"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" numColorVariances="5" ignoreMaxColorVariance="true"/> |
| </body> |
| </TestCase> |
| </testCases> |
| </UnitTester> |