mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-01 13:13:11 +00:00
* chore: upgrade frontend application dependencies * chore: upgrade frontend infrastructure dependencies * fix: align lockfiles with CI npm * fix: preserve ky error semantics * fix: sanitize timeout error message
18 lines
658 B
TypeScript
18 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)");
|
|
});
|
|
});
|