-
Notifications
You must be signed in to change notification settings - Fork 136
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
Comments
I usually test the css class (e.g use Angular's disabled class in the
selector).
Again you'll get a much better response on stack overflow.
…On 3 Dec 2016 03:06, "Ka Mok" ***@***.***> wrote:
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
<http://stackoverflow.com/questions/21432339/how-to-check-if-an-element-is-enabled>
.
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#185>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG5tSA3SSkMSlhbH14T5DADlFY7gxmzrks5rEHpYgaJpZM4LC8IJ>
.
|
@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. |
Interesting thanks. I didn't know ionic was so dead on stack. Most of the
questions (this included) are relevant for ng2 imo.
I don't have time to support the level of general unit testing questions I
get on here any longer. Nor am I qualified by contrast with the ng2
community on stack overflow.
My hope was that by referring people to stack they'd get good answers in a
timely fashion.
I guess this is more fallout from ionic not supporting any form of testing..
Will have a think on how to proceed.
…On 5 Dec 2016 22:06, "Ka Mok" ***@***.***> wrote:
@lathonez <https://github.com/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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#185 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG5tSCNEpL7TKG2ec-QE5BCxDKkwHi6jks5rFChogaJpZM4LC8IJ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 useisEnabld()
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.
The text was updated successfully, but these errors were encountered: