From 0277ab63dd2c5baf16691ac44bca24330eed8d5b Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 10 Jan 2022 11:54:36 -0500 Subject: [PATCH] Fix `import_saved_objects_between_versions.ts` FTR test (#122243) (#122553) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 389a87d036880dfa42c38b7445996063d3459aa8) Co-authored-by: Pierre Gayvallet --- .../import_saved_objects_between_versions.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/x-pack/test/functional/apps/saved_objects_management/import_saved_objects_between_versions.ts b/x-pack/test/functional/apps/saved_objects_management/import_saved_objects_between_versions.ts index 496eea6fb0b4d..2b20964965cdc 100644 --- a/x-pack/test/functional/apps/saved_objects_management/import_saved_objects_between_versions.ts +++ b/x-pack/test/functional/apps/saved_objects_management/import_saved_objects_between_versions.ts @@ -27,12 +27,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { if (parts.length !== 3) { throw new Error('text not loaded yet'); } - return Number.parseInt(parts[1], 10); + const count = Number.parseInt(parts[1], 10); + if (count === 0) { + throw new Error('text not loaded yet'); + } + return count; }); }; - // Failing: See https://github.com/elastic/kibana/issues/121968 - describe.skip('FOO Export import saved objects between versions', function () { + describe('Export import saved objects between versions', function () { before(async function () { await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana'); await kibanaServer.uiSettings.replace({}); @@ -40,6 +43,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.settings.clickKibanaSavedObjects(); }); + beforeEach(async () => { + await PageObjects.savedObjects.waitTableIsLoaded(); + }); + after(async () => { await esArchiver.load('x-pack/test/functional/es_archives/empty_kibana'); });