Open valdrinkoshi opened 8 years ago
cc @azakus
In my case, doing window.top.focus()
solves the issue (tests are run into an <iframe>
)
cc/ @justinfagnani
I wonder where the right place to fix this is. If we want to make sure that a browser has focus before a test, that needs to happen per test. WCT might not have the right hook into the tests for that. Would a utility function that prepares a focus test suffice?
@valdrinkoshi what's the latest on the focus woes?
@justinfagnani no news on this issue.
I think a better and more reliable technique for focus related tests is to check for who causes focus to change, instead of checking the consequences of changing focus. In other words, is better to observe if node.focus()
gets called (e.g. with a spy), rather than check its consequences (e.g. check the value of document.activeElement
).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Focus related tests fail on Firefox 44 because the focus moves away from the Firefox window.
Example 1
Example 2 https://github.com/PolymerElements/paper-dialog-behavior/blob/master/test/paper-dialog-behavior.html#L269