angular - Find if element contains element with id -
how can find if element contains element specified id?
<div class="menu"> <div id="signin">sign in</div> </div>
i'm checking query length here thought there might better way:
it('main menu has signin link if not signed in', () => { fixture.detectchanges(); let links = menuelemdebug.queryall(by.css('#signin-button')); expect(links.length).tobe(1); })
try simple css selection like:
let links = menuelemdebug.queryall(by.css('.menu> #signin'));
but if going after element id, guess uniquely identified.
Comments
Post a Comment