another step for constructing base project
This commit is contained in:
@@ -28,7 +28,8 @@ describe('<AppIconButton/> component', () => {
|
||||
// Button
|
||||
const button = screen.getByTestId(testId);
|
||||
expect(button).toBeDefined();
|
||||
expect(button).toHaveAttribute('role', 'button');
|
||||
// MUI v9: native <button> has implicit role; no explicit role attr on semantic elements
|
||||
expect(button).toHaveRole('button');
|
||||
expect(button).toHaveAttribute('type', 'button');
|
||||
|
||||
// Icon
|
||||
@@ -70,7 +71,8 @@ describe('<AppIconButton/> component', () => {
|
||||
// Button
|
||||
const button = screen.getByTestId(testId);
|
||||
expect(button).toBeDefined();
|
||||
expect(button).toHaveAttribute('aria-disabled', 'true');
|
||||
// MUI v9: native disabled button uses HTML disabled attribute, not aria-disabled
|
||||
expect(button).toBeDisabled();
|
||||
expect(button).toHaveClass('Mui-disabled');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user