UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

78 lines (60 loc) 2.23 kB
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>The source code</title> <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="../resources/prettify/prettify.js"></script> <style type="text/css"> .highlight { display: block; background-color: #ddd; } </style> <script type="text/javascript"> function highlight() { document.getElementById(location.hash.replace(/#/, "")).className = "highlight"; } </script> </head> <body onload="prettyPrint(); highlight();"> <pre class="prettyprint lang-js">/* Siesta 5.6.1 Copyright(c) 2009-2022 Bryntum AB https://bryntum.com/contact https://bryntum.com/products/siesta/license */ <span id='Siesta-Test-Action-SetValue'>/** </span> @class Siesta.Test.Action.SetValue @extends Siesta.Test.Action Used to set value to an Ext.form.Field (text input, checkbox, radio button etc.) This action can be used in a `t.chain` call with the &quot;setValue&quot; shortcut: t.chain( { setValue : &#39;Some text&#39;, target : &#39;.textInput&#39; } ) This action will perform a {@link Siesta.Test.ExtJS#setValue setValue} call on the provided {@link #target}. */ Class(&#39;Siesta.Test.Action.SetValue&#39;, { isa : Siesta.Test.Action, has : { <span id='Siesta-Test-Action-SetValue-cfg-target'> /** </span> * @cfg {Ext.Component/String/Function} target * A component instance or a component query to resolve, or a function, returning such. */ target : null, setValue : null, requiredTestMethod : &#39;setValue&#39; }, methods : { process : function () { var target = this.target; var test = this.test; if (test.typeOf(target) === &#39;Function&#39;) target = target.call(test, this); test.setValue(target, this.setValue, this.next, null); } } }); Siesta.Test.ActionRegistry().registerAction(&#39;setValue&#39;, Siesta.Test.Action.SetValue); </pre> </body> </html>