shoc-frontend-new/src/test/lib/mui-theme.test.tsx
Alexandre Brandizzi c68d47af7b
Some checks failed
CI / ci (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
chore: upgrade frontend dependencies (#24)
* 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
2026-07-14 21:35:59 -03:00

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)");
});
});