Check element's existence in angular unit tests in a proper way
An assertion `expect(element.find(someSelector)).toBeDefined()` is
always true due to implementation of jQuery selectors. The assertion
that could actually catch something has the form
`expect(element.find(someSelector).length).toBe(1)`.
Reviewed: https:/ /review. openstack. org/221283 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=1d8142b6f03 304d2280f10c965 0d28febd05165a
Committed: https:/
Submitter: Jenkins
Branch: master
commit 1d8142b6f03304d 2280f10c9650d28 febd05165a
Author: Timur Sufiev <email address hidden>
Date: Tue Sep 8 15:38:33 2015 +0300
Check element's existence in angular unit tests in a proper way
An assertion `expect( element. find(someSelect or)).toBeDefine d()` is element. find(someSelect or).length) .toBe(1) `.
always true due to implementation of jQuery selectors. The assertion
that could actually catch something has the form
`expect(
Change-Id: I52c48e26d87072 731f689c136a00a 4140a7afb3b
Closes-Bug: #1493354