Add support for "focus" assertion (to work effectively as Chai jQuery assertion does)
See original GitHub issueChai jQuery added a focus
assertion recently.
Cypress needs support for focus assertions so I can assert whether a DOM element has or does not have focus.
Example
cy
.get('input')
.type('Foo').should('have.focus')
.blur().should('not.have.focus')
Issue Analytics
- State:
- Created 8 years ago
- Reactions:26
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Chai-jQuery - Chai Assertion Library
chai -jquery is an extension to the chai assertion library that provides a set of jQuery-specific assertions. Usage. Include chai-jquery.js in your test...
Read more >Assertions | Cypress Documentation
Adding New Assertions Cypress will "just work" with new assertions added to chai . You can: Write your own chai assertions as documented...
Read more >#14 Mocha - DOM Assertion using Chai-jQuery - YouTube
When writing integration tests, you will likely work a lot with the DOM. chai - jquery is an extension to the chai assertion...
Read more >attempted to make a chai-jQuery assertion on an object that is ...
To use chai-jQuery assertions your subject must be valid. This can sometimes happen if a previous assertion changed the subject.
Read more >chai-dom: Docs, Community, Tutorials, Reviews | Openbase
chai -dom is an extension to the chai assertion library that provides a set of ... Forked from chai-jquery to use for those...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, after this PR #3219 , you will be able to do the following assertions:
Currently looking into this
Edit: looks like it never made it into the develop branch https://github.com/cypress-io/cypress/compare/v3.3.0
We’ll have this fixed soon