UNPKG

siesta-lite

Version:

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

76 lines (61 loc) 2.13 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-MoveCursorBy'>/** </span> @class Siesta.Test.Action.MoveCursorBy @extends Siesta.Test.Action Action which moves the cursor by an x/y delta, call it with the &quot;moveCursorBy&quot; shortcut: t.chain( { moveCursorBy : [ 100, 100 ] }, ... ) */ Class(&#39;Siesta.Test.Action.MoveCursorBy&#39;, { isa : Siesta.Test.Action, does : [ Siesta.Test.Action.Role.HasTarget, Siesta.Util.Role.CanGetType ], has : { requiredTestMethod : &#39;moveMouseBy&#39; }, methods : { process : function () { var test = this.test; var next = this.next; if (this.target &amp;&amp; this.typeOf(this.target) === &#39;Array&#39; &amp;&amp; this.typeOf(this.target[ 0 ]) === &#39;Array&#39;) { this.target = this.target[ 0 ] } test.moveMouseBy(this.getTarget(), this.next, this, this.options); } } }); Siesta.Test.ActionRegistry().registerAction(&#39;moveMouseBy&#39;, Siesta.Test.Action.MoveCursorBy) Siesta.Test.ActionRegistry().registerAction(&#39;moveCursorBy&#39;, Siesta.Test.Action.MoveCursorBy) Siesta.Test.ActionRegistry().registerAction(&#39;moveFingerBy&#39;, Siesta.Test.Action.MoveCursorBy) </pre> </body> </html>