mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-02 07:23:13 +00:00
19 lines
658 B
TypeScript
19 lines
658 B
TypeScript
|
|
import { Alert, ThemeProvider } from "@mui/material";
|
||
|
|
import { render, screen } from "@testing-library/react";
|
||
|
|
import { describe, expect, it } from "vitest";
|
||
|
|
import { muiTheme } from "@/lib/theme/mui-theme";
|
||
|
|
|
||
|
|
describe("MUI theme variants", () => {
|
||
|
|
it("applies the custom success palette when Alert uses severity", () => {
|
||
|
|
render(
|
||
|
|
<ThemeProvider theme={muiTheme}>
|
||
|
|
<Alert severity="success">Saved</Alert>
|
||
|
|
</ThemeProvider>,
|
||
|
|
);
|
||
|
|
|
||
|
|
const alert = screen.getByRole("alert");
|
||
|
|
expect(getComputedStyle(alert).backgroundColor).toBe("rgb(240, 253, 244)");
|
||
|
|
expect(getComputedStyle(alert).color).toBe("rgb(22, 101, 52)");
|
||
|
|
});
|
||
|
|
});
|