interactor
interactor copied to clipboard
Add isFocused getter
Purpose
Testing if an element has focus with is(':focus') can be very frustrating in a local environment. If a user happens to click away from the browser window while they're running a test suite, assertions using is(':focus') will fail.
Meant to address https://github.com/bigtestjs/interactor/issues/62
Approach
Introduce isFocused() that matches on document.activeElement under the hood instead of the :focus pseudo class.
Next steps
Will need a minor release and updates to https://github.com/bigtestjs/bigtestjs.io.