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

Testing if an element is disabled on the DOM? #185

Closed
kamok opened this issue Dec 2, 2016 · 4 comments
Closed

Testing if an element is disabled on the DOM? #185

kamok opened this issue Dec 2, 2016 · 4 comments

Comments

@kamok
Copy link

kamok commented Dec 2, 2016

Trying to test if a button is disabled. I was able to select the button in question by doing:

let button = fixture.nativeElement.querySelectorAll('button')[0]

** if there's a better way to select buttons, please link me to the reading. Have been trying to find some for a while.

Then, when I do button.isEnabled(), it gives me a no method error. I got the idea to use isEnabld() here.

I would appreciate it if someone can point me to some documentation to get better at unit testing. I've been reading Angular 2 materials, but I find them often to be not applicable to this test suite.

Thanks for reading.

@lathonez
Copy link
Owner

lathonez commented Dec 3, 2016 via email

@kamok
Copy link
Author

kamok commented Dec 5, 2016

@lathonez I think there's a higher possibility that people who use your starter app to ask the same questions. Almost all of my Ionic 2 questions are dead quiet on Stack. Thanks. Closing.

@kamok kamok closed this as completed Dec 5, 2016
@lathonez
Copy link
Owner

lathonez commented Dec 5, 2016 via email

@lathonez
Copy link
Owner

#191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants