-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Description
So I have a component that uses mat-menu. When I call fireEvent.click(), I get an error: TestingLibraryElementError: Unable to find role="menu" in console.
test('it should open pages menu on button click', async () => {
let component = await render(PaginationComponent, {
imports:[MaterialModule]
});
let buttonCLick = fireEvent.click(screen.getByTestId('openChangePageSizeMenu'));
expect(buttonCLick).toBeTruthy();
await screen.findByRole('menu');
});
This is the code that I wrote. Can someone help me out? I am fairly new in Testing.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels