siesta-lite
Version:
Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers
1 lines • 12.1 kB
JavaScript
Ext.data.JsonP.Siesta_Test_Action_MoveCursor({"tagname":"class","name":"Siesta.Test.Action.MoveCursor","autodetected":{},"files":[{"filename":"MoveCursor.js","href":"MoveCursor.html#Siesta-Test-Action-MoveCursor"}],"extends":"Siesta.Test.Action","mixins":["Siesta.Test.Action.Role.HasTarget"],"members":[{"name":"by","tagname":"cfg","owner":"Siesta.Test.Action.MoveCursor","id":"cfg-by","meta":{}},{"name":"desc","tagname":"cfg","owner":"Siesta.Test.Action","id":"cfg-desc","meta":{}},{"name":"el","tagname":"cfg","owner":"Siesta.Test.Action.Role.HasTarget","id":"cfg-el","meta":{}},{"name":"offset","tagname":"cfg","owner":"Siesta.Test.Action.MoveCursor","id":"cfg-offset","meta":{}},{"name":"options","tagname":"cfg","owner":"Siesta.Test.Action.Role.HasTarget","id":"cfg-options","meta":{}},{"name":"passTargetToNext","tagname":"cfg","owner":"Siesta.Test.Action.Role.HasTarget","id":"cfg-passTargetToNext","meta":{}},{"name":"target","tagname":"cfg","owner":"Siesta.Test.Action.Role.HasTarget","id":"cfg-target","meta":{}},{"name":"to","tagname":"cfg","owner":"Siesta.Test.Action.MoveCursor","id":"cfg-to","meta":{}}],"alternateClassNames":[],"aliases":{},"id":"class-Siesta.Test.Action.MoveCursor","short_doc":"This action can be included in the t.chain call with \"moveCursor\" shortcut:\n\nt.chain(\n {\n action : 'mo...","component":false,"superclasses":["Siesta.Test.Action"],"subclasses":[],"mixedInto":[],"parentMixins":[],"requires":[],"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass first-child'><a href='#!/api/Siesta.Test.Action' rel='Siesta.Test.Action' class='docClass'>Siesta.Test.Action</a><div class='subclass '><strong>Siesta.Test.Action.MoveCursor</strong></div></div><h4>Mixins</h4><div class='dependency'><a href='#!/api/Siesta.Test.Action.Role.HasTarget' rel='Siesta.Test.Action.Role.HasTarget' class='docClass'>Siesta.Test.Action.Role.HasTarget</a></div><h4>Files</h4><div class='dependency'><a href='source/MoveCursor.html#Siesta-Test-Action-MoveCursor' target='_blank'>MoveCursor.js</a></div></pre><div class='doc-contents'><p>This action can be included in the <code>t.chain</code> call with \"moveCursor\" shortcut:</p>\n\n<pre><code>t.chain(\n {\n action : 'moveCursor',\n to : 'div.someClass' // A div with class='someClass'\n },\n {\n action : 'moveCursor',\n to : [400, 300] // Target pixel coordinates\n },\n {\n action : 'moveCursor',\n by : [20, 10] // 20 px right, 10 px down\n }\n)\n</code></pre>\n\n<p>This action will perform a moveCursorTo to the provided 'to' destination or the relative 'by' offset.</p>\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-by' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.Action.MoveCursor'>Siesta.Test.Action.MoveCursor</span><br/><a href='source/MoveCursor.html#Siesta-Test-Action-MoveCursor-cfg-by' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.Action.MoveCursor-cfg-by' class='name expandable'>by</a> : Array/Function<span class=\"signature\"></span></div><div class='description'><div class='short'>The delta for moving cursor. ...</div><div class='long'><p>The delta for moving cursor. Should be provided as the array with delta value for each coordinate: <code>[ dX, dY ]</code> or the function returning such.</p>\n\n<p>Exactly one of the <code>to</code> and <code>by</code> configuration options should be provided for this action.</p>\n</div></div></div><div id='cfg-desc' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Test.Action' rel='Siesta.Test.Action' class='defined-in docClass'>Siesta.Test.Action</a><br/><a href='source/Action4.html#Siesta-Test-Action-cfg-desc' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.Action-cfg-desc' class='name expandable'>desc</a> : String<span class=\"signature\"></span></div><div class='description'><div class='short'>When provided, once step is completed, a passing assertion with this text will be added to a test. ...</div><div class='long'><p>When provided, once step is completed, a passing assertion with this text will be added to a test.\nThis configuration option can be useful to indicate the progress of \"wait\" steps</p>\n</div></div></div><div id='cfg-el' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Test.Action.Role.HasTarget' rel='Siesta.Test.Action.Role.HasTarget' class='defined-in docClass'>Siesta.Test.Action.Role.HasTarget</a><br/><a href='source/HasTarget.html#Siesta-Test-Action-Role-HasTarget-cfg-el' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.Action.Role.HasTarget-cfg-el' class='name expandable'>el</a> : Object<span class=\"signature\"></span></div><div class='description'><div class='short'><p>An alias for <a href=\"#!/api/Siesta.Test.Action.Role.HasTarget-cfg-target\" rel=\"Siesta.Test.Action.Role.HasTarget-cfg-target\" class=\"docClass\">target</a></p>\n</div><div class='long'><p>An alias for <a href=\"#!/api/Siesta.Test.Action.Role.HasTarget-cfg-target\" rel=\"Siesta.Test.Action.Role.HasTarget-cfg-target\" class=\"docClass\">target</a></p>\n</div></div></div><div id='cfg-offset' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.Action.MoveCursor'>Siesta.Test.Action.MoveCursor</span><br/><a href='source/MoveCursor.html#Siesta-Test-Action-MoveCursor-cfg-offset' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.Action.MoveCursor-cfg-offset' class='name expandable'>offset</a> : Array<span class=\"signature\"></span></div><div class='description'><div class='short'><p>An offset in X, Y coordinates from the targeted element (only applicable when using the 'to' target option.</p>\n</div><div class='long'><p>An offset in X, Y coordinates from the targeted element (only applicable when using the 'to' target option.</p>\n<p>Overrides: <a href=\"#!/api/Siesta.Test.Action.Role.HasTarget-cfg-offset\" rel=\"Siesta.Test.Action.Role.HasTarget-cfg-offset\" class=\"docClass\">Siesta.Test.Action.Role.HasTarget.offset</a></p></div></div></div><div id='cfg-options' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Test.Action.Role.HasTarget' rel='Siesta.Test.Action.Role.HasTarget' class='defined-in docClass'>Siesta.Test.Action.Role.HasTarget</a><br/><a href='source/HasTarget.html#Siesta-Test-Action-Role-HasTarget-cfg-options' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.Action.Role.HasTarget-cfg-options' class='name expandable'>options</a> : Object<span class=\"signature\"></span></div><div class='description'><div class='short'>Any options that will be used when simulating the event. ...</div><div class='long'><p>Any options that will be used when simulating the event. For information about possible\nconfig options, please see: <a href=\"https://developer.mozilla.org/en-US/docs/DOM/event.initMouseEvent\">https://developer.mozilla.org/en-US/docs/DOM/event.initMouseEvent</a></p>\n</div></div></div><div id='cfg-passTargetToNext' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Test.Action.Role.HasTarget' rel='Siesta.Test.Action.Role.HasTarget' class='defined-in docClass'>Siesta.Test.Action.Role.HasTarget</a><br/><a href='source/HasTarget.html#Siesta-Test-Action-Role-HasTarget-cfg-passTargetToNext' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.Action.Role.HasTarget-cfg-passTargetToNext' class='name expandable'>passTargetToNext</a> : Boolean<span class=\"signature\"></span></div><div class='description'><div class='short'>Whether to pass the target further on chain as the first argument ...</div><div class='long'><p>Whether to pass the target further on chain as the first argument</p>\n<p>Defaults to: <code>true</code></p></div></div></div><div id='cfg-target' class='member inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><a href='#!/api/Siesta.Test.Action.Role.HasTarget' rel='Siesta.Test.Action.Role.HasTarget' class='defined-in docClass'>Siesta.Test.Action.Role.HasTarget</a><br/><a href='source/HasTarget.html#Siesta-Test-Action-Role-HasTarget-cfg-target' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.Action.Role.HasTarget-cfg-target' class='name expandable'>target</a> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a>/Function<span class=\"signature\"></span></div><div class='description'><div class='short'>A target for action. ...</div><div class='long'><p>A target for action. See <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a> for various values that can be provided.</p>\n\n<p><strong>Important.</strong> If the function is provided for this config, it will be called and returning value used as actual target.\nThis is useful, since sometimes target for the action depends from the previous step and\nis not yet available during <code>t.chain</code> call.</p>\n\n<p>For example, you want to click on the button which opens a window and then click on something in the window. Compare:</p>\n\n<pre><code>t.chain(\n // clicking on button opens the window\n {\n action : 'click',\n target : buttonComp\n },\n // FRAGILE: `windowComp` could not be rendered yet - `buttonComp` is not yet clicked!\n {\n action : 'click',\n target : windowComp.el.down('.clickArea')\n }\n\n // MORE ROBUST: taking the \"el\" right before this action starts\n {\n action : 'click',\n target : function () {\n return windowComp.el.down('.clickArea')\n }\n }\n)\n</code></pre>\n\n<p>Target will be available in the next step as the 2nd argument. See <a href=\"#!/api/Siesta.Test.Action.Role.HasTarget\" rel=\"Siesta.Test.Action.Role.HasTarget\" class=\"docClass\">Siesta.Test.Action.Role.HasTarget</a></p>\n\n<p>This config option can also be provided as \"el\"</p>\n</div></div></div><div id='cfg-to' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Siesta.Test.Action.MoveCursor'>Siesta.Test.Action.MoveCursor</span><br/><a href='source/MoveCursor.html#Siesta-Test-Action-MoveCursor-cfg-to' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Siesta.Test.Action.MoveCursor-cfg-to' class='name expandable'>to</a> : <a href=\"#!/api/Siesta.Test.ActionTarget\" rel=\"Siesta.Test.ActionTarget\" class=\"docClass\">Siesta.Test.ActionTarget</a>/Function<span class=\"signature\"></span></div><div class='description'><div class='short'>The target point the cursor should be moved to. ...</div><div class='long'><p>The target point the cursor should be moved to. Can be provided as a DOM element, an array with client coordinates: <code>[ x, y ]</code>, or a function\nreturning one of those. You can additionally pass an 'offset' array to click at a point relative to the XY position of the target.</p>\n\n<p>Exactly one of the <code>to</code> and <code>by</code> configuration options should be provided for this action.</p>\n</div></div></div></div></div></div></div>","meta":{}});