Skip to content

Commit 1cd42e0

Browse files
authored
fix(ui): render mantine header correctly (prometheus#5537)
- add missing header class - add tests Signed-off-by: Siavash Safi <siavash@cloudflare.com>
1 parent 0b25d0a commit 1cd42e0

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

ui/mantine-ui/src/App.test.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { render, screen } from '@testing-library/react';
22

33
import App from './App';
4+
import headerClasses from './components/Header.module.css';
45

56
afterEach(() => {
67
window.location.hash = '';
@@ -14,4 +15,10 @@ describe('App routing', () => {
1415

1516
expect(screen.getByText('Alerts List')).toBeInTheDocument();
1617
});
18+
19+
it('applies the header style class', () => {
20+
render(<App />);
21+
22+
expect(screen.getByRole('banner')).toHaveClass(headerClasses.header);
23+
});
1724
});

ui/mantine-ui/src/components/Header.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
.header {
2+
color: var(--mantine-color-white);
3+
background-color: var(--mantine-color-dark-6);
4+
}
5+
16
.navMain {
27
flex: 1;
38
}

0 commit comments

Comments
 (0)