Skip to content

Commit

Permalink
Update package dependencies and remove unused modules
Browse files Browse the repository at this point in the history
- Upgraded `webpack-bundle-analyzer` from v3.8.0 to v4.10.2 in both `package.json` and `package-lock.json`.
- Updated various dependencies in `react-components` and `react-layouts` to their latest versions, including `@puppet/react-components` and `@puppet/sass-variables`.
- Removed unused imports and components from `react-components` and `react-layouts`, specifically `Filters`, `Columns`, and `PageContent`.
  • Loading branch information
sean-mckenna committed Jan 6, 2025
1 parent 193ff5b commit bcf13e2
Show file tree
Hide file tree
Showing 20 changed files with 26,260 additions and 34,150 deletions.
796 changes: 372 additions & 424 deletions package-lock.json

Large diffs are not rendered by default.

17,180 changes: 7,564 additions & 9,616 deletions packages/data-grid/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/data-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"caniuse-lite": "^1.0.30001117",
"chai": "^4.2.0",
"chai-enzyme": "^1.0.0-beta.1",
"cheerio": "^1.0.0-rc.12",
"cheerio": "1.0.0-rc.10",
"core-js": "^3.38.1",
"css-loader": "^7.1.2",
"enzyme": "^3.11.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,11 +597,11 @@ exports[`Snapshot test Check component matches previous HTML snapshot 2`] = `
as="div"
className="dg-empty-state-message"
color="medium"
size="medium"
size="regular"
style={{}}
>
<div
className="rc-text rc-text-size-medium rc-text-medium dg-empty-state-message"
className="rc-text rc-text-size-regular rc-text-medium dg-empty-state-message"
style={{}}
>
Prompt to action or solution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`Snapshot test Check component matches previous HTML snapshot 1`] = `
<QuickFilter
emptyFilterLabel="No items to filter by"
emptyFilterLabel="test empty filter label"
filters={
[
{
Expand Down Expand Up @@ -121,8 +121,6 @@ exports[`Snapshot test Check component matches previous HTML snapshot 1`] = `
}
placeholder="All Operating System"
style={{}}
tooltipAnchor="top"
tooltipDisabled={false}
type="tertiary"
value={null}
weight="bold"
Expand Down Expand Up @@ -475,8 +473,6 @@ exports[`Snapshot test Check component matches previous HTML snapshot 1`] = `
}
placeholder="Puppet installed"
style={{}}
tooltipAnchor="top"
tooltipDisabled={false}
type="tertiary"
value={null}
weight="bold"
Expand Down Expand Up @@ -768,9 +764,9 @@ exports[`Snapshot test Check component matches previous HTML snapshot 1`] = `
</div>
</OptionMenuList_OptionMenuList>
</div>
</ButtonSelect>
</ButtonSelect>
<ButtonSelect
</ButtonSelect_ButtonSelect>
</ButtonSelect_ButtonSelect>
<ButtonSelect_ButtonSelect
className="dg-quick-filter-filter dg-quick-filter dg-quick-filter-empty"
id="quick-filter-Empty-array-2"
key="3"
Expand All @@ -787,7 +783,7 @@ exports[`Snapshot test Check component matches previous HTML snapshot 1`] = `
placeholder="Empty filter"
type="tertiary"
>
<ButtonSelect
<ButtonSelect_ButtonSelect
anchor="bottom left"
applyImmediately={false}
className="dg-quick-filter-filter dg-quick-filter dg-quick-filter-empty"
Expand All @@ -809,8 +805,6 @@ exports[`Snapshot test Check component matches previous HTML snapshot 1`] = `
}
placeholder="Empty filter"
style={{}}
tooltipAnchor="top"
tooltipDisabled={false}
type="tertiary"
value={null}
weight="bold"
Expand Down Expand Up @@ -883,7 +877,7 @@ exports[`Snapshot test Check component matches previous HTML snapshot 1`] = `
</Icon>
</button>
</Button>
<OptionMenuList
<OptionMenuList_OptionMenuList
actionLabel="Apply"
aria-labelledby="quick-filter-Empty-array-2"
autocomplete={false}
Expand Down Expand Up @@ -958,10 +952,10 @@ exports[`Snapshot test Check component matches previous HTML snapshot 1`] = `
</ForwardRef>
</ul>
</div>
</OptionMenuList>
</OptionMenuList_OptionMenuList>
</div>
</ButtonSelect>
</ButtonSelect>
</ButtonSelect_ButtonSelect>
</ButtonSelect_ButtonSelect>
</div>
</div>
</QuickFilter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ exports[`Snapshot test Check component matches previous HTML snapshot 1`] = `
as="div"
className="rc-tag-text"
color={null}
size="medium"
size="regular"
style={{}}
>
<div
className="rc-text rc-text-size-medium rc-tag-text"
className="rc-text rc-text-size-regular rc-tag-text"
style={{}}
>
All Operating System = Windows
Expand Down Expand Up @@ -129,11 +129,11 @@ exports[`Snapshot test Check component matches previous HTML snapshot 1`] = `
as="div"
className="rc-tag-text"
color={null}
size="medium"
size="regular"
style={{}}
>
<div
className="rc-text rc-text-size-medium rc-tag-text"
className="rc-text rc-text-size-regular rc-tag-text"
style={{}}
>
Puppet Installed = true
Expand Down
37 changes: 34 additions & 3 deletions packages/data-grid/src/__test__/quickFitler.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,55 @@ const filters = [
},
],
},
{
fieldLabel: 'Empty filter',
field: 'Empty-array',
options: [],
},
];

const emptyFilterLabel = 'test empty filter label';

const mockfunc = jest.fn();
const wrapper = mount(
<QuickFilter filters={filters} onFilterSelect={mockfunc} />,
<QuickFilter
filters={filters}
onFilterSelect={mockfunc}
emptyFilterLabel={emptyFilterLabel}
/>,
);

describe('Snapshot test', () => {
test('Check component matches previous HTML snapshot', () => {
expect(wrapper).toMatchSnapshot();
});
});

describe('Check total number of quick filters', () => {
test('Number of quick filters rendered', () => {
expect(wrapper.find('div.dg-quick-filter-filter')).toHaveLength(3);
});
});

describe('Check number of empty quick filters', () => {
test('Number of empty quick filters rendered', () => {
expect(wrapper.find('div.dg-quick-filter-empty')).toHaveLength(1);
});

test('Empty filter label text', () => {
expect(
wrapper
.find('div.dg-quick-filter-empty')
.find('span.rc-menu-list-item-content')
.text(),
).toEqual('test empty filter label');
});
});

describe('Check component', () => {
test('Number of dropdowns rendered ', () => {
expect(
wrapper.find('.dg-quick-filter-filters > .dg-quick-filter'),
).toHaveLength(2);
).toHaveLength(3);
});

test('onFilterSelect function gets called', () => {
Expand Down
Loading

0 comments on commit bcf13e2

Please sign in to comment.