ccaominh commented on a change in pull request #8484: Web console: Druid status
displayed in a table
URL: https://github.com/apache/incubator-druid/pull/8484#discussion_r323509081
##########
File path: web-console/src/dialogs/status-dialog/status-dialog.spec.tsx
##########
@@ -27,4 +27,19 @@ describe('status dialog', () => {
render(statusDialog);
expect(document.body.lastChild).toMatchSnapshot();
});
+ it('filters data that contains input', () => {
+ const data = [
+ 'org.apache.druid.common.gcp.GcpModule',
+ 'org.apache.druid.common.aws.AWSModule',
+ 'io.imply.druid.UtilityBeltModule',
+ ];
+ let filterFunction;
+ filterFunction = (filter: { id: string | number; value: string }, row: {
[x: string]: any }) =>
+ String(row[filter.id]).includes(filter.value);
Review comment:
If testing the component directly is not possible, then perhaps extracting
the method to a library is an option? The library method can have a unit test
and then the component can use that same library method.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]