angular test issue with snackbar

Discussão em 'Angular' iniciado por Cocoo, Outubro 19, 2024.

  1. Cocoo

    Cocoo Guest

    For angular material snackbar I just use the official example and write unit test for the component.

    In the test,I use loader with documentRootLoader and MarSnackbarHarness to check whether the snack bar display,it passed. But if I add the duration parameter to the open function,it will can’t find the snackbar element.

    Anyone could explain why it can’t get the element and how can I check the display of snack bar element?

    Continue reading...

Compartilhe esta Página