Skip to content

Commit

Permalink
resolve review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
manvendra-s-rathore committed Jun 10, 2024
1 parent ceedff9 commit eaa19cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 7 additions & 9 deletions test/jest/__mock__/stripesComponents.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ jest.mock('@folio/stripes/components', () => ({
Button: jest.fn(({
children,
onClick = jest.fn(),
// eslint-disable-next-line no-unused-vars
buttonStyle, buttonRef,
...rest
}) => (
<button data-test-button type="button" {...rest} onClick={onClick}>
<button
data-test-button
type="button"
{...rest}
onClick={onClick}
>
<span>
{children}
</span>
Expand Down Expand Up @@ -44,17 +47,12 @@ jest.mock('@folio/stripes/components', () => ({
MultiColumnList: jest.fn((props) => (
<div data-testid={props['data-testid']} />
)),
// destructure appIcon and dismissible so they aren't incorrectly
// applied as DOM attributes via ...rest.
// eslint-disable-next-line no-unused-vars
Pane: jest.fn(({ children, className, defaultWidth, paneTitle, firstMenu, lastMenu, actionMenu, appIcon, dismissible, ...rest }) => {
Pane: jest.fn(({ children, className, defaultWidth, paneTitle, firstMenu, ...rest }) => {
return (
<div className={className} {...rest} style={{ width: defaultWidth }}>
<div>
{firstMenu ?? null}
{paneTitle}
{actionMenu ? actionMenu({ onToggle: jest.fn() }) : null}
{lastMenu ?? null}
</div>
{children}
</div>
Expand Down
2 changes: 2 additions & 0 deletions test/jest/__mock__/stripesSmartComponents.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jest.mock('@folio/stripes/smart-components', () => ({
id,
onClick = jest.fn(),
disabled,
visible,
...restProps
}) => (
<div>
Expand All @@ -17,6 +18,7 @@ jest.mock('@folio/stripes/smart-components', () => ({
id={id}
onClick={onClick}
disabled={disabled}
visible={visible}
{...restProps}
>
<span size="small" icon="times-circle-solid">
Expand Down

0 comments on commit eaa19cb

Please sign in to comment.