siesta-lite
Version:
Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers
76 lines (61 loc) • 2.13 kB
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 "moveCursorBy" shortcut:
t.chain(
{
moveCursorBy : [ 100, 100 ]
},
...
)
*/
Class('Siesta.Test.Action.MoveCursorBy', {
isa : Siesta.Test.Action,
does : [
Siesta.Test.Action.Role.HasTarget,
Siesta.Util.Role.CanGetType
],
has : {
requiredTestMethod : 'moveMouseBy'
},
methods : {
process : function () {
var test = this.test;
var next = this.next;
if (this.target && this.typeOf(this.target) === 'Array' && this.typeOf(this.target[ 0 ]) === 'Array') {
this.target = this.target[ 0 ]
}
test.moveMouseBy(this.getTarget(), this.next, this, this.options);
}
}
});
Siesta.Test.ActionRegistry().registerAction('moveMouseBy', Siesta.Test.Action.MoveCursorBy)
Siesta.Test.ActionRegistry().registerAction('moveCursorBy', Siesta.Test.Action.MoveCursorBy)
Siesta.Test.ActionRegistry().registerAction('moveFingerBy', Siesta.Test.Action.MoveCursorBy)
</pre>
</body>
</html>