Skip to content

Commit 914559b

Browse files
committed
style: update with PF styles and fix unit tests
1 parent da5fda0 commit 914559b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/module/src/ListManager/ListManager.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jest.mock('@patternfly/react-drag-drop', () => {
1818
});
1919

2020
const mockColumns = [
21-
{ key: 'name', title: 'Name', isShown: true, isShownByDefault: true },
22-
{ key: 'status', title: 'Status', isShown: true, isShownByDefault: true },
23-
{ key: 'version', title: 'Version', isShown: false, isShownByDefault: false },
21+
{ key: 'name', title: 'Name', isSelected: true, isShownByDefault: true },
22+
{ key: 'status', title: 'Status', isSelected: true, isShownByDefault: true },
23+
{ key: 'version', title: 'Version', isSelected: false, isShownByDefault: false },
2424
];
2525

2626
describe('ListManager', () => {
@@ -46,7 +46,7 @@ describe('ListManager', () => {
4646
const nameCheckbox = screen.getByTestId('column-check-name');
4747
await userEvent.click(nameCheckbox);
4848
expect(nameCheckbox).not.toBeChecked();
49-
expect(onSelect).toHaveBeenCalledWith(expect.objectContaining({ key: 'name', isShown: false }));
49+
expect(onSelect).toHaveBeenCalledWith(expect.objectContaining({ key: 'name', isSelected: false }));
5050
});
5151

5252
it('selects all columns', async () => {

packages/module/src/ListManager/ListManager.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const ListManager: FunctionComponent<ListManagerProps> = (
101101

102102
return (
103103
<>
104-
<div style={{ paddingBottom: '1rem' }}>
104+
<div style={{ paddingBlockEnd: 'var(--pf-t--global--spacer--md)' }}>
105105
<BulkSelect
106106
canSelectAll
107107
isDataPaginated={false}
@@ -149,7 +149,7 @@ const ListManager: FunctionComponent<ListManagerProps> = (
149149
wrapper={<DataList aria-label="Selected columns" isCompact data-ouia-component-id={`${ouiaId}-column-list`}/>}
150150
/>
151151
</DragDropSort>
152-
<ActionList style={{ paddingTop: '1rem' }}>
152+
<ActionList style={{ paddingBlockStart: 'var(--pf-t--global--spacer--md)' }}>
153153
<ActionListGroup>
154154
<ActionListItem>
155155
<Button key="save" variant={ButtonVariant.primary} onClick={handleSave} ouiaId={`${ouiaId}-save-button`}>

0 commit comments

Comments
 (0)