blob: 8ef7a9c1fa6b3f2f874592e0255f04333574324e [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/components/CalloutButton/styles/"
testSWF="CalloutTest.mxml">
<fx:Script>
<![CDATA[
import comps.*;
import views.*;
import mx.core.FlexGlobals;
import mx.core.mx_internal;
use namespace mx_internal;
import flash.events.MouseEvent;
public static function init(o:DisplayObject):void { }
]]>
</fx:Script>
<fx:Metadata><![CDATA[ [Mixin] ]]></fx:Metadata>
<testCases>
<TestCase testID="Callout_CSSTest" keywords="[Callout, CSS ]" description="setting CSS style for CalloutButton and #callout ">
<setup>
<ResetComponent target="navigator" className="comps.QANavigator" waitEvent="viewChangeComplete" />
<RunCode code="application.navigator.pushView(views.CalloutStyleTest)" waitTarget="navigator" waitEvent="viewChangeComplete"/>
<SetProperty target="navigator.activeView.calloutButtonBasic" propertyName="label" value="Callout Button" waitEvent="updateComplete" />
<AssertPropertyValue target="navigator.activeView.calloutButtonBasic" propertyName="label" value="Callout Button" />
</setup>
<body>
<RunCode code="application.navigator.activeView.calloutButtonBasic.openDropDown()"
waitTarget="navigator.activeView.calloutButtonBasic"
waitEvent="open" />
<AssertMethodValue method="value = application.navigator.activeView.calloutButtonBasic.isDropDownOpen" value="true"/>
<AssertStyleValue target="navigator.activeView.calloutButtonBasic.callout" styleName="contentBackgroundAppearance" value="flat" />
<AssertStyleValue target="navigator.activeView.calloutButtonBasic.callout" styleName="backgroundColor" value="255" />
<AssertStyleValue target="navigator.activeView.calloutButtonBasic.callout" styleName="color" value=" 16711680" />
<AssertStyleValue target="navigator.activeView.calloutButtonBasic.callout" styleName="contentBackgroundColor" value="16776960" />
<AssertStyleValue target="navigator.activeView.calloutButtonBasic.callout" styleName="backgroundAlpha" value=".5" />
<AssertStyleValue target="navigator.activeView.calloutButtonBasic.callout" styleName="contentBackgroundAlpha" value=".7" />
<AssertStyleValue target="navigator.activeView.calloutButtonBasic.callout" styleName="accentColor" value="255" />
<AssertStyleValue target="navigator.activeView.calloutButtonBasic.callout" styleName="focusColor" value="16776960" />
<AssertStyleValue target="navigator.activeView.calloutButtonBasic.callout" styleName="fontFamily" value="gothic" />
<AssertStyleValue target="navigator.activeView.calloutButtonBasic.callout" styleName="fontWeight" value="normal" />
<AssertStyleValue target="navigator.activeView.calloutButtonBasic.callout" styleName="fontStyle" value="italic" />
<Pause timeout="300"/>
<CompareBitmap url="../styles/baselines" target="navigator.activeView.containerBasic">
<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>
</body>
</TestCase>
</testCases>
</UnitTester>