Skip to content

Commit

Permalink
Fix pagination test
Browse files Browse the repository at this point in the history
  • Loading branch information
maryam-saeidi committed Aug 29, 2022
1 parent 36ccf7a commit 9d848b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 () => {
Expand Down Expand Up @@ -97,7 +97,7 @@ export function ObservabilityAlertsPaginationProvider({ getService }: FtrProvide
getPageSizeSelectorOrFail,
missingPageSizeSelectorOrFail,
getTenRowsPageSelector,
getTwentyFiveRowsPageSelector,
getTwentyRowsPageSelector,
getFiftyRowsPageSelector,
getPrevPageButton,
getPrevPageButtonOrFail,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 9d848b9

Please sign in to comment.