Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/react-core/src/components/Page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,13 @@ class Page extends Component<PageProps, PageState> {
)}
>
{skipToContent}
{variant === 'docked' ? <div className={css(styles.pageDock)}>{masthead}</div> : masthead}
{variant === 'docked' ? (
<div className={css(styles.pageDock)}>
<div className={css(styles.pageDockMain)}>{masthead}</div>
</div>
Comment on lines +351 to +354
Copy link
Copy Markdown

@coderabbitai coderabbitai bot Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Checking Page component references..."
rg -n 'styles\.pageDockMain|styles\.pageSidebarMain' packages/react-core/src/components/Page

echo "Locating generated Page style artifacts..."
fd -i 'page.*' | rg -n 'components[/\\]Page[/\\]page(\.|$)|css/components/Page/page(\.|$)' || true

echo "Verifying style keys exist in available artifacts..."
fd -i 'page.*' | xargs -r rg -n 'pageDockMain|pageSidebarMain'

Repository: patternfly/patternfly-react

Length of output: 4154


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Finding imports of styles in Page.tsx ==="
head -50 packages/react-core/src/components/Page/Page.tsx | grep -n "import.*styles\|from.*styles"

echo -e "\n=== Checking where styles object comes from ==="
rg -n "^import.*styles" packages/react-core/src/components/Page/Page.tsx | head -5

echo -e "\n=== Locating style definition files ==="
fd -i "page\.scss|page\.css|page\.module" packages/

echo -e "\n=== Checking for style type definitions ==="
fd -type f -name "*.d.ts" -path "*/Page/*" | head -20

echo -e "\n=== Searching for pageDockMain in type definitions ==="
rg -n "pageDockMain" --type ts packages/ 2>/dev/null | head -20

Repository: patternfly/patternfly-react

Length of output: 687


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Checking package.json for `@patternfly/react-styles` version ==="
rg -A2 '"@patternfly/react-styles"' package.json packages/react-core/package.json 2>/dev/null | head -10

echo -e "\n=== Checking if node_modules is available ==="
ls -la node_modules/@patternfly/react-styles/css/components/Page/ 2>/dev/null || echo "node_modules not available"

echo -e "\n=== Searching for TypeScript type definitions for page styles ==="
fd page packages/react-core/src -type f | grep -E "\.(d\.ts|tsx)$" | head -10

echo -e "\n=== Checking test file to see if pageDockMain is defined in a type ==="
rg -B5 "pageDockMain" packages/react-core/src/components/Page/__tests__/Page.test.tsx | head -30

echo -e "\n=== Checking if styles object has a type annotation ==="
rg -A3 "import styles from" packages/react-core/src/components/Page/Page.tsx

echo -e "\n=== Looking for any .d.ts or type stubs related to page ==="
fd "page" packages/react-core -name "*.d.ts"

Repository: patternfly/patternfly-react

Length of output: 686


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Finding `@patternfly/react-styles` in the monorepo ==="
find . -maxdepth 3 -type d -name "react-styles" 2>/dev/null

echo -e "\n=== Checking directory structure in packages/ ==="
ls -la packages/ | grep -E "^d"

echo -e "\n=== Looking for page.css or page.scss in the entire repo ==="
fd -e css -e scss "page" . 2>/dev/null | grep -v node_modules | head -20

echo -e "\n=== Searching for pageDockMain definition anywhere ==="
rg "pageDockMain" . --type-list 2>/dev/null | head -5
rg "pageDockMain\s*[:=]" . --no-heading 2>/dev/null | head -20

Repository: patternfly/patternfly-react

Length of output: 1377


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Exploring packages/react-styles structure ==="
ls -la packages/react-styles/src/

echo -e "\n=== Looking for page-related CSS files ==="
find packages/react-styles -name "*page*" -type f 2>/dev/null

echo -e "\n=== Checking CSS components directory ==="
find packages/react-styles -path "*/css/components/Page*" -o -path "*/sass/components/Page*" 2>/dev/null | head -20

echo -e "\n=== Searching for pageDockMain in react-styles package ==="
rg "pageDockMain" packages/react-styles/ 2>/dev/null

echo -e "\n=== Searching for page styles file ==="
find packages/react-styles -name "page.*" -type f 2>/dev/null

Repository: patternfly/patternfly-react

Length of output: 485


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Listing packages/react-styles/src/css ==="
ls -la packages/react-styles/src/css/

echo -e "\n=== Checking for components subdirectory ==="
find packages/react-styles/src/css -type d -name "components" -o -type d -name "Page*"

echo -e "\n=== Listing all files in react-styles/src/css ==="
find packages/react-styles/src/css -type f 2>/dev/null | head -30

echo -e "\n=== Searching entire react-styles for pageDockMain or pageSidebarMain ==="
rg "pageDockMain|pageSidebarMain" packages/react-styles/ 2>/dev/null

echo -e "\n=== Check if CSS files are compiled or in a different format ==="
find packages/react-styles -name "*.css" -o -name "*.scss" 2>/dev/null | head -20

Repository: patternfly/patternfly-react

Length of output: 729


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Listing all subdirectories in components ==="
ls -la packages/react-styles/src/css/components/

echo -e "\n=== Check for Page directory specifically ==="
ls -la packages/react-styles/src/css/components/Page 2>&1

echo -e "\n=== List all CSS files in react-styles ==="
find packages/react-styles -name "*.css" -type f

echo -e "\n=== Check the index.ts to understand how styles are exported ==="
cat packages/react-styles/src/index.ts

Repository: patternfly/patternfly-react

Length of output: 473


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Reading the relevant test section ==="
sed -n '410,422p' packages/react-core/src/components/Page/__tests__/Page.test.tsx

echo -e "\n=== Reading more context around the test ==="
sed -n '408,425p' packages/react-core/src/components/Page/__tests__/Page.test.tsx

Repository: patternfly/patternfly-react

Length of output: 1409


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check if page.css/page.scss exists in a different location ==="
find packages/react-styles -name "*.scss" -o -name "*.css" 2>/dev/null

echo -e "\n=== Check the PR or commit messages for context ==="
git log --oneline -20 2>/dev/null | grep -i "page\|dock\|style" || echo "Git log not available"

echo -e "\n=== Verify that import path will fail ==="
rg "@patternfly/react-styles/css/components/Page/page" packages/react-core/

echo -e "\n=== Check if there are any TypeScript type stubs or mock files ==="
find packages -name "*.d.ts" -path "*/Page/*" 2>/dev/null | xargs grep -l "pageDockMain" 2>/dev/null || echo "No type stubs found"

echo -e "\n=== Double check: does the import path actually resolve? ==="
ls -la packages/react-styles/css/components/Page/ 2>&1 || echo "Path confirmed missing"
</parameter>

Repository: patternfly/patternfly-react

Length of output: 2671


Block this PR until the Page CSS file is available in @patternfly/react-styles.

The CSS file packages/react-styles/css/components/Page/page does not exist. The import at line 2 of Page.tsx (and 13 other Page-related files) will fail, and styles.pageDockMain referenced at line 353 is undefined. The corresponding CSS component directory is missing from the react-styles package entirely.

This change cannot proceed until the style artifact includes the Page component CSS file with the pageDockMain and pageSidebarMain keys.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/react-core/src/components/Page/Page.tsx` around lines 351 - 354, The
PR imports a missing CSS module causing styles.pageDockMain (used in Page.tsx
within the variant === 'docked' branch) to be undefined; either add the Page CSS
artifact to `@patternfly/react-styles` exporting the required keys (pageDockMain
and pageSidebarMain) or remove/guard usages of styles.pageDockMain and
styles.pageSidebarMain in the Page component (and other Page-related files)
until the CSS module exists; update the import that references
packages/react-styles/css/components/Page/page to point to the correct file or
ensure the package publishes the page CSS with the exact keys expected by the
Page component.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file does exist, I have no issues locally.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thatblindgeye, you're absolutely right — I apologize for the false positive. My analysis was flawed because the sandbox environment used for script execution doesn't have node_modules available, so I incorrectly concluded the file was missing. @patternfly/react-styles is an external npm package, and @patternfly/react-styles/css/components/Page/page resolves through the installed package — not from within the repository source tree. The CSS file and its exported keys (pageDockMain, pageSidebarMain) exist in your locally installed dependency, as expected.


✏️ Learnings added
Learnt from: thatblindgeye
Repo: patternfly/patternfly-react PR: 12293
File: packages/react-core/src/components/Page/Page.tsx:351-354
Timestamp: 2026-04-01T15:54:35.860Z
Learning: In the patternfly/patternfly-react repository, style imports like `import styles from 'patternfly/react-styles/css/components/Page/page'` resolve to the installed `patternfly/react-styles` npm package in `node_modules`, not to files tracked within the repository source tree. The sandbox environment lacks `node_modules`, so searching for these paths within the repo will always fail. Do not flag missing CSS files from `patternfly/react-styles` as errors based on repo-level file searches.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: arpanroy41
Repo: patternfly/patternfly-react PR: 12237
File: packages/react-core/src/components/Toolbar/examples/ToolbarFlexGrowAndWidths.tsx:6-6
Timestamp: 2026-02-06T19:58:49.801Z
Learning: In the PatternFly React repository, React may be used without an explicit import in TSX files because React is provided globally by the build configuration. You can reference React types (e.g., React.FunctionComponent, React.ReactNode) without importing React. Do not add 'import React from 'react'' in TSX files; rely on the global React availability.

Learnt from: nicolethoen
Repo: patternfly/patternfly-react PR: 12251
File: packages/react-core/src/components/FormSelect/FormSelect.tsx:76-77
Timestamp: 2026-02-26T22:33:56.823Z
Learning: For PatternFly React components using SSRSafeIds, ensure that ouiaComponentType is a stable string (typically the component's displayName) that does not change during the component's lifecycle. Do not include dynamic props such as validation state in ouiaComponentType, as this will make the generated OUIA ID unstable. If you need to expose dynamic state for testing or UI logic, use separate data attributes instead of embedding them in ouiaComponentType.

Learnt from: tlabaj
Repo: patternfly/patternfly-react PR: 12288
File: packages/react-core/src/components/Accordion/__tests__/Accordion.test.tsx:144-150
Timestamp: 2026-03-24T14:47:35.816Z
Learning: In PatternFly React components, treat the `isPlain` prop as a public prop that follows the existing PatternFly convention: its default behavior is `false`. If `isPlain` is omitted by a consumer, it should be treated as equivalent to `isPlain={false}`. During code review, do not recommend changing this default to `undefined` or modifying any `!isPlain`-based conditional logic, since doing so would diverge from established PatternFly API patterns and could introduce a behavioral breaking change.

) : (
masthead
)}
{sidebar}
{notificationDrawer && (
<div className={css(styles.pageDrawer)}>
Expand Down
8 changes: 8 additions & 0 deletions packages/react-core/src/components/Page/PageGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export interface PageGroupProps extends React.HTMLProps<HTMLDivElement> {
hasOverflowScroll?: boolean;
/** Adds an accessible name to the page group when the hasOverflowScroll prop is set to true. */
'aria-label'?: string;
/** Adds plain styling to the page group. */
isPlain?: boolean;
/** @beta Prevents the page group from automatically applying plain styling when glass theme is enabled. When both this and isPlain are true, isPlain takes precedence. */
isNoPlainOnGlass?: boolean;
}

export const PageGroup = ({
Expand All @@ -38,6 +42,8 @@ export const PageGroup = ({
hasShadowBottom = false,
hasOverflowScroll = false,
'aria-label': ariaLabel,
isPlain = false,
isNoPlainOnGlass = false,
...props
}: PageGroupProps) => {
const { height, getVerticalBreakpoint } = useContext(PageContext);
Expand All @@ -60,6 +66,8 @@ export const PageGroup = ({
hasShadowTop && styles.modifiers.shadowTop,
hasShadowBottom && styles.modifiers.shadowBottom,
hasOverflowScroll && styles.modifiers.overflowScroll,
isPlain && styles.modifiers.plain,
isNoPlainOnGlass && styles.modifiers.noPlainOnGlass,
className
)}
{...(hasOverflowScroll && { tabIndex: 0, role: 'region', 'aria-label': ariaLabel })}
Expand Down
8 changes: 8 additions & 0 deletions packages/react-core/src/components/Page/PageSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ export interface PageSectionProps extends React.HTMLProps<HTMLDivElement> {
'aria-label'?: string;
/** Sets the base component to render. Defaults to section */
component?: keyof React.JSX.IntrinsicElements;
/** Adds plain styling to the page section. */
isPlain?: boolean;
/** @beta Prevents the page section from automatically applying plain styling when glass theme is enabled. When both this and isPlain are true, isPlain takes precedence. */
isNoPlainOnGlass?: boolean;
}

const variantType = {
Expand Down Expand Up @@ -98,6 +102,8 @@ export const PageSection: React.FunctionComponent<PageSectionProps> = ({
'aria-label': ariaLabel,
component = 'section',
hasBodyWrapper = true,
isPlain = false,
isNoPlainOnGlass = false,
...props
}: PageSectionProps) => {
const { height, getVerticalBreakpoint } = useContext(PageContext);
Expand Down Expand Up @@ -126,6 +132,8 @@ export const PageSection: React.FunctionComponent<PageSectionProps> = ({
hasShadowTop && styles.modifiers.shadowTop,
hasShadowBottom && styles.modifiers.shadowBottom,
hasOverflowScroll && styles.modifiers.overflowScroll,
isPlain && styles.modifiers.plain,
isNoPlainOnGlass && styles.modifiers.noPlainOnGlass,
className
)}
{...(hasOverflowScroll && { tabIndex: 0 })}
Expand Down
4 changes: 3 additions & 1 deletion packages/react-core/src/components/Page/PageSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export const PageSidebar: React.FunctionComponent<PageSidebarProps> = ({
aria-hidden={!sidebarOpen}
{...props}
>
<PageSidebarContext.Provider value={{ isSidebarOpen: sidebarOpen }}>{children}</PageSidebarContext.Provider>
<PageSidebarContext.Provider value={{ isSidebarOpen: sidebarOpen }}>
<div className={css(styles.pageSidebarMain)}>{children}</div>
</PageSidebarContext.Provider>
</div>
);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ exports[`PageSidebar should match snapshot (auto-generated) 1`] = `
class="pf-v6-c-page__sidebar ''"
id="page-sidebar"
>
<div>
ReactNode
<div
class="pf-v6-c-page__sidebar-main"
>
<div>
ReactNode
</div>
</div>
</div>
</DocumentFragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,4 +406,11 @@ describe('Page', () => {
render(<Page data-testid="page"></Page>);
expect(screen.getByTestId('page')).not.toHaveClass(styles.modifiers.dock);
});

test(`Renders with ${styles.pageDockMain} wrapper when variant is docked`, () => {
render(<Page variant="docked" masthead={<>Masthead</>} data-testid="page"></Page>);

const pageDockMain = screen.getByText('Masthead').closest(`.${styles.pageDockMain}`);
expect(pageDockMain).toBeInTheDocument();
});
});
186 changes: 98 additions & 88 deletions packages/react-core/src/components/Page/__tests__/PageGroup.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,92 +2,102 @@ import { render, screen } from '@testing-library/react';
import { PageGroup } from '../PageGroup';
import styles from '@patternfly/react-styles/css/components/Page/page';

describe('page group', () => {
test('Verify basic render', () => {
const { asFragment } = render(<PageGroup>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});
test('Verify top sticky', () => {
const { asFragment } = render(<PageGroup stickyOnBreakpoint={{ default: 'top' }}>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});
test('Verify bottom sticky', () => {
const { asFragment } = render(<PageGroup stickyOnBreakpoint={{ default: 'bottom' }}>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});
test('Verify top shadow', () => {
const { asFragment } = render(<PageGroup hasShadowTop>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});
test('Verify bottom shadow', () => {
const { asFragment } = render(<PageGroup hasShadowBottom>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});
test('Verify overflow scroll', () => {
const { asFragment } = render(<PageGroup hasOverflowScroll>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});

test('Renders without an aria-label by default', () => {
render(<PageGroup>test</PageGroup>);

expect(screen.getByText('test')).not.toHaveAccessibleName('Test label');
});

test('Renders with the passed aria-label applied', () => {
render(
<PageGroup aria-label="Test label" hasOverflowScroll>
test
</PageGroup>
);

expect(screen.getByText('test')).toHaveAccessibleName('Test label');
});

test('Does not log a warning in the console by default', () => {
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();

render(<PageGroup>test</PageGroup>);

expect(consoleWarning).not.toHaveBeenCalled();
});

test('Does not log a warning in the console when an aria-label is included with hasOverflowScroll', () => {
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();

render(
<PageGroup hasOverflowScroll aria-label="Test label">
test
</PageGroup>
);

expect(consoleWarning).not.toHaveBeenCalled();
});

test('Logs a warning in the console when an aria-label is not included with hasOverflowScroll', () => {
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();

render(<PageGroup hasOverflowScroll>test</PageGroup>);

expect(consoleWarning).toHaveBeenCalled();
});

test(`Does not render with ${styles.modifiers.fill} or ${styles.modifiers.noFill} if isFilled is not passed`, () => {
render(<PageGroup>test</PageGroup>);

expect(screen.getByText('test')).not.toHaveClass(styles.modifiers.fill);
expect(screen.getByText('test')).not.toHaveClass(styles.modifiers.noFill);
});

test(`Renders with ${styles.modifiers.fill} if isFilled={true} is passed`, () => {
render(<PageGroup isFilled={true}>test</PageGroup>);

expect(screen.getByText('test')).toHaveClass(styles.modifiers.fill);
});

test(`Renders with ${styles.modifiers.noFill} if isFilled={false} is passed`, () => {
render(<PageGroup isFilled={false}>test</PageGroup>);

expect(screen.getByText('test')).toHaveClass(styles.modifiers.noFill);
});
test('Verify basic render', () => {
const { asFragment } = render(<PageGroup>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});
test('Verify top sticky', () => {
const { asFragment } = render(<PageGroup stickyOnBreakpoint={{ default: 'top' }}>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});
test('Verify bottom sticky', () => {
const { asFragment } = render(<PageGroup stickyOnBreakpoint={{ default: 'bottom' }}>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});
test('Verify top shadow', () => {
const { asFragment } = render(<PageGroup hasShadowTop>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});
test('Verify bottom shadow', () => {
const { asFragment } = render(<PageGroup hasShadowBottom>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});
test('Verify overflow scroll', () => {
const { asFragment } = render(<PageGroup hasOverflowScroll>test</PageGroup>);
expect(asFragment()).toMatchSnapshot();
});

test('Renders without an aria-label by default', () => {
render(<PageGroup>test</PageGroup>);

expect(screen.getByText('test')).not.toHaveAccessibleName('Test label');
});

test('Renders with the passed aria-label applied', () => {
render(
<PageGroup aria-label="Test label" hasOverflowScroll>
test
</PageGroup>
);

expect(screen.getByText('test')).toHaveAccessibleName('Test label');
});

test('Does not log a warning in the console by default', () => {
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();

render(<PageGroup>test</PageGroup>);

expect(consoleWarning).not.toHaveBeenCalled();
});

test('Does not log a warning in the console when an aria-label is included with hasOverflowScroll', () => {
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();

render(
<PageGroup hasOverflowScroll aria-label="Test label">
test
</PageGroup>
);

expect(consoleWarning).not.toHaveBeenCalled();
});

test('Logs a warning in the console when an aria-label is not included with hasOverflowScroll', () => {
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();

render(<PageGroup hasOverflowScroll>test</PageGroup>);

expect(consoleWarning).toHaveBeenCalled();
});

test(`Does not render with ${styles.modifiers.fill} or ${styles.modifiers.noFill} if isFilled is not passed`, () => {
render(<PageGroup>test</PageGroup>);

expect(screen.getByText('test')).not.toHaveClass(styles.modifiers.fill);
expect(screen.getByText('test')).not.toHaveClass(styles.modifiers.noFill);
});

test(`Renders with ${styles.modifiers.fill} if isFilled={true} is passed`, () => {
render(<PageGroup isFilled={true}>test</PageGroup>);

expect(screen.getByText('test')).toHaveClass(styles.modifiers.fill);
});

test(`Renders with ${styles.modifiers.noFill} if isFilled={false} is passed`, () => {
render(<PageGroup isFilled={false}>test</PageGroup>);

expect(screen.getByText('test')).toHaveClass(styles.modifiers.noFill);
});

test(`Renders with ${styles.modifiers.plain} class when isPlain is true`, () => {
render(<PageGroup isPlain>test</PageGroup>);

expect(screen.getByText('test')).toHaveClass(styles.modifiers.plain);
});

test(`Renders with ${styles.modifiers.noPlainOnGlass} class when isNoPlainOnGlass is true`, () => {
render(<PageGroup isNoPlainOnGlass>test</PageGroup>);

expect(screen.getByText('test')).toHaveClass(styles.modifiers.noPlainOnGlass);
});
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,23 @@ test(`Renders with ${styles.modifiers.noFill} if isFilled={false} is passed`, ()

expect(screen.getByRole('main')).toHaveClass(styles.modifiers.noFill);
});

test(`Renders with ${styles.modifiers.plain} class when isPlain is true`, () => {
render(
<PageSection hasBodyWrapper={false} isPlain>
test
</PageSection>
);

expect(screen.getByText('test')).toHaveClass(styles.modifiers.plain);
});

test(`Renders with ${styles.modifiers.noPlainOnGlass} class when isNoPlainOnGlass is true`, () => {
render(
<PageSection hasBodyWrapper={false} isNoPlainOnGlass>
test
</PageSection>
);

expect(screen.getByText('test')).toHaveClass(styles.modifiers.noPlainOnGlass);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { render, screen } from '@testing-library/react';
import { PageSidebar } from '../PageSidebar';
import styles from '@patternfly/react-styles/css/components/Page/page';

test(`Renders with ${styles.pageSidebarMain} wrapper`, () => {
render(<PageSidebar data-testid="sidebar">Test</PageSidebar>);

expect(screen.getByText('Test')).toHaveClass(styles.pageSidebarMain);
});
Loading
Loading