Support Forum
Dear developers,
In IE9 and IE8 I had a trouble with tests. When I launch a test (for example button UI tests, or routing test) a new frame or window is being opened (DOM visualization works in the frame) and some tests doesn't pass validation. In other browsers tests passed validation.
In IE9 and IE8 I had a trouble with tests. When I launch a test (for example button UI tests, or routing test) a new frame or window is being opened (DOM visualization works in the frame) and some tests doesn't pass validation. In other browsers tests passed validation.
Last edited by proudman on Wed Oct 31, 2012 3:25 pm, edited 2 times in total.
Can you strip all the code not related to failing assertion and post the test case here, so we can reproduce?
Read the API documentation
Yes I can.
We use ext-all.css from ExtJS.
StartTest(function (test) {
var button = Ext.create('Ext.Button', {
text: 'Click me',
renderTo: Ext.getBody(),
handler: function() {
alert('You clicked the button!');
}
});
test.diag("button.Button.focus()");
button.focus();
test.ok(button.el.hasCls("x-focus"), 'Set focus method added focus class');
});
Try this code:
IE behaves differently when doing focus and often is doing that asynchronously. You need to give it some time before checking the css class.
StartTest(function (test) {
var button = Ext.create('Ext.Button', {
text: 'Click me',
renderTo: Ext.getBody(),
handler: function() {
alert('You clicked the button!');
}
});
test.diag("button.Button.focus()");
button.focus();
setTimeout(function () {
test.ok(button.el.hasCls("x-focus"), 'Set focus method added focus class');
}, 50)
});
Read the API documentation
Its not a bug. Its the way IE works (or may be ExtJS). If some event happens asynchronously (focusing in this case), you can't check for its result synchronously.
Read the API documentation