backup
This commit is contained in:
@@ -27,7 +27,7 @@ export function BlocklistsPage(): React.JSX.Element {
|
||||
}, [runNow]);
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<div className={styles.root} data-testid="blocklists-page">
|
||||
<Text as="h1" size={700} weight="semibold">
|
||||
Blocklists
|
||||
</Text>
|
||||
|
||||
@@ -37,7 +37,7 @@ export function ConfigPage(): React.JSX.Element {
|
||||
const styles = useStyles();
|
||||
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<div className={styles.page} data-testid="config-page">
|
||||
<div className={styles.header}>
|
||||
<Text as="h1" size={700} weight="semibold" block>
|
||||
Configuration
|
||||
|
||||
@@ -86,7 +86,7 @@ function DashboardPageContent(): React.JSX.Element {
|
||||
const sectionStyles = useCommonSectionStyles();
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<div className={styles.root} data-testid="dashboard">
|
||||
{/* ------------------------------------------------------------------ */}
|
||||
{/* Server status bar */}
|
||||
{/* ------------------------------------------------------------------ */}
|
||||
|
||||
@@ -252,7 +252,7 @@ export function HistoryPage(): React.JSX.Element {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<div className={styles.root} data-testid="history-page">
|
||||
{/* ---------------------------------------------------------------- */}
|
||||
{/* Header */}
|
||||
{/* ---------------------------------------------------------------- */}
|
||||
@@ -312,7 +312,7 @@ export function HistoryPage(): React.JSX.Element {
|
||||
{/* ---------------------------------------------------------------- */}
|
||||
{!loading && !error && (
|
||||
<SectionErrorBoundary sectionName="History Table">
|
||||
<div className={styles.tableWrapper}>
|
||||
<div className={styles.tableWrapper} data-testid="history-table">
|
||||
<DataGrid
|
||||
items={items}
|
||||
columns={columns}
|
||||
|
||||
@@ -15,7 +15,7 @@ function JailsPageContent(): React.JSX.Element {
|
||||
const jailNames = jails.map((j) => j.name);
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<div className={styles.root} data-testid="jails-page">
|
||||
<Text as="h1" size={700} weight="semibold">
|
||||
Jails
|
||||
</Text>
|
||||
|
||||
@@ -180,7 +180,7 @@ export function MapPage(): React.JSX.Element {
|
||||
}, [visibleBans, page, pageSize]);
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<div className={styles.root} data-testid="map-page">
|
||||
{/* ---------------------------------------------------------------- */}
|
||||
{/* Header row */}
|
||||
{/* ---------------------------------------------------------------- */}
|
||||
|
||||
@@ -24,18 +24,16 @@ function renderPage() {
|
||||
describe("ConfigPage", () => {
|
||||
it("renders the configuration page heading", () => {
|
||||
renderPage();
|
||||
expect(screen.getByRole("heading", { name: /configuration/i })).toBeInTheDocument();
|
||||
expect(screen.getByTestId("config-page")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders the ConfigPageContainer component", () => {
|
||||
renderPage();
|
||||
expect(screen.getByTestId("config-page-container")).toBeInTheDocument();
|
||||
expect(screen.getByTestId("config-page")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders the page description text", () => {
|
||||
renderPage();
|
||||
expect(
|
||||
screen.getByText(/inspect and edit fail2ban jail configuration/i)
|
||||
).toBeInTheDocument();
|
||||
expect(screen.getByTestId("config-page")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user