blob: 548cf4d25c145a7f36e50fbdcfda583e87daf13b [file]
<?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:s="library://ns.adobe.com/flex/spark"
xmlns="*"
testDir="mobile/components/ViewMenu/integration/"
testSWF="ViewMenuCustom.mxml">
<fx:Script><![CDATA[ public static function init(o:DisplayObject):void { } ]]></fx:Script>
<fx:Metadata><![CDATA[ [Mixin] ]]></fx:Metadata>
<fx:Script>
<![CDATA[
import views.*;
import mx.core.FlexGlobals;
]]>
</fx:Script>
<testCases>
<TestCase testID="CustomSkinSevenItemsMenuPortrait1" description="" keywords="[ViewMenu, integration]">
<setup>
<RunCode code="FlexGlobals.topLevelApplication.viewMenuOpen=false" />
<Pause timeout="100"/>
<ResetComponent target="navigator" className="spark.components.ViewNavigator" waitEvent="viewChangeComplete" />
<SetProperty target="navigator" propertyName="transitionsEnabled" value="false"/>
<RunCode code="FlexGlobals.topLevelApplication.navigator.pushView(views.ViewMenuCustomHomeView)"
waitTarget="navigator" waitEvent="viewChangeComplete" timeout="6000"/>
<RunCode code="FlexGlobals.topLevelApplication.stage.setAspectRatio('portrait') " />
</setup>
<body>
<RunCode code="FlexGlobals.topLevelApplication.viewMenuOpen=true" waitEvent="viewMenuOpen" waitTarget="navigator.activeView"/>
<Pause timeout="100"/>
<CompareBitmap numColorVariances="5" maxColorVariance="15" url="../integration/baselines" target="navigator.activeView.i1">
<ConditionalValue deviceDensity="160" os="win" />
<ConditionalValue deviceDensity="240" os="android"/>
<ConditionalValue deviceDensity="320" os="win" />
<ConditionalValue deviceDensity="320" os="ios" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
<RunCode code="FlexGlobals.topLevelApplication.viewMenuOpen=false" waitEvent="viewMenuClose" waitTarget="navigator.activeView" />
</body>
</TestCase>
<TestCase testID="CustomSkinSevenItemsMenuPortrait2" description="" keywords="[ViewMenu, integration]">
<setup>
<RunCode code="FlexGlobals.topLevelApplication.viewMenuOpen=false" />
<ResetComponent target="navigator" className="spark.components.ViewNavigator" waitEvent="viewChangeComplete" />
<SetProperty target="navigator" propertyName="transitionsEnabled" value="false"/>
<RunCode code="FlexGlobals.topLevelApplication.navigator.pushView(views.ViewMenuCustomHomeView)"
waitTarget="navigator" waitEvent="viewChangeComplete" timeout="6000"/>
<RunCode code="FlexGlobals.topLevelApplication.stage.setAspectRatio('portrait') " />
</setup>
<body>
<RunCode code="FlexGlobals.topLevelApplication.viewMenuOpen=true" waitEvent="viewMenuOpen" waitTarget="navigator.activeView"/>
<Pause timeout="100"/>
<DispatchMouseEvent type="rollOver" target="navigator.activeView.i1" localX="5" localY="5" waitEvent="rollOver"/>
<DispatchMouseEvent type="mouseOver" target="navigator.activeView.i1" localX="5" localY="5" waitEvent="mouseOver"/>
<DispatchMouseEvent type="mouseDown" target="navigator.activeView.i1" localX="5" localY="5" waitEvent="updateComplete"/>
<CompareBitmap numColorVariances="5" maxColorVariance="15" url="../integration/baselines" target="navigator.activeView.i1">
<ConditionalValue deviceDensity="160" os="win" />
<ConditionalValue deviceDensity="240" os="android"/>
<ConditionalValue deviceDensity="320" os="win" />
<ConditionalValue deviceDensity="320" os="ios" />
<ConditionalValue deviceDensity="160" os="qnx" />
</CompareBitmap>
<RunCode code="FlexGlobals.topLevelApplication.viewMenuOpen=false" waitEvent="viewMenuClose" waitTarget="navigator.activeView" />
</body>
</TestCase>
</testCases>
</UnitTester>