interactor icon indicating copy to clipboard operation
interactor copied to clipboard

Add isFocused getter

Open cherewaty opened this issue 6 years ago • 0 comments

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.

cherewaty avatar Jul 03 '19 17:07 cherewaty