Sometimes after a page navigates, several API requests run in parallel — the navigation may be complete but the network is still active. In this case use page.waitForLoadState('networkidle'): it waits until all active network requests have finished.
The networkidle state means: no new network connections have been opened in the last 500 ms.
page is available. Call waitForLoadState('networkidle'), then assert the #dashboard element.