Get help with testing, discuss unit testing strategies etc.


Post by nickolay »

Need a reproducible test case, hard to say anything otherwise.

Post by terreb »

The link to the app with the test case:

https://www.dropbox.com/s/gjii76x2hafqfmv/app.zip?dl=0

the test in test/siesta/specs/tests folder

to see the issue please run the test at least 10 times, may be more... as I said it appears rare:)

Post by terreb »

Hi Nickolay! Have you had time to investigate why Siesta can not detect the button?

Post by nickolay »

Hi,

Not yet, will check soon.

Post by nickolay »

Not able to reproduce the issue, this action

{ action : 'click', target : '>>loginForm button[actionId=forgot]' }

Always passes for me.

Post by terreb »

I figured out that action-click fails when the getTargetCoordinate method returns a wrong X coordinate of the target (somehow $normalizedEl.offset() returns a wrong left offset). The first argument (target) passed to the method is always the correct one. Could you point me please where to look next?

Post by nickolay »

Hm.. You can step in into the "offset" method implementation and check why it returns wrong left offset. May be it uses different DOM property.

Post by terreb »

Unfortunately, I haven't had time to investigate the methods further. I just want to leave here my temporary workaround for people who might come across the same issue and looking for any solution on the forum.
t.chain(
    // if the element is visible in the DOM panel and can be clicked by the user, but Siesta still throws a warning that the element is not visible or reachable
    // using the Siesta 'click - target'
    // { action  : 'click', target : '>>loginForm button[actionId=forgot]' },
    // you can just fire the 'tap' event on the element to make Siesta proceed to the other steps
    function(next) {
            var btn = Ext.ComponentQuery.query('button[actionId=forgot]')[0];
            btn.fireEvent('tap', btn);
            next();
        }
    ...
)

Post Reply