Get help with testing, discuss unit testing strategies etc.


Post by fancy »

Preface:
It was fixed many bugs in Siesta 4.2.1
Thank you.

Issue:
Is there any way to simulate and record events that occured when mousemove.
In dom when mousemove it also occurs these events: mouseover, mouseout.

I need it because:
Some elements became visible only after hover on them.

Post by nickolay »

The 4.2.2 release will have an improvement in this area - option to record the mouse move path, which should trigger the same "hover" elements.

Right now, you can use the (undocumented and subject to change) option of recorder "moveCursorToSelectors" - an array of selectors. Siesta Record will create a "moveCursorTo" command when cursor goes to matching elements. To configure the recorder use the "recorderConfig" harness option.

Post by fancy »

Can you please write an example?
I try version 4.2.2
t.describe("Move Cursor to Menu item", function(t){
  t.chain(
	{ moveCursorToSelectors: ['.fancy-grid-left .fancy-grid-header-cell[index=0]'], offset : [100, 13] }
  );
});
It throw an exception
Need to include `action` property or shortcut property in the step config: {"moveCursorToSelectors": [".fancy-grid-left .fancy-grid-header-cell[index=0]"], "offset": [32, 13]}
In documentation there is no sample.
https://www.bryntum.com/docs/siesta/#!/a ... oSelectors

Post by mats »

moveCursorToSelectors is not an action you perform, it's a config option for our recorder. Please see docs:

https://bryntum.com/docs/siesta/#!/api/S ... oSelectors
recorderConfig : {
        moveCursorToSelectors :  ['.mycssclass']
}  

Post by fancy »

mats wrote:
recorderConfig : {
        moveCursorToSelectors :  ['.mycssclass']
}  
Thank you very much, it works.

May I ask one more about all this?
moveCursorTo - generates "mouseenter" and 'mouseleave'
But for my product for more complex tests it requires also 'mousemove' on some elements.
In my product some elements appear according mousemove params on elements.

Post by nickolay »

What is the question? 'mousemove' is of course generated when cursor is being moved.

Post by fancy »

nickolay wrote:What is the question? 'mousemove' is of course generated when cursor is being moved.
Seems like at my side something does not work right with mousemove in this issue.
I will deep try on weekends and write back.

Thank you for support.

Post by fancy »

Question solved - my mistake.

Post Reply