Get help with testing, discuss unit testing strategies etc.


Post by kleins »

I am currently evaluating Siesta for a project I am working on. I noticed that the type-action does not seem to trigger the browsers change event in FF (in Chrome it works fine, other browsers not tested yet). I have a form with a field that triggers an action when its contents changes which works fine when changing the contents manually. Running the test, however, fails, because the action is not triggered. The field has keyup removed from checkChangeEvents to avoid change-events being triggered on every keypress.

It seems to me that Siesta's type action does not trigger the change event correctly? Or am I doing anything wrong?

I wrote a simple test case that shows the behaviour (the final click in the action chain is just to remove the focus from the field which would normally commit the content and trigger the change event)
StartTest(function (t) {

	var win = Ext.create('Ext.window.Window', {
		items: {
			xtype: 'form',
			items: {
				xtype: 'textfield',
				itemId: '#testfield',
				checkChangeEvents: ['change', 'input', 'textInput', 'dragdrop'],
				listeners: {
					change: function() {
						alert('changed');
					}
				}
			}
		}
	});
	
	win.show();
	
	t.chain(
	    { action : "click", target : "[itemId=#testfield] => .x-form-text", offset : [11, 6] },
	
	    { action : "type", text : "test" },
	
	    { action : "click", target : [465, 265] }
	);

});

Post by mats »

Reproduced, I opened a ticket here. Thanks for the report"

https://www.assembla.com/spaces/bryntum ... ity/ticket:

Post by mats »

This should work fine now, please re-test in latest release/nightly?

Post Reply