diff --git a/src/plugins/unified_histogram/public/chart/hooks/use_lens_props.ts b/src/plugins/unified_histogram/public/chart/hooks/use_lens_props.ts index 155a38ea9a0ab..5d63bef2a04b7 100644 --- a/src/plugins/unified_histogram/public/chart/hooks/use_lens_props.ts +++ b/src/plugins/unified_histogram/public/chart/hooks/use_lens_props.ts @@ -46,7 +46,7 @@ export const useLensProps = ({ }; }, [visContext, getTimeRange, onLoad, request?.searchSessionId]); - const [lensPropsContext, setLensPropsContext] = useState(buildLensProps()); + const [lensPropsContext, setLensPropsContext] = useState(() => buildLensProps()); const updateLensPropsContext = useStableCallback(() => setLensPropsContext(buildLensProps())); useEffect(() => { diff --git a/test/functional/apps/discover/group3/_lens_vis.ts b/test/functional/apps/discover/group3/_lens_vis.ts index 03641ee5bcb41..0864382cad7a8 100644 --- a/test/functional/apps/discover/group3/_lens_vis.ts +++ b/test/functional/apps/discover/group3/_lens_vis.ts @@ -110,8 +110,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { return seriesType; } - // FLAKY: https://github.com/elastic/kibana/issues/184600 - describe.skip('discover lens vis', function () { + describe('discover lens vis', function () { before(async () => { await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); diff --git a/test/functional/apps/discover/group3/_request_counts.ts b/test/functional/apps/discover/group3/_request_counts.ts index 8a029928af0cb..580931756e2c9 100644 --- a/test/functional/apps/discover/group3/_request_counts.ts +++ b/test/functional/apps/discover/group3/_request_counts.ts @@ -191,6 +191,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { value: 'jpg', }); }); + + await expectSearches(type, 2, async () => { + await filterBar.removeFilter('extension'); + }); }); it('should send 2 requests (documents + chart) when sorting', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/group3/_request_counts.ts b/x-pack/test_serverless/functional/test_suites/common/discover/group3/_request_counts.ts index ff0f2eadf3e20..b14f434808477 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/group3/_request_counts.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/group3/_request_counts.ts @@ -189,6 +189,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { value: 'jpg', }); }); + + await expectSearches(type, 2, async () => { + await filterBar.removeFilter('extension'); + }); }); it('should send 2 requests (documents + chart) when sorting', async () => {