Get help with testing, discuss unit testing strategies etc.


Post by santiagopiria »

Hello,
I need some help. I've got a test suite which passes. The thing is I have a test, specifically a view test, which fails when I take the focus away from the browser.
I run the test looking at the browser - PASS
I run the test and click on another window - FAIL
The failure looks like it is originated because an event is not being fired. I put a console log in the event handler and it never gets there. It does if I the focus is on the browser.
Specifically: "validateedit" event on a Ext.grid.Panel using Ext.grid.plugin.CellEditing.
Any ideas?
Thanks.

Post by mats »

Yes, tests should run being focused - otherwise you disturb the focusing. Normally this is never an issue when you run your automated tests.

Post by santiagopiria »

Thanks for the reply.
It is running as an automated test on codeship.io and this is where we have the issue.
Can you suggest any workarounds? Because I don't have a way to have focus when running automated on codeship.

Also, if that is the case, shouldn't I be getting errors in more tests when running on codeship?

Post by mats »

Can you give us a simple test case and show how you launch the test?

Post Reply