Right now we are using karma testing to check for existing buttons in a component, the thing is the component displays the buttons as the child of a child.
what we are testing is:
ProductNavComponent
\ NavComponent
\ ButtonComponent
we want to test the button component inside the test component, I've tried using
await component.findByTestId('import-nav-btn')
and await component.queryByTestId('import-nav-btn')
but it throws this error in which shows the component html error image and does show the button I'm trying to test error image shown so why is unable to find the button?