/*

Siesta 5.3.2
Copyright(c) 2009-2020 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)