siesta-lite
Version:
Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers
77 lines (59 loc) • 2.09 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-MonkeyTest'>/**
</span>
@class Siesta.Test.Action.MonkeyTest
@extends Siesta.Test.Action
@mixin Siesta.Test.Action.Role.HasTarget
This action can be included in a `t.chain` call with "monkeyTest" shortcut:
t.chain(
{ monkeyTest : '.someSelector' }
)
This action will perform a {@link Siesta.Test.Browser#MouseDown MouseDown} on the provided {@link #target}.
*/
Class('Siesta.Test.Action.MonkeyTest', {
isa : Siesta.Test.Action,
does : Siesta.Test.Action.Role.HasTarget,
has : {
requiredTestMethod : 'monkeyTest',
nbrInteractions : 10,
skipTargets : null,
hasOwnAsyncFrame : true
},
methods : {
process : function () {
this.test.monkeyTest({
target : this.getTarget(),
nbrInteractions : this.nbrInteractions,
skipTargets : this.skipTargets,
callback : this.next
})
}
}
})
Siesta.Test.ActionRegistry().registerAction('monkeyTest', Siesta.Test.Action.MonkeyTest)
Siesta.Test.ActionRegistry().registerAction('monkey', Siesta.Test.Action.MonkeyTest)
</pre>
</body>
</html>