blob: 27e148ab1549675e5de363ae6b42aa66240433f4 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<UnitTester xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns="*"
testDir="mobile/SplitViewNavigator/layout/"
testSWF="SplitViewNavigatorMain.mxml"
>
<fx:Script>
<![CDATA[
import mx.core.FlexGlobals;
import spark.components.ViewNavigator;
import flash.geom.Point;
import comps.*;
import spark.components.Callout;
import spark.layouts.*;
public static function init(o:DisplayObject):void {
}
]]>
</fx:Script>
<fx:Metadata><![CDATA[ [Mixin] ]]></fx:Metadata>
<testCases>
<TestCase testID="BasicLayout_all_navigators" keywords="[SplitViewNavigator, layout, BasicLayout]" description="Set BasicLayout to SplitViewNavigator.">
<setup>
<SetProperty target="svn1" propertyName="visible" value="false" />
<SetProperty target="svn3" propertyName="visible" value="false" />
<ResetComponent target="svn2" className="comps.LayoutTestComp" waitEvent="updateComplete" />
</setup>
<body>
<Pause timeout="400" />
<CompareBitmap numColorVariances="20" maxColorVariance="16" url="../layout/baselines" target="svn2">
<ConditionalValue deviceDensity="160" os="win"/>
<ConditionalValue deviceDensity="240" os="android" />
<ConditionalValue deviceDensity="320" os="win"/>
<ConditionalValue deviceDensity="320" os="iphone" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
</body>
</TestCase>
<TestCase testID="BasicLayout_callout_open" keywords="[SplitViewNavigator, layout, BasicLayout]" description="Set BasicLayout to SplitViewNavigator.">
<setup>
<SetProperty target="svn1" propertyName="visible" value="false" />
<SetProperty target="svn3" propertyName="visible" value="false" />
<ResetComponent target="svn2" className="comps.LayoutTestComp" waitEvent="updateComplete" />
<RunCode code="FlexGlobals.topLevelApplication.svn2.showFirstViewNavigatorInPopUp(FlexGlobals.topLevelApplication.svn2)"/>
</setup>
<body>
<AssertPropertyValue target="svn2.viewNavigatorPopUp" propertyName="isOpen" value="true" />
<Pause timeout="200" />
<CompareBitmap numColorVariances="20" maxColorVariance="16" url="../layout/baselines" target="svn2">
<ConditionalValue deviceDensity="160" os="win"/>
<ConditionalValue deviceDensity="240" os="android" />
<ConditionalValue deviceDensity="320" os="win"/>
<ConditionalValue deviceDensity="320" os="iphone" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
</body>
</TestCase>
<TestCase testID="VerticalLayout_all_navigators" keywords="[SplitViewNavigator, layout, VerticalLayout]" description="Set VerticalLayout to SplitViewNavigator.">
<setup>
<SetProperty target="svn1" propertyName="visible" value="false" />
<SetProperty target="svn3" propertyName="visible" value="false" />
<ResetComponent target="svn2" className="comps.LayoutTestComp" waitEvent="updateComplete" />
<SetProperty target="svn2" propertyName="layout" valueExpression="value=new VerticalLayout()" waitEvent="updateComplete"/>
</setup>
<body>
<CompareBitmap numColorVariances="20" maxColorVariance="16" url="../layout/baselines" target="svn2">
<ConditionalValue deviceDensity="160" os="win"/>
<ConditionalValue deviceDensity="240" os="android" />
<ConditionalValue deviceDensity="320" os="win"/>
<ConditionalValue deviceDensity="320" os="iphone" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
</body>
</TestCase>
<TestCase testID="VerticalLayout_callout_open" keywords="[SplitViewNavigator, layout, VerticalLayout]" description="Set BasicLayout to SplitViewNavigator.">
<setup>
<RunCode code="FlexGlobals.topLevelApplication.svn2.showFirstViewNavigatorInPopUp(FlexGlobals.topLevelApplication.svn2)" waitTarget="svn2.viewNavigatorPopUp" waitEvent="open"/>
</setup>
<body>
<AssertPropertyValue target="svn2.viewNavigatorPopUp" propertyName="isOpen" value="true" />
<CompareBitmap numColorVariances="20" maxColorVariance="16" url="../layout/baselines" target="svn2">
<ConditionalValue deviceDensity="160" os="win"/>
<ConditionalValue deviceDensity="240" os="android" />
<ConditionalValue deviceDensity="320" os="win"/>
<ConditionalValue deviceDensity="320" os="iphone" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
</body>
</TestCase>
<TestCase testID="HorizontalLayout_all_navigators" keywords="[SplitViewNavigator, layout, HorizontalLayout]" description="Set HorizontalLayout to SplitViewNavigator.">
<setup>
<SetProperty target="svn1" propertyName="visible" value="false" />
<SetProperty target="svn3" propertyName="visible" value="false" />
<ResetComponent target="svn2" className="comps.LayoutTestComp" waitEvent="updateComplete" />
<SetProperty target="svn2" propertyName="layout" valueExpression="value=new HorizontalLayout()" waitEvent="updateComplete"/>
</setup>
<body>
<CompareBitmap numColorVariances="20" maxColorVariance="16" url="../layout/baselines" target="svn2">
<ConditionalValue deviceDensity="160" os="win"/>
<ConditionalValue deviceDensity="240" os="android" />
<ConditionalValue deviceDensity="320" os="win"/>
<ConditionalValue deviceDensity="320" os="iphone" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
</body>
</TestCase>
<TestCase testID="HorizontalLayout_callout_open" keywords="[SplitViewNavigator, layout, HorizontalLayout]" description="Set HorizontalLayout to SplitViewNavigator.">
<setup>
<RunCode code="FlexGlobals.topLevelApplication.svn2.showFirstViewNavigatorInPopUp(FlexGlobals.topLevelApplication.svn2)" waitTarget="svn2.viewNavigatorPopUp" waitEvent="open"/>
</setup>
<body>
<AssertPropertyValue target="svn2.viewNavigatorPopUp" propertyName="isOpen" value="true" />
<CompareBitmap numColorVariances="20" maxColorVariance="16" url="../layout/baselines" target="svn2">
<ConditionalValue deviceDensity="160" os="win"/>
<ConditionalValue deviceDensity="240" os="android" />
<ConditionalValue deviceDensity="320" os="win"/>
<ConditionalValue deviceDensity="320" os="iphone" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
</body>
</TestCase>
<TestCase testID="TileLayout_all_navigators" keywords="[SplitViewNavigator, layout, TileLayout]" description="Set TileLayout to SplitViewNavigator.">
<setup>
<SetProperty target="svn1" propertyName="visible" value="false" />
<SetProperty target="svn3" propertyName="visible" value="false" />
<ResetComponent target="svn2" className="comps.LayoutTestComp" waitEvent="updateComplete" />
<SetProperty target="svn2" propertyName="layout" valueExpression="value=new TileLayout()" waitEvent="updateComplete"/>
</setup>
<body>
<CompareBitmap numColorVariances="20" maxColorVariance="16" url="../layout/baselines" target="svn2">
<ConditionalValue deviceDensity="160" os="win"/>
<ConditionalValue deviceDensity="240" os="android" />
<ConditionalValue deviceDensity="320" os="win"/>
<ConditionalValue deviceDensity="320" os="iphone" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
</body>
</TestCase>
<TestCase testID="TileLayout_callout_open" keywords="[SplitViewNavigator, layout, TileLayout]" description="Set TileLayout to SplitViewNavigator.">
<setup>
<RunCode code="FlexGlobals.topLevelApplication.svn2.showFirstViewNavigatorInPopUp(FlexGlobals.topLevelApplication.svn2)" waitTarget="svn2.viewNavigatorPopUp" waitEvent="open"/>
</setup>
<body>
<AssertPropertyValue target="svn2.viewNavigatorPopUp" propertyName="isOpen" value="true" />
<CompareBitmap numColorVariances="20" maxColorVariance="16" url="../layout/baselines" target="svn2">
<ConditionalValue deviceDensity="160" os="win"/>
<ConditionalValue deviceDensity="240" os="android" />
<ConditionalValue deviceDensity="320" os="win"/>
<ConditionalValue deviceDensity="320" os="iphone" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
</body>
</TestCase>
<TestCase testID="ConstraintLayout_all_navigators" keywords="[SplitViewNavigator, layout, ConstraintLayout]" description="Set ConstraintLayout to SplitViewNavigator.">
<setup>
<SetProperty target="svn1" propertyName="visible" value="false" />
<SetProperty target="svn3" propertyName="visible" value="false" />
<ResetComponent target="svn2" className="comps.LayoutTestComp" waitEvent="updateComplete" />
<SetProperty target="svn2.vn1" propertyName="top" value="10" waitEvent="updateComplete"/>
<SetProperty target="svn2.vn1" propertyName="left" value="10" waitEvent="updateComplete"/>
<SetProperty target="svn2.vn2" propertyName="top" value="10" waitEvent="updateComplete"/>
<SetProperty target="svn2.vn2" propertyName="left" value="100" waitEvent="updateComplete"/>
<SetProperty target="svn2.vn3" propertyName="top" value="200" waitEvent="updateComplete"/>
<SetProperty target="svn2.vn3" propertyName="left" value="10" waitEvent="updateComplete"/>
<SetProperty target="svn2.vn3" propertyName="right" value="10" waitEvent="updateComplete"/>
</setup>
<body>
<CompareBitmap numColorVariances="20" maxColorVariance="16" url="../layout/baselines" target="svn2">
<ConditionalValue deviceDensity="160" os="win"/>
<ConditionalValue deviceDensity="240" os="android" />
<ConditionalValue deviceDensity="320" os="win"/>
<ConditionalValue deviceDensity="320" os="iphone" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
</body>
</TestCase>
<TestCase testID="ConstraintLayout_callout_open" keywords="[SplitViewNavigator, layout, ConstraintLayout]" description="Set ConstraintLayout to SplitViewNavigator.">
<setup>
<RunCode code="FlexGlobals.topLevelApplication.svn2.showFirstViewNavigatorInPopUp(FlexGlobals.topLevelApplication.svn2)" waitTarget="svn2.viewNavigatorPopUp" waitEvent="open"/>
</setup>
<body>
<AssertPropertyValue target="svn2.viewNavigatorPopUp" propertyName="isOpen" value="true" />
<CompareBitmap numColorVariances="20" maxColorVariance="16" url="../layout/baselines" target="svn2">
<ConditionalValue deviceDensity="160" os="win"/>
<ConditionalValue deviceDensity="240" os="android" />
<ConditionalValue deviceDensity="320" os="win"/>
<ConditionalValue deviceDensity="320" os="iphone" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
</body>
</TestCase>
<TestCase testID="ConstraintLayout_callout_close" keywords="[SplitViewNavigator, layout, ConstraintLayout]" description="Set ConstraintLayout to SplitViewNavigator.">
<setup>
<RunCode code="FlexGlobals.topLevelApplication.svn2.hideViewNavigatorPopUp()"/>
</setup>
<body>
<AssertPropertyValue target="svn2.viewNavigatorPopUp" propertyName="isOpen" value="false" />
</body>
</TestCase>
</testCases>
</UnitTester>