mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Lens] Fix filter labels (#211998)
Fixes issue causing filter labels to render as `undefined`. Filter labels now display correctly.
This commit is contained in:
parent
46c8c17728
commit
4a8928d5d4
2 changed files with 10 additions and 2 deletions
|
@ -51,11 +51,11 @@ export interface FilterContentProps {
|
|||
}
|
||||
|
||||
export function FilterContent({ filter, valueLabel, fieldLabel, hideAlias }: FilterContentProps) {
|
||||
if (!hideAlias && filter.meta.alias !== null) {
|
||||
if (!hideAlias && filter.meta.alias != null) {
|
||||
return (
|
||||
<>
|
||||
<Prefix prefix={filter.meta.negate} />
|
||||
<FilterValue value={`${filter.meta.alias}`} />
|
||||
<FilterValue value={filter.meta.alias} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -75,6 +75,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await dashboardAddPanel.closeAddPanel();
|
||||
await retry.try(async () => {
|
||||
await clickInChart(30, 5); // hardcoded position of bar, depends heavy on data and charts implementation
|
||||
const filters = await find.allByCssSelector('.euiCheckbox');
|
||||
expect(filters).length(2);
|
||||
const [timeFilter, ipFilter] = filters;
|
||||
expect(await timeFilter.getVisibleText()).to.be(
|
||||
'@timestamp: Sep 21, 2015 @ 09:00:00.000 to Sep 21, 2015 @ 12:00:00.000'
|
||||
);
|
||||
expect(await ipFilter.getVisibleText()).to.be('ip: 97.220.3.248');
|
||||
|
||||
await testSubjects.existOrFail('applyFiltersPopoverButton', { timeout: 2500 });
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue