| <?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/layout/TileLayout/integration/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="TileLayoutApp6_application.mxml"> |
| |
| <!-- this set of lines form a template that must be in each unit test --> |
| <mx:Script> |
| <![CDATA[ |
| public static function init(o:DisplayObject):void |
| { |
| } |
| ]]> |
| </mx:Script> |
| <mx:Metadata> |
| <![CDATA[ |
| [Mixin] |
| ]]> |
| </mx:Metadata> |
| <!-- end of set of lines that must be in each unit test --> |
| |
| <mx:Script> |
| <![CDATA[ |
| |
| import mx.core.*; |
| import spark.layouts.*; |
| |
| ]]> |
| </mx:Script> |
| |
| <testCases> |
| |
| <!-- |
| ======================================================== |
| Test TileLayout when it is used as an application's |
| layout. |
| Yes, we're doing CompareBitmaps for the entire stage. |
| ======================================================== |
| --> |
| |
| <TestCase testID="integration_application_test1a" keywords="[TileLayout,ButtonBar]" description="Change columnCount." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).requestedColumnCount = 1" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test1b" keywords="[TileLayout,ButtonBar]" description="Change rowCount." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).requestedRowCount = 1" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test2a" keywords="[TileLayout,ButtonBar]" description="Change columnWidth" > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).columnWidth = 50" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test2b" keywords="[TileLayout,ButtonBar]" description="Change rowHeight." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).rowHeight = 50" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test3a" keywords="[TileLayout,ButtonBar]" description="Change verticalAlign and horizontalAlign." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).columnWidth = 375" /> |
| <RunCode code="TileLayout(application.layout).rowHeight = 275" /> |
| <RunCode code="TileLayout(application.layout).verticalAlign = 'top'" /> |
| <RunCode code="TileLayout(application.layout).horizontalAlign = 'left'" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test3b" keywords="[TileLayout,ButtonBar]" description="Change verticalAlign and horizontalAlign." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).columnWidth = 375" /> |
| <RunCode code="TileLayout(application.layout).rowHeight = 275" /> |
| <RunCode code="TileLayout(application.layout).verticalAlign = 'middle'" /> |
| <RunCode code="TileLayout(application.layout).horizontalAlign = 'center'" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test3c" keywords="[TileLayout,ButtonBar]" description="Change verticalAlign and horizontalAlign." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).columnWidth = 375" /> |
| <RunCode code="TileLayout(application.layout).rowHeight = 275" /> |
| <RunCode code="TileLayout(application.layout).verticalAlign = 'bottom'" /> |
| <RunCode code="TileLayout(application.layout).horizontalAlign = 'right'" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test3d" keywords="[TileLayout,ButtonBar]" description="Change verticalAlign and horizontalAlign." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).columnWidth = 375" /> |
| <RunCode code="TileLayout(application.layout).rowHeight = 275" /> |
| <RunCode code="TileLayout(application.layout).verticalAlign = 'justify'" /> |
| <RunCode code="TileLayout(application.layout).horizontalAlign = 'justify'" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test4a" keywords="[TileLayout,ButtonBar]" description="Change rowAlign and columnAlign." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).verticalAlign = 'justify'" /> |
| <RunCode code="TileLayout(application.layout).horizontalAlign = 'justify'" /> |
| <RunCode code="TileLayout(application.layout).horizontalGap = 0" /> |
| <RunCode code="TileLayout(application.layout).verticalGap = 0" /> |
| <RunCode code="TileLayout(application.layout).requestedRowCount = 2" /> |
| <RunCode code="TileLayout(application.layout).requestedColumnCount = 2" /> |
| <RunCode code="TileLayout(application.layout).rowAlign = RowAlign.TOP" /> |
| <RunCode code="TileLayout(application.layout).columnAlign = 'none'" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test4b" keywords="[TileLayout,ButtonBar]" description="Change rowAlign and columnAlign." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).verticalAlign = 'justify'" /> |
| <RunCode code="TileLayout(application.layout).horizontalAlign = 'justify'" /> |
| <RunCode code="TileLayout(application.layout).horizontalGap = 0" /> |
| <RunCode code="TileLayout(application.layout).verticalGap = 0" /> |
| <RunCode code="TileLayout(application.layout).requestedRowCount = 2" /> |
| <RunCode code="TileLayout(application.layout).requestedColumnCount = 2" /> |
| <RunCode code="TileLayout(application.layout).rowAlign = RowAlign.JUSTIFY_USING_GAP" /> |
| <RunCode code="TileLayout(application.layout).columnAlign = ColumnAlign.JUSTIFY_USING_GAP" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test4c" keywords="[TileLayout,ButtonBar]" description="Change rowAlign and columnAlign." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).verticalAlign = 'justify'" /> |
| <RunCode code="TileLayout(application.layout).horizontalAlign = 'justify'" /> |
| <RunCode code="TileLayout(application.layout).horizontalGap = 0" /> |
| <RunCode code="TileLayout(application.layout).verticalGap = 0" /> |
| <RunCode code="TileLayout(application.layout).requestedRowCount = 2" /> |
| <RunCode code="TileLayout(application.layout).requestedColumnCount = 2" /> |
| <RunCode code="TileLayout(application.layout).rowAlign = RowAlign.JUSTIFY_USING_HEIGHT" /> |
| <RunCode code="TileLayout(application.layout).columnAlign = ColumnAlign.JUSTIFY_USING_WIDTH" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test5a" keywords="[TileLayout,ButtonBar]" description="Change horizontalGap and verticalGap." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).horizontalGap = 0" /> |
| <RunCode code="TileLayout(application.layout).verticalGap = 20" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test5b" keywords="[TileLayout,ButtonBar]" description="Change horizontalGap and verticalGap." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).horizontalGap = 20" /> |
| <RunCode code="TileLayout(application.layout).verticalGap = 0" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test6a" keywords="[TileLayout,ButtonBar]" description="Change orientation." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).orientation = 'columns'" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="integration_application_test6b" keywords="[TileLayout,ButtonBar]" description="Change orientation with state changes." > |
| <body> |
| <SetProperty propertyName="layout" valueExpression="value = new TileLayout()" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).orientation = 'columns'" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <RunCode code="TileLayout(application.layout).orientation = 'rows'" waitTarget="skin.contentGroup" waitEvent="updateComplete" /> |
| <CompareBitmap url="../integration/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| </testCases> |
| </UnitTester> |