The container property, returned by render function from @testing-library/angular package has an Element type instead of HTMLElement. That triggers a type error trying to use it with logRoles that expects HTMLElement as a first argument
in angular package
in core types
https://github.com/testing-library/react-testing-library/blob/590bc18a7f24e025d4154e228adda71452fdec9e/types/index.d.ts#L33
Container extends RendererableContainer | HydrateableContainer = HTMLElement,
container: Container