blob: 3f09d00a91dfdeb68731b1d88950968b3b068ae4 [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/ViewAndViewNavigator/tests/"
testSWF="ViewAndViewNavigatorCustomSkinMovedActionAndTabBar.mxml">
<fx:Script source="globalNotTabbed.as" />
<fx:Script>
<![CDATA[
import mx.core.FlexGlobals;
import views.*;
public static function init(o:DisplayObject):void {}
public function resetProperties():void {
FlexGlobals.topLevelApplication.hasEffectEnded = false;
FlexGlobals.topLevelApplication.navigator.transitionsEnabled = true;
}
]]>
</fx:Script>
<fx:Metadata><![CDATA[ [Mixin] ]]></fx:Metadata>
<testCases>
<TestCase testID="skinDefaultTransition" keywords="[view, transitions]" description="Verify custom skins default transitions occur for pushView()">
<setup>
<RunCode code="FlexGlobals.topLevelApplication.resetApp()" waitTarget="navigator" waitEvent="myEvent" />
<RunCode code="resetProperties()" />
</setup>
<body>
<RunCode code="FlexGlobals.topLevelApplication.navigator.pushView(views.Sect1View2)"/>
<Pause timeout="100" />
<AssertMethodValue method="value = FlexGlobals.topLevelApplication.hasEffectEnded == false" value="true" />
<Pause timeout="1050" />
<AssertMethodValue method="value = FlexGlobals.topLevelApplication.hasEffectEnded == true" value="true" />
</body>
</TestCase>
<TestCase testID="transitionsDisabled" keywords="[view, transitions, disabled]" description="Turn off default transitions when custom skin has it's own default transactions">
<setup>
<RunCode code="FlexGlobals.topLevelApplication.resetApp()" waitTarget="navigator" waitEvent="myEvent" />
<RunCode code="resetProperties()" />
</setup>
<body>
<RunCode code="FlexGlobals.topLevelApplication.navigator.transitionsEnabled = false"/>
<RunCode code="FlexGlobals.topLevelApplication.navigator.pushView(views.Sect1View2)"/>
<Pause timeout="100" />
<AssertMethodValue method="value = FlexGlobals.topLevelApplication.hasEffectEnded == false" value="true" />
<AssertMethodValue method="value = FlexGlobals.topLevelApplication.navigator.activeView is Sect1View2" value="true" />
</body>
</TestCase>
</testCases>
</UnitTester>