From 9d848b986f5f73be89029b6183950933dcbb2627 Mon Sep 17 00:00:00 2001 From: Maryam Saeidi Date: Mon, 29 Aug 2022 10:53:20 +0200 Subject: [PATCH] Fix pagination test --- .../services/observability/alerts/pagination.ts | 8 ++++---- .../apps/observability/pages/alerts/pagination.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/test/functional/services/observability/alerts/pagination.ts b/x-pack/test/functional/services/observability/alerts/pagination.ts index e9e7b7c7d5ca2..91959e95d75af 100644 --- a/x-pack/test/functional/services/observability/alerts/pagination.ts +++ b/x-pack/test/functional/services/observability/alerts/pagination.ts @@ -11,7 +11,7 @@ const ROWS_PER_PAGE_SELECTOR = 'tablePaginationPopoverButton'; const PREV_BUTTON_SELECTOR = 'pagination-button-previous'; const NEXT_BUTTON_SELECTOR = 'pagination-button-next'; const TEN_ROWS_SELECTOR = 'tablePagination-10-rows'; -const TWENTY_FIVE_ROWS_SELECTOR = 'tablePagination-25-rows'; +const TWENTY_ROWS_SELECTOR = 'tablePagination-20-rows'; const FIFTY_ROWS_SELECTOR = 'tablePagination-50-rows'; const BUTTON_ONE_SELECTOR = 'pagination-button-0'; const BUTTON_TWO_SELECTOR = 'pagination-button-1'; @@ -35,8 +35,8 @@ export function ObservabilityAlertsPaginationProvider({ getService }: FtrProvide return await testSubjects.find(TEN_ROWS_SELECTOR); }; - const getTwentyFiveRowsPageSelector = async () => { - return await testSubjects.find(TWENTY_FIVE_ROWS_SELECTOR); + const getTwentyRowsPageSelector = async () => { + return await testSubjects.find(TWENTY_ROWS_SELECTOR); }; const getFiftyRowsPageSelector = async () => { @@ -97,7 +97,7 @@ export function ObservabilityAlertsPaginationProvider({ getService }: FtrProvide getPageSizeSelectorOrFail, missingPageSizeSelectorOrFail, getTenRowsPageSelector, - getTwentyFiveRowsPageSelector, + getTwentyRowsPageSelector, getFiftyRowsPageSelector, getPrevPageButton, getPrevPageButtonOrFail, diff --git a/x-pack/test/observability_functional/apps/observability/pages/alerts/pagination.ts b/x-pack/test/observability_functional/apps/observability/pages/alerts/pagination.ts index 0c1c63ea66acb..bccc37e27b2b4 100644 --- a/x-pack/test/observability_functional/apps/observability/pages/alerts/pagination.ts +++ b/x-pack/test/observability_functional/apps/observability/pages/alerts/pagination.ts @@ -82,7 +82,7 @@ export default ({ getService }: FtrProviderContext) => { it('Shows up to 25 rows per page', async () => { await retry.try(async () => { await (await observability.alerts.pagination.getPageSizeSelector()).click(); - await (await observability.alerts.pagination.getTwentyFiveRowsPageSelector()).click(); + await (await observability.alerts.pagination.getTwentyRowsPageSelector()).click(); const tableRows = await observability.alerts.common.getTableCellsInRows(); expect(tableRows.length).to.not.be.greaterThan(25); });