Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpinsonneau committed Jun 17, 2024
1 parent c320bcf commit 78fb073
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions web/src/components/filters/filters-toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { QuickFilter } from '../../model/quick-filters';
import { findFilter } from '../../utils/filter-definitions';
import { Indicator } from '../../utils/filters-helper';
import { localStorageShowFiltersKey, useLocalStorage } from '../../utils/local-storage-hook';
import { QueryOptionsDropdown, QueryOptionsDropdownProps } from '../dropdowns/query-options-dropdown';
import { QueryOptionsDropdown, QueryOptionsProps } from '../dropdowns/query-options-dropdown';
import { LinksOverflow } from '../overflow/links-overflow';
import AutocompleteFilter from './autocomplete-filter';
import CompareFilter, { FilterCompare } from './compare-filter';
Expand All @@ -35,7 +35,7 @@ export interface FiltersToolbarProps {
setFilters: (v: Filters) => void;
clearFilters: () => void;
resetFilters: () => void;
queryOptionsProps: QueryOptionsDropdownProps;
queryOptionsProps: QueryOptionsProps;
quickFilters: QuickFilter[];
filterDefinitions: FilterDefinition[];
isFullScreen: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('<RecordField />', () => {
/>
);
expect(wrapper.find(RecordField)).toBeTruthy();
expect(wrapper.find('.record-field-content')).toHaveLength(1);
expect(wrapper.find('.record-field-content span').text()).toBe('< 1ms');
expect(wrapper.find('.record-field-value')).toHaveLength(1);
expect(wrapper.find('.record-field-value').childAt(0).text()).toBe('< 1ms');
});
});
6 changes: 3 additions & 3 deletions web/src/components/netflow-record/record-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const RecordField: React.FC<RecordFieldProps> = ({
<div className="record-field-flex">
<Tooltip
content={[
<Text component={TextVariants.p} className="co-nowrap" key="co-error-text">
<Text component={TextVariants.p} className="record-field-value co-nowrap" key="co-error-text">
{text}
</Text>
]}
Expand All @@ -89,7 +89,7 @@ export const RecordField: React.FC<RecordFieldProps> = ({
if (errorText) {
return errorTextValue(t('n/a'), errorText);
}
return <Text className="record-field-flex text-muted">{t('n/a')}</Text>;
return <Text className="record-field-flex text-muted record-field-value">{t('n/a')}</Text>;
};

const emptyDnsErrorText = () => {
Expand All @@ -106,7 +106,7 @@ export const RecordField: React.FC<RecordFieldProps> = ({
if (text) {
return (
<TextContent className="netobserv-no-child-margin" data-test={`field-text-${text}`}>
<Text component={TextVariants.p} style={{ color }}>
<Text className="record-field-value" component={TextVariants.p} style={{ color }}>
{text}
</Text>
<Text component={TextVariants.p} className="record-field-tooltip">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import { Filter } from '../../../model/filters';
import { FlowScope, MetricType } from '../../../model/flow-query';
import { NodeData } from '../../../model/topology';
import { createPeer } from '../../../utils/metrics';
import { ElementPanel, ElementPanelDetailsContent } from '../element-panel';
import { ElementPanel } from '../element-panel';
import { ElementPanelContent } from '../element-panel-content';
import { ElementPanelMetrics } from '../element-panel-metrics';
import { dataSample } from '../__tests-data__/metrics';

Expand Down Expand Up @@ -62,8 +63,8 @@ describe('<ElementPanel />', () => {
});

it('should render <ElementPanelDetailsContent />', async () => {
const wrapper = mount(<ElementPanelDetailsContent {...mocks} />);
expect(wrapper.find(ElementPanelDetailsContent)).toBeTruthy();
const wrapper = mount(<ElementPanelContent {...mocks} />);
expect(wrapper.find(ElementPanelContent)).toBeTruthy();

//check node infos
expect(wrapper.find('#node-info-address').last().text()).toBe('IP10.129.0.15');
Expand Down Expand Up @@ -118,7 +119,7 @@ describe('<ElementPanel />', () => {
});

it('should filter <ElementPanelDetailsContent />', async () => {
const wrapper = mount(<ElementPanelDetailsContent {...mocks} />);
const wrapper = mount(<ElementPanelContent {...mocks} />);
const ipFilters = wrapper.find(OptionsMenuToggle).last();
// Two buttons: first for pod filter, second for IP filter => click on second
ipFilters.last().simulate('click');
Expand Down

0 comments on commit 78fb073

Please sign in to comment.