-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the teamtroubleshootingThis issue is not reporting an issue, but just asking for helpThis issue is not reporting an issue, but just asking for help
Description
What are you trying to do?
I'm trying to have a test of a standalone component which contains mat-select.
However, no matter what I do I face an error TypeError: element.animate is not a function
This is my test:
it('should be able to open and close a select', async () => {
const select = await loader.getHarness(MatSelectHarness);
expect(await select.isOpen()).toBe(false);
await select.open();
expect(await select.isOpen()).toBe(true);
await select.close();
expect(await select.isOpen()).toBe(false);
});
What troubleshooting steps have you tried?
I tried to provide provideNoopAnimations() in providers of TestBed.configureTestingModule() and also in providers of TestBed.overrideComponent() but it does not have any effect
Reproduction
Steps to reproduce:
1.
2.
Environment
- Angular: 14.2.3
- CDK/Material: 14.2.2
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Win11
Metadata
Metadata
Assignees
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the teamtroubleshootingThis issue is not reporting an issue, but just asking for helpThis issue is not reporting an issue, but just asking for help