From e4876f374d8c0da330c379634fb29a2689f269c0 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 12 May 2022 09:21:39 -0500 Subject: [PATCH 1/4] unskip test (#132009) (#132130) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 6af6863cc4a3ddd34d0b39acf38c78fa609fb446) Co-authored-by: Joe Reuter --- x-pack/test/functional/apps/lens/drag_and_drop.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/test/functional/apps/lens/drag_and_drop.ts b/x-pack/test/functional/apps/lens/drag_and_drop.ts index 454ae7d8bc133..e7b7ba18d62fb 100644 --- a/x-pack/test/functional/apps/lens/drag_and_drop.ts +++ b/x-pack/test/functional/apps/lens/drag_and_drop.ts @@ -12,8 +12,7 @@ export default function ({ getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['visualize', 'lens', 'common', 'header']); describe('lens drag and drop tests', () => { - // FLAKY: https://github.com/elastic/kibana/issues/108352 - describe.skip('basic drag and drop', () => { + describe('basic drag and drop', () => { it('should construct the basic split xy chart', async () => { await PageObjects.visualize.navigateToNewVisualization(); await PageObjects.visualize.clickVisType('lens'); From 5dbbdf9cfda14fcd3da94e44c400a88cc8b09749 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 12 May 2022 11:05:41 -0500 Subject: [PATCH 2/4] skip failing test suite (#131834) --- .../test_suites/saved_objects_management/export_transform.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/plugin_functional/test_suites/saved_objects_management/export_transform.ts b/test/plugin_functional/test_suites/saved_objects_management/export_transform.ts index 90cb27e5babef..1367327477d9e 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/export_transform.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/export_transform.ts @@ -19,7 +19,8 @@ export default function ({ getService }: PluginFunctionalProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); - describe('export transforms', () => { + // Failing: See https://github.com/elastic/kibana/issues/131834 + describe.skip('export transforms', () => { describe('root objects export transforms', () => { before(async () => { await esArchiver.load( From 65c94daf182c226487e64d32070afe119a9250e6 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 12 May 2022 14:36:38 -0500 Subject: [PATCH 3/4] [DOCS] Fixes data type for fields in find rules API (#132163) (#132176) (cherry picked from commit 784fd5578034238662c5a54469eabbf9b4afc801) Co-authored-by: Lisa Cawley --- docs/api/alerting/find_rules.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/alerting/find_rules.asciidoc b/docs/api/alerting/find_rules.asciidoc index 2df8b3522725c..48c4bb25e0eea 100644 --- a/docs/api/alerting/find_rules.asciidoc +++ b/docs/api/alerting/find_rules.asciidoc @@ -43,7 +43,7 @@ NOTE: Rule `params` are stored as a {ref}/flattened.html[flattened field type] a (Optional, array|string) The fields to perform the `simple_query_string` parsed query against. `fields`:: - (Optional, array|string) The fields to return in the `attributes` key of the response. + (Optional, array of strings) The fields to return in the `attributes` key of the response. `sort_field`:: (Optional, string) Sorts the response. Could be a rule field returned in the `attributes` key of the response. From 0f30932484754214d03e24cf8ae32540dffed96c Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Thu, 12 May 2022 15:58:31 -0700 Subject: [PATCH 4/4] [7.17] [Reporting] Fix reporting job completion toast to not disappear (#131402) (#132089) * [Reporting] Fix reporting job completion toast to not disappear (#131402) (cherry picked from commit 7b2d8d440861fcd324a4abfbff836e8bda45cc24) # Conflicts: # x-pack/plugins/reporting/public/lib/__snapshots__/stream_handler.test.ts.snap * fix snapshot Co-authored-by: Michael Dokolin --- .../__snapshots__/stream_handler.test.ts.snap | 62 +++++++++---------- .../public/lib/stream_handler.test.ts | 3 +- .../reporting/public/notifier/job_success.tsx | 7 +++ .../functional/apps/discover/reporting.ts | 4 ++ 4 files changed, 43 insertions(+), 33 deletions(-) diff --git a/x-pack/plugins/reporting/public/lib/__snapshots__/stream_handler.test.ts.snap b/x-pack/plugins/reporting/public/lib/__snapshots__/stream_handler.test.ts.snap index 9c72de2bf0ed8..88e70c75f548b 100644 --- a/x-pack/plugins/reporting/public/lib/__snapshots__/stream_handler.test.ts.snap +++ b/x-pack/plugins/reporting/public/lib/__snapshots__/stream_handler.test.ts.snap @@ -176,42 +176,40 @@ Array [ `; exports[`stream handler showNotifications show success 1`] = ` -Array [ - Object { - "color": "success", - "data-test-subj": "completeReportSuccess", - "text": MountPoint { - "reactNode": -

- -

- +

+ - , - }, - "title": MountPoint { - "reactNode": + , - }, + /> + , }, -] + "title": MountPoint { + "reactNode": , + }, +} `; diff --git a/x-pack/plugins/reporting/public/lib/stream_handler.test.ts b/x-pack/plugins/reporting/public/lib/stream_handler.test.ts index 1bb8c3229407d..2028432587174 100644 --- a/x-pack/plugins/reporting/public/lib/stream_handler.test.ts +++ b/x-pack/plugins/reporting/public/lib/stream_handler.test.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { omit } from 'lodash'; import sinon, { stub } from 'sinon'; import { NotificationsStart } from 'src/core/public'; import { coreMock } from '../../../../../src/core/public/mocks'; @@ -98,7 +99,7 @@ describe('stream handler', () => { expect(mockShowDanger.callCount).toBe(0); expect(mockShowSuccess.callCount).toBe(1); expect(mockShowWarning.callCount).toBe(0); - expect(mockShowSuccess.args[0]).toMatchSnapshot(); + expect(omit(mockShowSuccess.args[0][0], 'toastLifeTimeMs')).toMatchSnapshot(); done(); }); }); diff --git a/x-pack/plugins/reporting/public/notifier/job_success.tsx b/x-pack/plugins/reporting/public/notifier/job_success.tsx index 4d83f371a5487..3920f70f4e00f 100644 --- a/x-pack/plugins/reporting/public/notifier/job_success.tsx +++ b/x-pack/plugins/reporting/public/notifier/job_success.tsx @@ -34,5 +34,12 @@ export const getSuccessToast = ( ), + /** + * If timeout is an Infinity value, a Not-a-Number (NaN) value, or negative, then timeout will be zero. + * And we cannot use `Number.MAX_SAFE_INTEGER` because EUI's Timer implementation + * subtracts it from the current time to evaluate the remainder. + * @see https://www.w3.org/TR/2011/WD-html5-20110525/timers.html + */ + toastLifeTimeMs: Number.MAX_SAFE_INTEGER - Date.now(), 'data-test-subj': 'completeReportSuccess', }); diff --git a/x-pack/test/functional/apps/discover/reporting.ts b/x-pack/test/functional/apps/discover/reporting.ts index a37d3ad2db3cd..2546a197b807c 100644 --- a/x-pack/test/functional/apps/discover/reporting.ts +++ b/x-pack/test/functional/apps/discover/reporting.ts @@ -151,6 +151,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { beforeEach(() => PageObjects.common.navigateToApp('discover')); + afterEach(async () => { + await PageObjects.reporting.checkForReportingToasts(); + }); + it('generates a report with data', async () => { await setupPage(); await PageObjects.discover.loadSavedSearch('Ecommerce Data');