No luck with that too @fancy-mechanic-10638. The Cypress Test runner doesn't load the modal div at all in to DOM and hence is not finding it even after I removed the wrap($div). Tried this below code, but not working.
> cy.get('[data-testid=open-document]', {timeout : 60000}).click().then(() => {
> cy.get('[data-testid=document-dialog] h3', {timeout: 60000})
> .should('have.text', 'bankStatement.html')
> cy.on("uncaught:exception", () => {
> return false;
> });
> });