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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -