Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add isDisabled() assertion #38

Closed
livet01 opened this issue Nov 22, 2017 · 1 comment
Closed

Add isDisabled() assertion #38

livet01 opened this issue Nov 22, 2017 · 1 comment

Comments

@livet01
Copy link

livet01 commented Nov 22, 2017

Adding checked and disabled states to be able to assert them easily:

assert.ok(find('input[type="checkbox"]').checked);
assert.dom('input[type="checkbox"]').isChecked();

assert.ok(find('input[type="checkbox"]').disabled); 
assert.dom('input[type="checkbox"]').isDisabled();

Also what about readonly or required?

@Turbo87
Copy link
Collaborator

Turbo87 commented Nov 22, 2017

I guess we should probably have a generic hasProperty() assertion roughly similar to hasAttribute(), but having those shortcut assertions for the most common properties should also be useful.

@Turbo87 Turbo87 changed the title Add support for input state (other than isFocused) Add assert.dom().isDisabled() assertion Mar 11, 2018
@Turbo87 Turbo87 changed the title Add assert.dom().isDisabled() assertion Add isDisabled() assertion Mar 11, 2018
This was referenced Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants