-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/snack-bar
Description
Reproduction
https://stackblitz.com/edit/components-issue-v9512z?file=src%2Fapp%2Fexample-test.spec.ts
Steps to reproduce:
- Try to e.g.
await harness.getMessage()
a snack bar that was opened with aduration
. You can see this simply by following the link above, which will run that automatically.
Expected Behavior
The harness returns the message in the snack bar.
Actual Behavior
The test hangs for the duration that the snack bar is open, then fails with "Failed to find element".
Environment
- Angular: 9.1.5
- CDK/Material: 9.2.2
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Commentary
Using the same test code, I can test a snack bar that was opened without a duration. But if my production code does use a duration it does not appear possible to test it with the harness. Am I missing something? I assume assigning a duration is a common use-case.
alansastre and dkimmich-onventis
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/snack-bar