blob: 36c960ec4f91f48c859a86fbc95a206ea9301021 [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="ViewMenu.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="AsThreeButtonsMenuPortrait1" description="Three Buttons menu ,doubleByte" 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.ViewMenuItemAS)"
waitTarget="navigator" waitEvent="viewChangeComplete" timeout="6000"/>
<RunCode code="FlexGlobals.topLevelApplication.stage.setAspectRatio('portrait') " />
</setup>
<body>
<DispatchKeyEvent keys="[MENU]" waitEvent="viewMenuOpen" waitTarget="navigator.activeView"/>
<Pause timeout="100"/>
<AssertPropertyValue target="navigator.activeView.viewMenuItems" propertyName="length" value="3"/>
<AssertPropertyValue target="navigator.activeView.viewMenuItems.0" propertyName="label" value="更新时间1"/>
<AssertPropertyValue target="navigator.activeView.viewMenuItems.1" propertyName="label" value="更新时间2"/>
<AssertPropertyValue target="navigator.activeView.viewMenuItems.2" propertyName="label" value="更新时间3"/>
<RunCode code="FlexGlobals.topLevelApplication.viewMenuOpen=false" waitEvent="viewMenuClose" waitTarget="navigator.activeView"/>
</body>
</TestCase>
</testCases>
</UnitTester>