diff --git a/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts b/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts index 8b9c0263f765b..57f117561463c 100644 --- a/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts +++ b/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts @@ -168,7 +168,7 @@ export class NotificationsService { warning: 1, info: 2, }; - return (a, b) => levelOrder[a.level] - levelOrder[b.level]; + return (a, b) => levelOrder[b.level] - levelOrder[a.level]; } else { const levelOrder: Record = { error: 2, diff --git a/x-pack/test/functional/services/ml/common_table_service.ts b/x-pack/test/functional/services/ml/common_table_service.ts index ef57e0e9d5b84..68ddf703dbd46 100644 --- a/x-pack/test/functional/services/ml/common_table_service.ts +++ b/x-pack/test/functional/services/ml/common_table_service.ts @@ -133,6 +133,7 @@ export function MlTableServiceProvider({ getPageObject, getService }: FtrProvide await retry.tryForTime(5000, async () => { await testSubjects.click(testSubjString); + await this.waitForTableToStartLoading(); await this.waitForTableToLoad(); await this.assertTableSorting(columnName, columnIndex, direction); });