Issue
How to test dialogref from MatDialogRef?
dialogRef: MatDialogRef<testComponent>;
showBackdrop() {
const backdrop = this.dialogRef['_ref'].overlayRef._backdropElement.style.display = 'block'
}
Solution
const matDialogRefMock = {
_ref : {
overlayRef: {
_backdropElement: {
style: {
display: 'block'
}
}
},
}
};
Answered By - Mat
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.