Closed
Description
I'm trying to test a component that has a mat-checkbox. But every time I simulate the click on the checkbox and make the assert the expected result is not the one returned.
Ex:
const checkboxes = await screen.getAllByTestId('checkbox-benefit');
const checkbox = checkboxes[0];
expect(checkbox).not.toBeChecked()
userEvent.click(checkbox);
component.fixture.detectChanges();
expect(checkbox).toBeChecked() // Failed, mark false
Any example for this?
Metadata
Metadata
Assignees
Labels
No labels