-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upcoming: [DI-20929] - Added applied filters view in CloudPulse (#11354)
* upcoming: [DI-20929] - Added labels parameter to global filter change handlers * upcoming: [DI-20929] - Added cloudpulse applied filter * upcoming: [DI-20929] - Added test cases * upcoming: [DI-20929] - updated failing test cases * upcoming: [DI-22221] - Fixed console error * upcoming: [DI-20929] - Added changeset * upcoming: [DI-20929] - Updated changeset * upcoming: [DI-20929] - Updated import libraries * upcomign: [DI-20929] - Updated types * upcomign: [DI-20929] - Updated types * upcoming: [DI-20929] - Updated styles for dark theme * upcoming: [DI-20929] - Updated styling * upcoming: [DI-20929 ] - Eslint issue fixed * upcoming: [DI-20929] - updated function order * upcoming: [DI-20929] - Improve code readability
- Loading branch information
1 parent
1072d54
commit 92fe999
Showing
14 changed files
with
306 additions
and
38 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/manager/.changeset/pr-11354-upcoming-features-1733237771685.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/manager": Upcoming Features | ||
--- | ||
|
||
Add `CloudPulseAppliedFilter` and `CloudPulseAppliedFilterRenderer` components, update filter change handler function to add another parameter `label` ([#11354](https://github.com/linode/manager/pull/11354)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
packages/manager/src/features/CloudPulse/shared/CloudPulseAppliedFilter.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
|
||
import { renderWithTheme } from 'src/utilities/testHelpers'; | ||
|
||
import { CloudPulseAppliedFilter } from './CloudPulseAppliedFilter'; | ||
import { CloudPulseAppliedFilterRenderer } from './CloudPulseAppliedFilterRenderer'; | ||
|
||
const data = { | ||
region: ['us-east'], | ||
resource: ['res1', 'res2'], | ||
}; | ||
|
||
const testId = 'applied-filter'; | ||
|
||
describe('CloudPulse Applied Filter', () => { | ||
it('should render applied filter component', () => { | ||
const { getByTestId } = renderWithTheme( | ||
<CloudPulseAppliedFilter filters={data} /> | ||
); | ||
expect(getByTestId(testId)).toBeInTheDocument(); | ||
}); | ||
|
||
it('should render the applied filter key & values', () => { | ||
const { getByTestId } = renderWithTheme( | ||
<CloudPulseAppliedFilter filters={data} /> | ||
); | ||
expect(getByTestId(testId)).toHaveTextContent('region'); | ||
expect(getByTestId(testId)).toHaveTextContent('res1'); | ||
expect(getByTestId(testId)).not.toHaveTextContent('resources'); | ||
}); | ||
|
||
it('should not render the applied filter component', () => { | ||
const { queryByTestId } = renderWithTheme( | ||
<CloudPulseAppliedFilterRenderer filters={{}} serviceType="abc" /> | ||
); | ||
|
||
expect(queryByTestId(testId)).toBe(null); | ||
}); | ||
}); |
Oops, something went wrong.