According to the How do I assert an element is focused? thread, you can check if an element is focused by switching to an activeElement() and assert this is the
activeElement()
What about using CSS selectors and :focus
expect(element.all(by.css('#myid:focus')).count()).toBe(1);