blob: dd07b45deb5c7967ebe9ad9e8d62b83a4a612ac5 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<UnitTester testDir="LangPacks/Dutch/tests/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="LangPackApp.mxml">
<!-- this set of lines form a tSVplate that must be in each unit test -->
<mx:Script>
<![CDATA[
public static function init(o:DisplayObject):void
{
}
]]>
</mx:Script>
<mx:Metadata>
<![CDATA[
[Mixin]
]]>
</mx:Metadata>
<!-- end of set of lines that must be in each unit test -->
<mx:Script>
<![CDATA[
import mx.controls.TextInput;
import mx.validators.StringValidator;
import mx.validators.ValidationResult;
import mx.managers.SystemManager;
import mx.managers.ToolTipManager;
import mx.core.IToolTip;
public var curTip:IToolTip;
private function getErrorTip():void{
curTip = ToolTipManager.currentToolTip;
}
]]>
</mx:Script>
<testCases>
<TestCase testID="IT_StringValidator_maxLength" keywords="[maxLength, StringValidator]">
<setup>
<ResetComponent target="ct" className="components.CustomTester" waitEvent="updateComplete" waitTarget="ct" />
<SetProperty target="ct.myStringV.mySV" propertyName="maxLength" value="6"/>
</setup>
<body>
<SetProperty target="ct.myStringV.ti1" propertyName="text" value="òèìùÇì" waitEvent="updateComplete" waitTarget="ct.myStringV.ti1"/>
<RunCode code="application.ct.myStringV.mySV.validate(application.ct.myStringV.ti1.text)"/>
<AssertEvent target="ct.myStringV.mySV" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
<AssertNoEvent target="ct.myStringV.mySV" eventName="invalid" />
</body>
</TestCase>
<TestCase testID="IT_StringValidator_minLength" keywords="[minLength, StringValidator]">
<setup>
<ResetComponent target="ct" className="components.CustomTester" waitEvent="updateComplete" waitTarget="ct" />
<SetProperty target="ct.myStringV.mySV" propertyName="minLength" value="6"/>
</setup>
<body>
<SetProperty target="ct.myStringV.ti1" propertyName="text" value="òèìùÇìèìùÇ" waitEvent="updateComplete" waitTarget="ct.myStringV.ti1"/>
<RunCode code="application.ct.myStringV.mySV.validate(application.ct.myStringV.ti1.text)"/>
<AssertEvent target="ct.myStringV.mySV" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
<AssertNoEvent target="ct.myStringV.mySV" eventName="invalid" />
</body>
</TestCase>
<TestCase testID="IT_StringValidator_maxLength1" keywords="[maxLength, StringValidator]">
<setup>
<ResetComponent target="ct" className="components.CustomTester" waitEvent="updateComplete" waitTarget="ct" />
<SetProperty target="ct.myStringV.mySV" propertyName="maxLength" value="6.7"/>
</setup>
<body>
<SetProperty target="ct.myStringV.ti1" propertyName="text" value="òèìùÇì" waitEvent="updateComplete" waitTarget="ct.myStringV.ti1"/>
<RunCode code="application.ct.myStringV.mySV.validate(application.ct.myStringV.ti1.text)"/>
<AssertEvent target="ct.myStringV.mySV" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
<AssertNoEvent target="ct.myStringV.mySV" eventName="invalid" />
</body>
</TestCase>
<TestCase testID="IT_StringValidator_minLength1" keywords="[minLength, StringValidator]">
<setup>
<ResetComponent target="ct" className="components.CustomTester" waitEvent="updateComplete" waitTarget="ct" />
<SetProperty target="ct.myStringV.mySV" propertyName="minLength" value="6.5"/>
</setup>
<body>
<SetProperty target="ct.myStringV.ti1" propertyName="text" value="òèìùÇìèìùÇ" waitEvent="updateComplete" waitTarget="ct.myStringV.ti1"/>
<RunCode code="application.ct.myStringV.mySV.validate(application.ct.myStringV.ti1.text)"/>
<AssertEvent target="ct.myStringV.mySV" eventName="valid" eventClass="mx.events::ValidationResultEvent" />
<AssertNoEvent target="ct.myStringV.mySV" eventName="invalid" />
</body>
</TestCase>
<TestCase testID="IT_StringValidator_tooLongError" keywords="[tooLongError, StringValidator]">
<setup>
<ResetComponent target="ct" className="components.CustomTester" waitEvent="updateComplete" waitTarget="ct" />
<SetProperty target="ct.myStringV.mySV" propertyName="maxLength" value="6.5"/>
</setup>
<body>
<SetProperty target="ct.myStringV.ti1" propertyName="text" value="òèìùÇìèìùÇ" waitEvent="updateComplete" waitTarget="ct.myStringV.ti1"/>
<RunCode code="application.ct.myStringV.mySV.validate(application.ct.myStringV.ti1.text)"/>
<AssertEvent target="ct.myStringV.mySV" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
<AssertNoEvent target="ct.myStringV.mySV" eventName="valid" />
<DispatchMouseEvent target="ct.myStringV.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="ct.myStringV.ti1"/>
<RunCode code="getErrorTip()" />
<CompareBitmap target="script:curTip" url="../tests/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="IT_StringValidator_tooLongError1" keywords="[tooLongError, StringValidator]">
<setup>
<ResetComponent target="ct" className="components.CustomTester" waitEvent="updateComplete" waitTarget="ct" />
<SetProperty target="ct.myStringV.mySV" propertyName="maxLength" value="6"/>
</setup>
<body>
<SetProperty target="ct.myStringV.ti1" propertyName="text" value="òèìùÇì123" waitEvent="updateComplete" waitTarget="ct.myStringV.ti1"/>
<RunCode code="application.ct.myStringV.mySV.validate(application.ct.myStringV.ti1.text)"/>
<AssertEvent target="ct.myStringV.mySV" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
<AssertNoEvent target="ct.myStringV.mySV" eventName="valid" />
<DispatchMouseEvent target="ct.myStringV.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="ct.myStringV.ti1" />
<RunCode code="getErrorTip()" />
<CompareBitmap target="script:curTip" url="../tests/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="IT_StringValidator_tooShortError" keywords="[tooLongError, StringValidator]">
<setup>
<ResetComponent target="ct" className="components.CustomTester" waitEvent="updateComplete" waitTarget="ct" />
<SetProperty target="ct.myStringV.mySV" propertyName="minLength" value="6.5"/>
</setup>
<body>
<SetProperty target="ct.myStringV.ti1" propertyName="text" value="òèì" waitEvent="updateComplete" waitTarget="ct.myStringV.ti1"/>
<RunCode code="application.ct.myStringV.mySV.validate(application.ct.myStringV.ti1.text)"/>
<AssertEvent target="ct.myStringV.mySV" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
<AssertNoEvent target="ct.myStringV.mySV" eventName="valid" />
<DispatchMouseEvent target="ct.myStringV.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="ct.myStringV.ti1" />
<RunCode code="getErrorTip()" />
<CompareBitmap target="script:curTip" url="../tests/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="IT_StringValidator_tooShortError1" keywords="[tooShortError, StringValidator]">
<setup>
<ResetComponent target="ct" className="components.CustomTester" waitEvent="updateComplete" waitTarget="ct" />
<SetProperty target="ct.myStringV.mySV" propertyName="minLength" value="6"/>
</setup>
<body>
<SetProperty target="ct.myStringV.ti1" propertyName="text" value="òèì" waitEvent="updateComplete" waitTarget="ct.myStringV.ti1"/>
<RunCode code="application.ct.myStringV.mySV.validate(application.ct.myStringV.ti1.text)"/>
<AssertEvent target="ct.myStringV.mySV" eventName="invalid" eventClass="mx.events::ValidationResultEvent" />
<AssertNoEvent target="ct.myStringV.mySV" eventName="valid" />
<DispatchMouseEvent target="ct.myStringV.ti1" type="mouseOver" localX="10" localY="10" waitEvent="toolTipShown" waitTarget="ct.myStringV.ti1" />
<RunCode code="getErrorTip()" />
<CompareBitmap target="script:curTip" url="../tests/baselines/$testID.png" />
</body>
</TestCase>
</testCases>
</UnitTester>