Skip to content
Draft
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
2 changes: 1 addition & 1 deletion packages/react-core/src/components/Compass/Compass.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

const compassContent = (
<div
className={css(styles.compass, dock !== undefined && styles.modifiers.dock, className)}
className={css(styles.compass, dock !== undefined && styles.modifiers.docked, className)}

Check failure on line 71 in packages/react-core/src/components/Compass/Compass.tsx

View workflow job for this annotation

GitHub Actions / Build, test & deploy

Property 'docked' does not exist on type '{ animateSmoothly: "pf-m-animate-smoothly"; dock: "pf-m-dock"; noGlass: "pf-m-no-glass"; start: "pf-m-start"; end: "pf-m-end"; expanded: "pf-m-expanded"; plain: "pf-m-plain"; noBorder: "pf-m-no-border"; ... 4 more ...; noScreenWarning: "pf-m-no-screen-warning"; }'. Did you mean 'dock'?

Check failure on line 71 in packages/react-core/src/components/Compass/Compass.tsx

View workflow job for this annotation

GitHub Actions / Build

Property 'docked' does not exist on type '{ animateSmoothly: "pf-m-animate-smoothly"; dock: "pf-m-dock"; noGlass: "pf-m-no-glass"; start: "pf-m-start"; end: "pf-m-end"; expanded: "pf-m-expanded"; plain: "pf-m-plain"; noBorder: "pf-m-no-border"; ... 4 more ...; noScreenWarning: "pf-m-no-screen-warning"; }'. Did you mean 'dock'?
{...props}
style={{ ...props.style, ...backgroundImageStyles }}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ test('Matches the snapshot with drawer', () => {
expect(asFragment()).toMatchSnapshot();
});

test(`Renders with ${styles.modifiers.dock} class when dock is passed`, () => {
test(`Renders with ${styles.modifiers.docked} class when dock is passed`, () => {
render(<Compass dock={<div>Dock content</div>} data-testid="compass" />);
expect(screen.getByTestId('compass')).toHaveClass(styles.modifiers.dock);
expect(screen.getByTestId('compass')).toHaveClass(styles.modifiers.docked);
});

test(`Does not render with ${styles.modifiers.dock} class when dock is not passed`, () => {
test(`Does not render with ${styles.modifiers.docked} class when dock is not passed`, () => {
render(<Compass data-testid="compass" />);
expect(screen.getByTestId('compass')).not.toHaveClass(styles.modifiers.dock);
expect(screen.getByTestId('compass')).not.toHaveClass(styles.modifiers.docked);
});
2 changes: 1 addition & 1 deletion packages/react-core/src/components/Page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
{...rest}
className={css(
styles.page,
variant === 'docked' && styles.modifiers.dock,
variant === 'docked' && styles.modifiers.docked,

Check failure on line 342 in packages/react-core/src/components/Page/Page.tsx

View workflow job for this annotation

GitHub Actions / Build, test & deploy

Property 'docked' does not exist on type '{ dock: "pf-m-dock"; hamburger: "pf-m-hamburger"; expanded: "pf-m-expanded"; collapsed: "pf-m-collapsed"; vertical: "pf-m-vertical"; textExpanded: "pf-m-text-expanded"; pageInsets: "pf-m-page-insets"; ... 36 more ...; noPaddingOn_2xl: "pf-m-no-padding-on-2xl"; }'. Did you mean 'dock'?

Check failure on line 342 in packages/react-core/src/components/Page/Page.tsx

View workflow job for this annotation

GitHub Actions / Build

Property 'docked' does not exist on type '{ dock: "pf-m-dock"; hamburger: "pf-m-hamburger"; expanded: "pf-m-expanded"; collapsed: "pf-m-collapsed"; vertical: "pf-m-vertical"; textExpanded: "pf-m-text-expanded"; pageInsets: "pf-m-page-insets"; ... 36 more ...; noPaddingOn_2xl: "pf-m-no-padding-on-2xl"; }'. Did you mean 'dock'?
width !== null && height !== null && 'pf-m-resize-observer',
width !== null && `pf-m-breakpoint-${getBreakpoint(width)}`,
height !== null && `pf-m-height-breakpoint-${getVerticalBreakpoint(height)}`,
Expand Down
12 changes: 6 additions & 6 deletions packages/react-core/src/components/Page/__tests__/Page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -390,21 +390,21 @@ describe('Page', () => {
expect(screen.getByRole('main').parentElement).not.toHaveClass(styles.modifiers.noFill);
});

test(`Renders with ${styles.modifiers.dock} class when variant is docked`, () => {
test(`Renders with ${styles.modifiers.docked} class when variant is docked`, () => {
render(<Page {...props} variant="docked" data-testid="page"></Page>);

expect(screen.getByTestId('page')).toHaveClass(styles.modifiers.dock);
expect(screen.getByTestId('page')).toHaveClass(styles.modifiers.docked);
});

test(`Does not render with ${styles.modifiers.dock} class when variant is default`, () => {
test(`Does not render with ${styles.modifiers.docked} class when variant is default`, () => {
render(<Page {...props} variant="default" data-testid="page"></Page>);

expect(screen.getByTestId('page')).not.toHaveClass(styles.modifiers.dock);
expect(screen.getByTestId('page')).not.toHaveClass(styles.modifiers.docked);
});

test(`Does not render with ${styles.modifiers.dock} class when variant is not passed`, () => {
test(`Does not render with ${styles.modifiers.docked} class when variant is not passed`, () => {
render(<Page data-testid="page"></Page>);
expect(screen.getByTestId('page')).not.toHaveClass(styles.modifiers.dock);
expect(screen.getByTestId('page')).not.toHaveClass(styles.modifiers.docked);
});

test(`Renders with ${styles.pageDockMain} wrapper when variant is docked`, () => {
Expand Down
Loading