UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

55 lines (39 loc) 1.33 kB
/* Siesta 5.6.1 Copyright(c) 2009-2022 Bryntum AB https://bryntum.com/contact https://bryntum.com/products/siesta/license */ /** @class Siesta.Test.Action.MouseDown @extends Siesta.Test.Action @mixin Siesta.Test.Action.Role.HasTarget This action can be included in a `t.chain` call with "mouseDown" shortcut: t.chain( { action : 'mouseDown', target : someDOMElement, options : { shiftKey : true } // Optionally hold shiftkey }, // or { mousedown : someDOMElement, options : { shiftKey : true } // Optionally hold shiftkey } ) This action will perform a {@link Siesta.Test.Browser#MouseDown MouseDown} on the provided {@link #target}. */ Class('Siesta.Test.Action.MouseDown', { isa : Siesta.Test.Action, does : Siesta.Test.Action.Role.HasTarget, has : { requiredTestMethod : 'mouseDown' }, methods : { process : function () { this.test.mouseDown(this.getTarget(), this.options, this.offset, this.next, this, this.waitForTarget); } } }); Siesta.Test.ActionRegistry().registerAction('mouseDown', Siesta.Test.Action.MouseDown) Siesta.Test.ActionRegistry().registerAction('fingerDown', Siesta.Test.Action.MouseDown)