Skip to content

Commit

Permalink
feat(mwpw-162835): rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheridan Sunier authored and Sheridan Sunier committed Jan 16, 2025
1 parent 3e895d3 commit c446c5e
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Chimera UI Libraries - Build 0.24.2 (1/15/2025, 13:43:58)
* Chimera UI Libraries - Build 0.24.2 (1/15/2025, 14:10:23)
*
*/
/******/ (function(modules) { // webpackBootstrap
Expand Down
2 changes: 1 addition & 1 deletion dist/main.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -593,4 +593,86 @@ describe('Container Component', () => {
const totalCardLimitElement = screen.getByTestId('consonant-Select-btn');
expect(totalCardLimitElement).toHaveTextContent('Titledesc');
});

test('should be able to render with old event filter', () => {
const customConfig = {
collection: {
totalCardsToShow: 50,
reservoir: {
sample: 10,
pool: 100,
},
lazyLoad: false,
resultsPerPage: 10,
endpoint: 'https://www.somedomain.com/some-test-api.json',
cardStyle: 'none',
showTotalResults: true,
i18n: {
prettyDateIntervalFormat: '{LLL} {dd} | {timeRange} {timeZone}',
totalResultsText: '{total} Results',
title: 'Your Top Picks',
titleHeadingLevel: 'h2',
},
},
filterPanel: {
enabled: true,
eventFilter: 'not-timed',
filters: [
{
group: 'Category Group',
id: 'caas:product-categories:category-1',
title: 'Category 1',
icon: 'https://www.somedomain.com/category-icon-1.svg',
items: [{ name: 'item1' }, { name: 'item2' }],
},
{
group: 'Category Group',
id: 'caas:product-categories:category-2',
title: 'Category 2',
icon: 'https://www.somedomain.com/category-icon-2.svg',
items: [{ name: 'item3' }, { name: 'item4' }],
},
],
categories: [
{
group: 'Category Group',
id: 'caas:product-categories:category-1',
title: 'Category 1',
icon: 'https://www.somedomain.com/category-icon-1.svg',
items: [{ name: 'item1' }, { name: 'item2' }],
},
{
group: 'Category Group',
id: 'caas:product-categories:category-2',
title: 'Category 2',
icon: 'https://www.somedomain.com/category-icon-2.svg',
items: [{ name: 'item3' }, { name: 'item4' }],
},
],
i18n: {
leftPanel: {
mobile: {
group: {
totalResultsText: '{total} Results',
applyBtnText: 'Apply',
doneBtnText: 'Done',
},
},
},
},
},
sort: {
options: [
{ label: 'Titledesc', sort: SORT_TYPES.TITLEDESC },
],
defaultSort: SORT_TYPES.TITLEDESC,
},
};
render(<Container config={customConfig} />);

// Check the totalCardLimit element
const totalCardLimitElement = screen.getByTestId('consonant-Select-btn');
expect(totalCardLimitElement).toHaveTextContent('Titledesc');
});

});

0 comments on commit c446c5e

Please sign in to comment.