Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

fix #954 Improvement of the focus template API test #959

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Collaborator

flongo commented Jan 28, 2014

An existing test (test.aria.templates.focusAfterRefresh.FocusTemplateTestCase) has been improved in order to actually test that the focus is given back to the widget that had it before a refresh.

flongo added a commit to flongo/ariatemplates that referenced this pull request Jan 28, 2014

fix #954 Improvement of the focus template API test
An existing test (test.aria.templates.focusAfterRefresh.FocusTemplateTestCase) has been improved in order to actually test that the focus is given back to the widget that had it before a refresh.

Close #959.

flongo added a commit to flongo/ariatemplates that referenced this pull request Jan 29, 2014

fix #954 Improvement of the focus template API test
An existing test (test.aria.templates.focusAfterRefresh.FocusTemplateTestCase) has been improved in order to actually test that the focus is given back to the widget that had it before a refresh.

Close #959.

@ghost ghost assigned jakub-g Jan 29, 2014

@jakub-g jakub-g commented on an outdated diff Jan 29, 2014

.../templates/focusAfterRefresh/FocusTemplateTestCase.js
this._assertWidgetPath();
},
_testFocusAfterRefresh : function () {
- this.__clickAndContinue(this.__getButton(), this._buttonClicked2);
- },
- _buttonClicked2 : function () {
- this.__clickAndContinue(this.__getInput(), this._focusedWidget);
- },
- _focusedWidget : function () {
var element = this.__getInput();
var focusedElement = Aria.$window.document.activeElement;
this.assertEquals(element.innerHTML, focusedElement.innerHTML, "Widget was not focused after refresh.");
@jakub-g

jakub-g Jan 29, 2014

Collaborator

Unrelated to the commit, but since we're touching this: why we compare innerHTMLs instead of elements directly? I think this is wrong. The expected element to have focus is an <input> which has an empty innerHTML so in fact this assertion might pass through accidentally when some other <input> in fact had the focus.

Collaborator

jakub-g commented Jan 29, 2014

I put a high timeout on this test long time ago, but seems it now executes (perhaps due to this commit) in <5 seconds in IE7 and IE8 in dev mode. I guess we can lower the timeout and remove the comment.

@ghost ghost assigned divdavem and jakub-g Jan 29, 2014

fix #954 Improvement of the focus template API test
An existing test (test.aria.templates.focusAfterRefresh.FocusTemplateTestCase) has been improved in order to actually test that the focus is given back to the widget that had it before a refresh.

Close #959.
Collaborator

jakub-g commented Jan 29, 2014

reviewed fab9e0b - looks good

@flongo flongo closed this in 19936ea Jan 29, 2014

carlo-mr added a commit to carlo-mr/ariatemplates that referenced this pull request Mar 3, 2014

fix #954 Improvement of the focus template API test
An existing test (test.aria.templates.focusAfterRefresh.FocusTemplateTestCase) has been improved in order to actually test that the focus is given back to the widget that had it before a refresh.

Close #959.

@flongo flongo deleted the flongo:test-template-api-focus branch Jun 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment