siesta-lite
Version:
Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers
57 lines (38 loc) • 1.31 kB
JavaScript
/*
Siesta 5.6.1
Copyright(c) 2009-2022 Bryntum AB
https://bryntum.com/contact
https://bryntum.com/products/siesta/license
*/
/**
@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)