| <?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="spark/collections/Sort/MXList/" |
| xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" |
| testSWF="SF_mxList.mxml"> |
| <mx:Script> |
| <![CDATA[ |
| import assets.newClasses.SFConstant; |
| |
| import flash.globalization.*; |
| import flash.globalization.LastOperationStatus; |
| |
| import spark.globalization.SortingCollator; |
| |
| public var clt:spark.globalization.SortingCollator; |
| |
| public static function init(o:DisplayObject):void |
| { |
| } |
| ]]> |
| </mx:Script> |
| |
| <mx:Metadata> |
| <![CDATA[ |
| [Mixin] |
| ]]> |
| </mx:Metadata> |
| |
| <testCases> |
| <TestCase testID="SortField_mxList_default_test1" description="sort items with default property setting" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ja-JP'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortField2" styleName="locale" valueExpression="value='ru-RU'"/> |
| |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="name" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="name" value="name" /> |
| <SetProperty target="uiMXListComp.mySortField2" propertyName="name" value="address" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortField,application.uiMXListComp.mySortField2]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ja-JP'" /> |
| <AssertStyleValue target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertStyleValue target="uiMXListComp.mySortField2" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| <!--<AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArrayField('address')"/>--> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_default_script_test2" description="sort items with default property setting" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='zh-CN'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript2" styleName="locale" valueExpression="value='ru-RU'"/> |
| |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="name" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="name" value="name" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript2" propertyName="name" value="age" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortFieldScript,application.uiMXListComp.mySortFieldScript2]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='zh-CN'" /> |
| <AssertStyleValue target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertStyleValue target="uiMXListComp.mySortFieldScript2" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| <!--<AssertMethodValue method="value=SFConstant.getArrayOfField('age',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArrayField('age')"/>--> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_descending_true_test3" description="sort items with descending true" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetStyle target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetStyle target="uiMXListComp.mySortField2" styleName="locale" valueExpression="value='fr-FR'"/> |
| |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="name" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="name" value="name" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="descending" value="true" /> |
| <SetProperty target="uiMXListComp.mySortField2" propertyName="name" value="age" /> |
| <SetProperty target="uiMXListComp.mySortField2" propertyName="descending" value="true" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortField,application.uiMXListComp.mySortField2]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertStyleValue target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='fr-FR'" /> |
| <AssertStyleValue target="uiMXListComp.mySortField2" styleName="locale" valueExpression="value='fr-FR'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.revertArray(application.uiMXListComp.sparkSortedArray)"/> |
| <!--<AssertMethodValue method="value=SFConstant.getArrayOfField('age',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.revertArray(application.uiMXListComp.sparkSortedArrayField('age'))"/>--> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_descending_true_script_test4" description="sort items with descending true" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='de-DE'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript2" styleName="locale" valueExpression="value='ru-RU'"/> |
| |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="name" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="name" value="name" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="descending" value="true" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript2" propertyName="name" value="address" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript2" propertyName="descending" value="true" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortFieldScript,application.uiMXListComp.mySortFieldScript2]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='de-DE'" /> |
| <AssertStyleValue target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertStyleValue target="uiMXListComp.mySortFieldScript2" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.revertArray(application.uiMXListComp.sparkSortedArray)"/> |
| <!--<AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.revertArray(application.uiMXListComp.sparkSortedArrayField('active'))"/>--> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_unique_true_test5" description="sort items with unique true" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='fr-CA'"/> |
| <SetStyle target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='fr-CA'"/> |
| <SetStyle target="uiMXListComp.mySortField2" styleName="locale" valueExpression="value='fr-CA'"/> |
| |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="active" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="name" value="age" /> |
| <SetProperty target="uiMXListComp.mySortField2" propertyName="name" value="active" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortField,application.uiMXListComp.mySortField2]" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="unique" value="true" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertStyleValue target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='fr-CA'" /> |
| <AssertStyleValue target="uiMXListComp.mySortField2" styleName="locale" valueExpression="value='fr-CA'" /> |
| <AssertMethodValue method="value=application.uiMXListComp.VerifyUniqueError()" |
| value="Error: Non-unique values in items."/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_unique_true_script_test6" description="sort items with unique true" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='fr-CA'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript2" styleName="locale" valueExpression="value='ru-RU'"/> |
| |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="age" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="name" value="age" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript2" propertyName="name" value="active" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortFieldScript,application.uiMXListComp.mySortFieldScript2]" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="unique" value="true" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='fr-CA'" /> |
| <AssertStyleValue target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertStyleValue target="uiMXListComp.mySortFieldScript2" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertMethodValue method="value=application.uiMXListComp.VerifyUniqueError()" |
| value="Error: Non-unique values in items."/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_numeric_true_test7" description="sort items with numeric true" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetProperty target="uiMXListComp.sparkCollator" propertyName="numericComparison" value="true" /> |
| <SetStyle target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='ru-RU'"/> |
| |
| <SetProperty target="uiMXListComp.mySortField" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="age" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="name" value="age" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="numeric" value="true" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortField]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| <SetProperty target="uiMXListComp.myMxSortField" propertyName="numeric" value="true"/> |
| <SetProperty target="uiMXListComp.myMxSortField" propertyName="name" valueExpression="value='age'"/> |
| <SetProperty target="uiMXListComp.myMxSort" propertyName="fields" |
| valueExpression="value=[application.uiMXListComp.myMxSortField]"/> |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertStyleValue target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('age',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.mxSortedArray"/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_numeric_true_script_test8" description="sort items with numeric true" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='en-GB'"/> |
| <SetProperty target="uiMXListComp.sparkCollator" propertyName="numericComparison" value="true" /> |
| <SetStyle target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='en-GB'"/> |
| |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="age" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="name" value="age" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="numeric" value="true" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortFieldScript]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| <SetProperty target="uiMXListComp.myMxSortField" propertyName="numeric" value="true"/> |
| <SetProperty target="uiMXListComp.myMxSortField" propertyName="name" valueExpression="value='age'"/> |
| <SetProperty target="uiMXListComp.myMxSort" propertyName="fields" |
| valueExpression="value=[application.uiMXListComp.myMxSortField]"/> |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertStyleValue target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='en-GB'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('age',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.mxSortedArray"/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_diff_locale_test9" description="sort items based on different locale on Sort and SortField" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetProperty target="uiMXListComp.sparkCollator" propertyName="numericComparison" value="false" /> |
| <SetStyle target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='fr-FR'"/> |
| |
| <SetProperty target="uiMXListComp.mySortField" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="numeric" value="false" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="address" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="name" value="address" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortField]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertStyleValue target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='fr-FR'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_diff_locale_script_test10" description="sort items based on different locale on Sort and SortField" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='de-DE'"/> |
| <SetProperty target="uiMXListComp.sparkCollator" propertyName="numericComparison" value="false" /> |
| <SetStyle target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='zh-CN'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='de-DE'"/> |
| |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="numeric" value="false" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="address" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="name" value="address" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortFieldScript]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='zh-CN'" /> |
| <AssertStyleValue target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='de-DE'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_localeChange_SortField_test11" description="sort items based locale change of SortField" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='de-DE'"/> |
| <SetProperty target="uiMXListComp.sparkCollator" propertyName="numericComparison" value="false" /> |
| <SetStyle target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='de-DE'"/> |
| |
| <SetProperty target="uiMXListComp.mySortField" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="numeric" value="false" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="address" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="name" value="address" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortField]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertStyleValue target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='de-DE'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_localeChange_SortField_test12" description="sort items based on locale change of SortField" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='en-US'"/> |
| <SetProperty target="uiMXListComp.sparkCollator" propertyName="numericComparison" value="false" /> |
| <SetStyle target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='en-US'"/> |
| |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="numeric" value="false" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="address" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="name" value="address" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortFieldScript]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='ru-RU'" /> |
| <AssertStyleValue target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='en-US'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='de-DE'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='de-DE'"/> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_localeChange_Sort_test13" description="sort items based locale change of Sort" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='de-DE'"/> |
| <SetProperty target="uiMXListComp.sparkCollator" propertyName="numericComparison" value="false" /> |
| <SetStyle target="uiMXListComp.mySort" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='de-DE'"/> |
| |
| <SetProperty target="uiMXListComp.mySortField" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="numeric" value="false" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="address" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="name" value="address" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortField]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySort" styleName="locale" valueExpression="value='fr-FR'" /> |
| <AssertStyleValue target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='de-DE'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| <SetStyle target="uiMXListComp.mySort" styleName="locale" valueExpression="value='en-US'"/> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_localeChange_Sort_test14" description="sort items based on locale change of Sort" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='en-US'"/> |
| <SetProperty target="uiMXListComp.sparkCollator" propertyName="numericComparison" value="false" /> |
| <SetStyle target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='en-US'"/> |
| |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="numeric" value="false" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="address" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="name" value="address" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortFieldScript]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertStyleValue target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='fr-FR'" /> |
| <AssertStyleValue target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='en-US'" /> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| <SetStyle target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='de-DE'"/> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_reverse_test15" description="reverse items sort order based on different descending setting of SortField" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetStyle target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='fr-FR'"/> |
| |
| <SetProperty target="uiMXListComp.mySort" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="name" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="name" value="name" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortField2" propertyName="name" value="address" /> |
| <SetProperty target="uiMXListComp.mySortField2" propertyName="descending" value="true" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortField,application.uiMXListComp.mySortField2]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <RunCode code="application.uiMXListComp.mySort.reverse()" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.revertArray(application.uiMXListComp.sparkSortedArray)"/> |
| <!--<AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArrayField('address')"/>--> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_reverse_script_test16" description="reverse items sort order based on different descending setting of SortField" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetStyle target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='fr-FR'"/> |
| |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="name" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="name" value="name" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript2" propertyName="name" value="address" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript2" propertyName="descending" value="true" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortFieldScript,application.uiMXListComp.mySortFieldScript2]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <RunCode code="application.uiMXListComp.mySortScript.reverse()" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.revertArray(application.uiMXListComp.sparkSortedArray)"/> |
| <!--<AssertMethodValue method="value=SFConstant.getArrayOfField('address',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArrayField('address')"/>--> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_changeSource_test17" description="sort items after change source" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetStyle target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='fr-FR'"/> |
| |
| <SetProperty target="uiMXListComp.mySort" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="name" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="name" value="name" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="numeric" value="false" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortField]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataXmlListArrSAdd" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_changeSource_script_test18" description="sort items after change source" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetStyle target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='fr-FR'"/> |
| |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="name" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="name" value="name" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="numeric" value="false" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortFieldScript]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataXmlListArrSAdd" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_function_test19" description="verify sort items of MXList will not affect the original function" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetStyle target="uiMXListComp.mySort" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortField" styleName="locale" valueExpression="value='fr-FR'"/> |
| |
| <SetProperty target="uiMXListComp.mySort" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="name" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="name" value="name" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortField" propertyName="numeric" value="false" /> |
| <SetProperty target="uiMXListComp.mySort" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortField]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySort" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| <SetProperty target="uiMXListComp.uiMXList" propertyName="selectedIndex" value="0" /> |
| <AssertPropertyValue target="uiMXListComp" propertyName="listSelectFieldValue" value="barmen" /> |
| <SetProperty target="uiMXListComp.uiMXList" propertyName="selectedIndex" value="3" /> |
| <AssertPropertyValue target="uiMXListComp" propertyName="listSelectFieldValue" value="cadbury" /> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_function_script_test20" description="verify sort items of MXList will not affect the original function" keywords="[Sort, MXList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <SetStyle target="uiMXListComp.sparkCollator" styleName="locale" valueExpression="value='fr-FR'"/> |
| <SetStyle target="uiMXListComp.mySortScript" styleName="locale" valueExpression="value='ru-RU'"/> |
| <SetStyle target="uiMXListComp.mySortFieldScript" styleName="locale" valueExpression="value='fr-FR'"/> |
| |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="unique" value="false" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListValueField" value="name" /> |
| <SetProperty target="uiMXListComp" propertyName="mxListDataProvider" valueExpression="value=application.uiMXListComp.dataComp.dataXmlListArrS" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="name" value="name" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="descending" value="false" /> |
| <SetProperty target="uiMXListComp.mySortFieldScript" propertyName="numeric" value="false" /> |
| <SetProperty target="uiMXListComp.mySortScript" propertyName="fields" valueExpression="value=[application.uiMXListComp.mySortFieldScript]" /> |
| <SetProperty target="uiMXListComp.mxListDataProvider" propertyName="sort" valueExpression="value=application.uiMXListComp.mySortScript" /> |
| <RunCode code="application.uiMXListComp.mxListDataProvider.refresh()" waitEvent="collectionChange" waitTarget="uiMXListComp.mxListDataProvider"/> |
| |
| </setup> |
| <body> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('name',application.uiMXListComp.mxListDataProvider)" |
| valueExpression="value=application.uiMXListComp.sparkSortedArray"/> |
| <SetProperty target="uiMXListComp.uiMXList" propertyName="selectedIndex" value="0" /> |
| <AssertPropertyValue target="uiMXListComp" propertyName="listSelectFieldValue" value="barmen" /> |
| <SetProperty target="uiMXListComp.uiMXList" propertyName="selectedIndex" value="3" /> |
| <AssertPropertyValue target="uiMXListComp" propertyName="listSelectFieldValue" value="cadbury" /> |
| </body> |
| </TestCase> |
| <!--Cases for locale dependent sort test--> |
| <TestCase testID="SortField_mxList_locale_dependent_aryColl_test_21" description="verify locale dependent sort" keywords="[Sort, mxList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <RunCode code="application.uiMXListComp.updateSort_aryColl()"/> |
| </setup> |
| <body> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('last',application.uiMXListComp.collection)" valueExpression="value=application.uiMXListComp.sparkSortedArrayCollection"/> |
| </body> |
| </TestCase> |
| <TestCase testID="SortField_mxList_locale_dependent_xmlList_test_22" description="verify locale dependent sort" keywords="[Sort, mxList]"> |
| <setup> |
| <ResetComponent target="uiMXListComp" className="newComps.CustomMXListComp" waitEvent="updateComplete" waitTarget="uiMXListComp"/> |
| <RunCode code="application.uiMXListComp.updateSort_xmlList()"/> |
| </setup> |
| <body> |
| <AssertMethodValue method="value=SFConstant.getArrayOfField('last',application.uiMXListComp.dataXmlListArrS_locale)" valueExpression="value=application.uiMXListComp.sparkSortedXMLList"/> |
| </body> |
| </TestCase> |
| </testCases> |
| </UnitTester> |