From 81dceedbac03be4055c6ee3a3c439a641743934c Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Wed, 17 Jul 2024 16:59:25 +0200 Subject: [PATCH] [7.17] [Saved Objects] Provide stable sorting to the rows extracted from UI (#187545) (#188406) Close https://github.com/elastic/kibana/issues/179977 # Backport This will backport the following commits from `main` to `7.17`: - [[Saved Objects] Provide stable sorting to the rows extracted from UI (#187545)](https://github.com/elastic/kibana/pull/187545) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) --- .../saved_objects_management/show_relationships.ts | 12 ++++++------ .../page_objects/management/saved_objects_page.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/functional/apps/saved_objects_management/show_relationships.ts b/test/functional/apps/saved_objects_management/show_relationships.ts index 26fd2a00430f1..9a433fbc8a4ac 100644 --- a/test/functional/apps/saved_objects_management/show_relationships.ts +++ b/test/functional/apps/saved_objects_management/show_relationships.ts @@ -38,18 +38,18 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const invalidRelations = await PageObjects.savedObjects.getInvalidRelations(); expect(invalidRelations).to.eql([ - { - error: 'Saved object [visualization/missing-vis-ref] not found', - id: 'missing-vis-ref', - relationship: 'Child', - type: 'visualization', - }, { error: 'Saved object [dashboard/missing-dashboard-ref] not found', id: 'missing-dashboard-ref', relationship: 'Child', type: 'dashboard', }, + { + error: 'Saved object [visualization/missing-vis-ref] not found', + id: 'missing-vis-ref', + relationship: 'Child', + type: 'visualization', + }, ]); }); }); diff --git a/test/functional/page_objects/management/saved_objects_page.ts b/test/functional/page_objects/management/saved_objects_page.ts index c33e86b42692d..f389d7b9dfe2c 100644 --- a/test/functional/page_objects/management/saved_objects_page.ts +++ b/test/functional/page_objects/management/saved_objects_page.ts @@ -271,7 +271,7 @@ export class SavedObjectsPageObject extends FtrService { relationship: await relationship.getVisibleText(), error: await error.getVisibleText(), }; - }); + }).then((result) => result.sort((a, b) => a.id.localeCompare(b.id))); } async getTableSummary() {