Angular unit test verifying childcomponent’s method call

I have a page with sidebar section with sidebar-component and content section with a page-component. From the page-component, when I click a button, the sidebar-component toggles. Below is the code, async onSidebarButtonPressed() { const sidebar = document.querySelector(‘#filter-sidebar’); console.log(sidebar); (sidebar as any)?.toggle(); } Now I want to cover the scenario where the toggle() is called. I […]

Angular cdk-virtual-scroll-viewport return 0 when calling getBoundingClientRect

I have a table component which is contained inside cdk-virtual-scroll-viewport. One of the column cell contains ‘..more’ option that expands the entire row. But when scrolled up/down the row collapses due to the nature of scroll-viewport(user wants it to stay expanded). I resolved this by adding display: contents. cdk-virtual-scroll-viewport { height: 100%; min-height: 200px; display: […]

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us